TileLayerOptions class Null safety
Describes the needed properties to create a tile-based layer. A tile is an image bound to a specific geographical position.
- Inheritance
-
- Object
- LayerOptions
- TileLayerOptions
Constructors
-
TileLayerOptions({Alignment attributionAlignment = Alignment.bottomRight, WidgetBuilder? attributionBuilder, 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, List<String> subdomains = const <String>[], int keepBuffer = 2, Color backgroundColor = const Color(0xFFE0E0E0), ImageProvider<Object> ? placeholderImage, ImageProvider<Object> ? errorImage, TileProvider tileProvider = const NonCachingNetworkTileProvider(), 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, Stream<Null> ? rebuild, TemplateFunction templateFunction = util.template, TileBuilder? tileBuilder, TilesContainerBuilder? tilesContainerBuilder, EvictErrorTileStrategy evictErrorTileStrategy = EvictErrorTileStrategy.none, bool fastReplace = false, Stream<Null> ? reset})
Properties
-
additionalOptions
→ Map<
String, String> -
Static information that should replace placeholders in the urlTemplate.
Applying API keys is a good example on how to use this parameter.
final
- attributionAlignment → Alignment
-
aligment of the attribution text on the map widget
final
- attributionBuilder → WidgetBuilder?
-
Attribution widget builder
final
- backgroundColor → Color
-
Color shown behind the tiles.
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 occur when fetching tiles.
final
- evictErrorTileStrategy → EvictErrorTileStrategy
-
final
- fastReplace → bool
-
This option is useful when you have a transparent layer: rather than
keeping the old layer visible when zooming (resulting in both layers
being temporarily visible), the old layer is removed as quickly as
possible when this is set to
true
(defaultfalse
).final - hashCode → int
-
The hash code for this object.
read-onlyinherited
- 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_ek_osm_map/issues/583final -
placeholderImage
→ ImageProvider<
Object> ? -
Placeholder to show until tile images are fetched by the provider.
final
-
rebuild
→ Stream<
Null> ? -
finalinherited
-
reset
↔ Stream<
Null> ? -
Stream to notify the TileLayer that it needs resetting
read / write
- 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.
read-onlyinherited
-
subdomains
→ List<
String> -
List of subdomains for the URL.
final
- templateFunction → TemplateFunction
-
final
- tileBuilder → TileBuilder?
-
Function which may Wrap Tile with custom Widget
There are predefined examples in 'tile_builder.dart'
final
- tileFadeInDuration → Duration?
-
Tiles fade in duration in milliseconds (default 100). This 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 nullfinal - 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 ifoverrideTilesWhenUrlChanges
if truefinal - tileProvider → TileProvider
-
Provider to load the tiles. The default is
NonCachingNetworkTileProvider()
which doesn't cache tiles and won't retry the HTTP request. UseNetworkTileProvider()
for a provider which will retry requests. For the best caching implementations, see the flutter_ek_osm_map readme.final - tilesContainerBuilder → TilesContainerBuilder?
-
Function which may wrap Tiles Container with custom Widget
There are predefined examples in 'tile_builder.dart'
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 requestsfinal - 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 ofzoom
)final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited