TileLayerOptions class

Describes the needed properties to create a tile-based layer. A tile is an image bound to a specific geographical position.

Inheritance

Constructors

TileLayerOptions({Key? key, String? urlTemplate, double tileSize = 256.0, double minZoom = 0.0, double maxZoom = 18.0, double? minNativeZoom, double? maxNativeZoom, bool zoomReverse = false, double zoomOffset = 0.0, Map<String, String> additionalOptions = const <String, String>{}, List<String> subdomains = const <String>[], int keepBuffer = 2, Color backgroundColor = const Color(0xFF86CCFA), ImageProvider<Object>? placeholderImage, ImageProvider<Object>? errorImage, TileProvider tileProvider = const CachedNetworkTileProvider(), bool tms = false, WMSTileLayerOptions? wmsOptions = null, double opacity = 1.0, int updateInterval = 200, int tileFadeInDuration = 100, double tileFadeInStart = 0.0, double tileFadeInStartWhenOverride = 0.0, bool overrideTilesWhenUrlChanges = false, bool retinaMode = false, ErrorTileCallBack? errorTileCallback, dynamic rebuild, bool darkMode = false})

Properties

additionalOptions Map<String, String>
Static informations that should replace placeholders in the urlTemplate. Applying API keys is a good example on how to use this parameter.
final
backgroundColor Color
Color shown behind the tiles.
final
darkMode bool
Whether or not to enable dark mode.
final
errorImage ImageProvider<Object>?
Tile image to show in place of the tile that failed to load.
final
errorTileCallback ErrorTileCallBack?
This callback will be execute if some errors by getting tile
final
hashCode int
The hash code for this object.
no setterinherited
keepBuffer int
When panning the map, keep this many rows and columns of tiles before unloading them.
final
key Key?
finalinherited
maxNativeZoom double?
Maximum zoom number the tile source has available. If it is specified, the tiles on all zoom levels higher than maxNativeZoom will be loaded from maxNativeZoom level and auto-scaled.
final
maxZoom double
The maximum zoom level up to which this layer will be displayed (inclusive). In most tile providers goes from 0 to 19.
final
minNativeZoom double?
Minimum zoom number the tile source has available. If it is specified, the tiles on all zoom levels lower than minNativeZoom will be loaded from minNativeZoom level and auto-scaled.
final
minZoom double
final
opacity double
Opacity of the rendered tile
final
overrideTilesWhenUrlChanges bool
false: current Tiles will be first dropped and then reload via new url (default) true: current Tiles will be visible until new ones aren't loaded (new Tiles are loaded independently) @see https://github.com/johnpryan/flutter_map/issues/583
final
placeholderImage ImageProvider<Object>?
Placeholder to show until tile images are fetched by the provider.
final
rebuild Stream<Null>?
finalinherited
retinaMode bool
If true, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subdomains List<String>
List of subdomains for the URL.
final
tileFadeInDuration Duration?
Tiles fade in duration in milliseconds (default 100), it can be null to avoid fade in
final
tileFadeInStart double
Opacity start value when Tile starts fade in (0.0 - 1.0) Takes effect if tileFadeInDuration is not null
final
tileFadeInStartWhenOverride double
Opacity start value when an exists Tile starts fade in with different Url (0.0 - 1.0) Takes effect when tileFadeInDuration is not null and if overrideTilesWhenUrlChanges if true
final
tileProvider TileProvider
Provider to load the tiles. The default is CachedNetworkTileProvider, which loads tile images from network and caches them offline.
final
tileSize double
Size for the tile. Default is 256
final
tms bool
If true, inverses Y axis numbering for tiles (turn this on for TMS services).
final
updateInterval Duration?
Tiles will not update more than once every updateInterval (default 200 milliseconds) when panning. It can be null (but it will calculating for loading tiles every frame when panning / zooming, flutter is fast) This can save some fps and even bandwidth (ie. when fast panning / animating between long distances in short time)
final
urlTemplate String?
Defines the structure to create the URLs for the tiles. {s} means one of the available subdomains (can be omitted) {z} zoom level {x} and {y} — tile coordinates {r} can be used to add "@2x" to the URL to load retina tiles (can be omitted)
final
wmsOptions WMSTileLayerOptions?
If not null, then tiles will pull's WMS protocol requests
final
zoomOffset double
The zoom number used in tile URLs will be offset with this value.
final
zoomReverse bool
If set to true, the zoom number used in tile URLs will be reversed (maxZoom - zoom instead of zoom)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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