getTileUrl method

String getTileUrl(
  1. Coords<num> coords,
  2. TileLayerOptions options
)

Implementation

String getTileUrl(Coords coords, TileLayerOptions options) {
  var data = <String, String>{
    'x': coords.x.round().toString(),
    'y': coords.y.round().toString(),
    'z': coords.z.round().toString(),
    's': getSubdomain(coords, options)
  };
  if (options.tms) {
    data['y'] = invertY(coords.y.round(), coords.z.round()).toString();
  }
  var allOpts = Map<String, String>.from(data)
    ..addAll(options.additionalOptions);
  return util.template(options.urlTemplate, allOpts);
}