flutter_map icon indicating copy to clipboard operation
flutter_map copied to clipboard

No value provided error

Open yostrokon opened this issue 8 years ago • 3 comments

Using https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/voyager/{z}/{x}/{y}{r}.png for the tile layer provider i have an error I/flutter ( 4079): The following message was thrown building TileLayer(dirty, state: _TileLayerState#fec9d): I/flutter ( 4079): No value provided for variable r I/flutter ( 4079): I/flutter ( 4079): When the exception was thrown, this was the stack: I/flutter ( 4079): #0 template. (package:flutter_map/src/core/util.dart:8:7) I/flutter ( 4079): #1 _StringBase.replaceAllMapped (dart:core/runtime/libstring_patch.dart:716:35) I/flutter ( 4079): #2 template (package:flutter_map/src/core/util.dart:5:14) I/flutter ( 4079): #3 _TileLayerState.getTileUrl (package:flutter_map/src/layer/tile_layer.dart:155:12) I/flutter ( 4079): #4 _TileLayerState._createTileWidget (package:flutter_map/src/layer/tile_layer.dart:434:36) I/flutter ( 4079): #5 _TileLayerState.build (package:flutter_map/src/layer/tile_layer.dart:373:23)

As i remember "r" in the template was for the retina displays indication and switching resolution twice.

yostrokon avatar Oct 24 '18 03:10 yostrokon

did you provide a variable for r in the additionalOptions map?

johnpryan avatar Nov 19 '18 17:11 johnpryan

After reading cartodb issues on the github replaced {r} with @2x.png https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/voyager/{z}/{x}/{y}@2x.png.png

yostrokon avatar Nov 20 '18 04:11 yostrokon

👍

johnpryan avatar Nov 20 '18 19:11 johnpryan