TileLayerOptions class
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.
final inherited
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 setter inherited
hasMaxNativeZoom
→ bool
no setter
hasMaxZoom
→ bool
no setter
hasMinNativeZoom
→ bool
no setter
hasMinZoom
→ bool
no setter
hasOnDoubleTap
→ bool
no setter inherited
hasOnLongPress
→ bool
no setter inherited
hasOnLongPressEnd
→ bool
no setter inherited
hasOnLongPressMoveUpdate
→ bool
no setter inherited
hasOnLongPressStart
→ bool
no setter inherited
hasOnLongPressUp
→ bool
no setter inherited
hasOnSecondaryLongPress
→ bool
no setter inherited
hasOnSecondaryLongPressEnd
→ bool
no setter inherited
hasOnSecondaryLongPressMoveUpdate
→ bool
no setter inherited
hasOnSecondaryLongPressStart
→ bool
no setter inherited
hasOnSecondaryLongPressUp
→ bool
no setter inherited
hasOnSecondaryTap
→ bool
no setter inherited
hasOnSecondaryTapCancel
→ bool
no setter inherited
hasOnSecondaryTapDown
→ bool
no setter inherited
hasOnSecondaryTapUp
→ bool
no setter inherited
hasOnTap
→ bool
no setter inherited
hasOnTapCancel
→ bool
no setter inherited
hasOnTapDown
→ bool
no setter inherited
hasOnTapUp
→ bool
no setter inherited
interactive
→ bool
If false
, the layer will not emit touch events
and will act as a part of the underlying map.
final inherited
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 ?
final inherited
onLongPress
→ LongPressLayerCallback ?
final inherited
onLongPressEnd
→ LongPressEndLayerCallback ?
final inherited
onLongPressMoveUpdate
→ LongPressMoveUpdateLayerCallback ?
final inherited
onLongPressStart
→ LongPressStartLayerCallback ?
final inherited
onLongPressUp
→ LongPressUpLayerCallback ?
final inherited
onSecondaryLongPress
→ LongPressLayerCallback ?
final inherited
onSecondaryLongPressEnd
→ LongPressEndLayerCallback ?
final inherited
onSecondaryLongPressMoveUpdate
→ LongPressMoveUpdateLayerCallback ?
final inherited
onSecondaryLongPressStart
→ LongPressStartLayerCallback ?
final inherited
onSecondaryLongPressUp
→ LongPressUpLayerCallback ?
final inherited
onSecondaryTap
→ TapLayerCallback ?
final inherited
onSecondaryTapCancel
→ TapLayerCallback ?
final inherited
onSecondaryTapDown
→ TapDownLayerCallback ?
final inherited
onSecondaryTapUp
→ TapUpLayerCallback ?
final inherited
onTap
→ TapLayerCallback ?
final inherited
onTapCancel
→ TapLayerCallback ?
final inherited
onTapDown
→ TapDownLayerCallback ?
final inherited
onTapUp
→ TapUpLayerCallback ?
final inherited
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 setter inherited
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