TileLayerOptions class

Inheritance
Implementers

Constructors

TileLayerOptions({String? templateUrl, dynamic bounds, dynamic subdomains = 'abc', num? tileSize = tileSizeDef, double? minZoom = minZoomDef, double? maxZoom = maxZoomDef, double? opacity = tileOpacityDef, double? minNativeZoom, double? maxNativeZoom, bool? zoomReverse = zoomReverseDef, double? zoomOffset = zoomOffsetDef, int? keepBuffer = keepBufferDef, ImageProvider<Object>? placeholderImage, ImageProvider<Object>? errorImage, bool updateWhenZooming = updateWhenZoomingDef, int updateInterval = updateTileIntervalDef, int tileFadeInDuration = tileFadeInDurationDef, Curve tileFadeInCurve = tileFadeInCurveDef, double? tileFadeInStart = tileFadeInStartDef, double? tileFadeInStartWhenOverride = tileFadeInStartWhenOverrideDef, bool? overrideTilesWhenUrlChanges = overrideTilesWhenUrlChangesDef, bool? retinaMode = retinaModeDef, dynamic onTileError(Tile, dynamic)?, TileProvider? tileProvider = tileProviderDef, bool tms = tmsDef, Map<String, dynamic>? additionalOptions = const <String, dynamic>{}, bool interactive = interactiveDef, String attribution = attributionDef, TapLayerCallback? onTap, TapUpLayerCallback? onTapUp, TapDownLayerCallback? onTapDown, TapLayerCallback? onTapCancel, TapLayerCallback? onSecondaryTap, TapDownLayerCallback? onSecondaryTapDown, TapUpLayerCallback? onSecondaryTapUp, TapLayerCallback? onSecondaryTapCancel, DoubleTapLayerCallback? onDoubleTap, LongPressLayerCallback? onLongPress, LongPressStartLayerCallback? onLongPressStart, LongPressMoveUpdateLayerCallback? onLongPressMoveUpdate, LongPressUpLayerCallback? onLongPressUp, LongPressEndLayerCallback? onLongPressEnd, LongPressLayerCallback? onSecondaryLongPress, LongPressStartLayerCallback? onSecondaryLongPressStart, LongPressMoveUpdateLayerCallback? onSecondaryLongPressMoveUpdate, LongPressUpLayerCallback? onSecondaryLongPressUp, LongPressEndLayerCallback? onSecondaryLongPressEnd})

Properties

additionalOptions Map<String, dynamic>?
final
attribution String
String to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.
finalinherited
bounds LatLngBounds?
If set, tiles will only be loaded inside the set LatLngBounds.
final
errorImage ImageProvider<Object>?
Tile image to show in place of the tile that failed to load.
final
hasBounds bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMaxNativeZoom bool
no setter
hasMaxZoom bool
no setter
hasMinNativeZoom bool
no setter
hasMinZoom bool
no setter
hasOnDoubleTap bool
no setterinherited
hasOnLongPress bool
no setterinherited
hasOnLongPressEnd bool
no setterinherited
hasOnLongPressMoveUpdate bool
no setterinherited
hasOnLongPressStart bool
no setterinherited
hasOnLongPressUp bool
no setterinherited
hasOnSecondaryLongPress bool
no setterinherited
hasOnSecondaryLongPressEnd bool
no setterinherited
hasOnSecondaryLongPressMoveUpdate bool
no setterinherited
hasOnSecondaryLongPressStart bool
no setterinherited
hasOnSecondaryLongPressUp bool
no setterinherited
hasOnSecondaryTap bool
no setterinherited
hasOnSecondaryTapCancel bool
no setterinherited
hasOnSecondaryTapDown bool
no setterinherited
hasOnSecondaryTapUp bool
no setterinherited
hasOnTap bool
no setterinherited
hasOnTapCancel bool
no setterinherited
hasOnTapDown bool
no setterinherited
hasOnTapUp bool
no setterinherited
interactive bool
If false, the layer will not emit touch events and will act as a part of the underlying map.
finalinherited
isRetinaMode bool
no setter
keepBuffer int?
When panning the map, keep this many rows and columns of tiles before unloading them.
final
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?
The minimum zoom level down to which this layer will be displayed (inclusive).
final
onDoubleTap DoubleTapLayerCallback?
finalinherited
onLongPress LongPressLayerCallback?
finalinherited
onLongPressEnd LongPressEndLayerCallback?
finalinherited
onLongPressMoveUpdate LongPressMoveUpdateLayerCallback?
finalinherited
onLongPressStart LongPressStartLayerCallback?
finalinherited
onLongPressUp LongPressUpLayerCallback?
finalinherited
onSecondaryLongPress LongPressLayerCallback?
finalinherited
onSecondaryLongPressEnd LongPressEndLayerCallback?
finalinherited
onSecondaryLongPressMoveUpdate LongPressMoveUpdateLayerCallback?
finalinherited
onSecondaryLongPressStart LongPressStartLayerCallback?
finalinherited
onSecondaryLongPressUp LongPressUpLayerCallback?
finalinherited
onSecondaryTap TapLayerCallback?
finalinherited
onSecondaryTapCancel TapLayerCallback?
finalinherited
onSecondaryTapDown TapDownLayerCallback?
finalinherited
onSecondaryTapUp TapUpLayerCallback?
finalinherited
onTap TapLayerCallback?
finalinherited
onTapCancel TapLayerCallback?
finalinherited
onTapDown TapDownLayerCallback?
finalinherited
onTapUp TapUpLayerCallback?
finalinherited
onTileError → (dynamic Function(Tile, dynamic)?)
This callback will be execute if some errors by getting tile
final
opacity double?
Opacity of the tiles.
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)
final
placeholderImage ImageProvider<Object>?
Placeholder to show until tile images are fetched by the provider.
final
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>
Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.
final
templateUrl 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
tileFadeInCurve Curve
Tiles fade in curve. Default: Curves.easeInOut
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?
The type of tile provider used to load tiles.
final
tileSize Size
Size for the tile. Default is 256 x 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
updateWhenZooming bool
By default, a smooth zoom animation (during a touch zoom or a flyTo()) will update grid layers every integer zoom level.
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

copy({String? templateUrl, dynamic subdomains, dynamic bounds, num? tileSize, double? minZoom, double? maxZoom, double? opacity, double? minNativeZoom, double? maxNativeZoom, bool? zoomReverse, double? zoomOffset, int? keepBuffer, ImageProvider<Object>? placeholderImage, ImageProvider<Object>? errorImage, int? updateInterval, int? tileFadeInDuration, Curve? tileFadeInCurve, double? tileFadeInStart, double? tileFadeInStartWhenOverride, bool? overrideTilesWhenUrlChanges, bool? retinaMode, dynamic onTileError(Tile, dynamic)?, TileProvider? tileProvider, bool? tms, Map<String, String>? additionalOptions, bool? interactive, String? attribution, TapLayerCallback? onTap, TapUpLayerCallback? onTapUp, TapDownLayerCallback? onTapDown, TapLayerCallback? onTapCancel, TapLayerCallback? onSecondaryTap, TapDownLayerCallback? onSecondaryTapDown, TapUpLayerCallback? onSecondaryTapUp, TapLayerCallback? onSecondaryTapCancel, DoubleTapLayerCallback? onDoubleTap, LongPressLayerCallback? onLongPress, LongPressStartLayerCallback? onLongPressStart, LongPressMoveUpdateLayerCallback? onLongPressMoveUpdate, LongPressUpLayerCallback? onLongPressUp, LongPressEndLayerCallback? onLongPressEnd, LongPressLayerCallback? onSecondaryLongPress, LongPressStartLayerCallback? onSecondaryLongPressStart, LongPressMoveUpdateLayerCallback? onSecondaryLongPressMoveUpdate, LongPressUpLayerCallback? onSecondaryLongPressUp, LongPressEndLayerCallback? onSecondaryLongPressEnd}) TileLayerOptions
override
getBaseUrl(Crs crs) String?
getTemplateUrl(Crs crs, Coordinate? coordinate) String?
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