getTileUrl method
Generate a primary URL for a tile, based on its coordinates and the TileLayer
When creating a specialized TileProvider, prefer overriding URL generation related methods in the following order:
Note to implementors: it is not safe to assume that at least one of
wmsOptions
or urlTemplate
will be non-null.
Implementation
String getTileUrl(TileCoordinates coordinates, TileLayer options) =>
populateTemplatePlaceholders(
options.wmsOptions?.getUrl(
coordinates,
// ignore: deprecated_member_use_from_same_package
options.tileSize?.toInt() ?? options.tileDimension,
options.resolvedRetinaMode == RetinaMode.simulation,
) ??
options.urlTemplate ??
(throw ArgumentError(
'`wmsOptions` or `urlTemplate` must be provided to generate '
'a tile URL',
)),
coordinates,
options,
);