getTileFallbackUrl method

String? getTileFallbackUrl(
  1. TileCoordinates coordinates,
  2. TileLayer options
)

Generate a fallback 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:

  1. populateTemplatePlaceholders
  2. generateReplacementMap
  3. getTileUrl and/or getTileFallbackUrl

Note to implementors: it is not safe to assume that at least one of wmsOptions or urlTemplate will be non-null.

Implementation

String? getTileFallbackUrl(TileCoordinates coordinates, TileLayer options) {
  final urlTemplate = options.fallbackUrl;
  if (urlTemplate == null) return null;
  return populateTemplatePlaceholders(urlTemplate, coordinates, options);
}