TileProvider class abstract

The base tile provider, extended by other classes with more specialised purposes and/or requirements

Prefer extending over implementing.

For more information, see docs.fleaflet.dev/explanation#tile-providers, and docs.fleaflet.dev/layers/tile-layer/tile-providers. For an example extension (with custom ImageProvider), see NetworkTileProvider.

Implementers

Constructors

TileProvider({Map<String, String>? headers})
Construct the base tile provider and initialise the headers property

Properties

hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Custom HTTP headers that may be sent with each tile request
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsCancelLoading bool
Indicates to flutter_map internals whether to call getImage (when false) or getImageWithCancelLoadingSupport
no setter

Methods

dispose() → void
Called when the TileLayer is disposed
generateReplacementMap(String urlTemplate, TileCoordinates coordinates, TileLayer options) Map<String, String>
Generate the Map of placeholders to replacements, to be used in populateTemplatePlaceholders
getImage(TileCoordinates coordinates, TileLayer options) ImageProvider<Object>
Retrieve a tile as an image, based on its coordinates and the TileLayer
getImageWithCancelLoadingSupport(TileCoordinates coordinates, TileLayer options, Future<void> cancelLoading) ImageProvider<Object>
Retrieve a tile as an image, based on its coordinates and the TileLayer
getTileFallbackUrl(TileCoordinates coordinates, TileLayer options) String?
Generate a fallback URL for a tile, based on its coordinates and the TileLayer
getTileUrl(TileCoordinates coordinates, TileLayer options) String
Generate a primary URL for a tile, based on its coordinates and the TileLayer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateTemplatePlaceholders(String urlTemplate, TileCoordinates coordinates, TileLayer options) String
Replaces placeholders in the form templatePlaceholderElement with their corresponding values
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

templatePlaceholderElement RegExp
Regex that describes the format of placeholders in a urlTemplate
final
transparentImage Uint8List
Uint8List that forms a fully transparent image
final