VectorTileLayer class

A widget for a vector tile layer, to be used as a child of a FlutterMap. See readme for details.

Inheritance

Constructors

VectorTileLayer({Key? key, required TileProviders tileProviders, required Theme theme, SpriteStyle? sprites, Duration fileCacheTtl = defaultCacheTtl, int memoryTileCacheMaxSize = defaultTileCacheMaxSize, int memoryTileDataCacheMaxSize = defaultTileDataCacheMaxSize, int fileCacheMaximumSizeInBytes = defaultCacheMaxSize, int textCacheMaxSize = defaultTextCacheMaxSize, int concurrency = defaultConcurrency, TileOffset tileOffset = TileOffset.DEFAULT, int maximumTileSubstitutionDifference = defaultMaxTileSubstitutionDifference, Theme? backgroundTheme, bool showTileDebugInfo = false, bool logCacheStats = false, VectorTileLayerMode layerMode = VectorTileLayerMode.raster, double? maximumZoom, Duration tileDelay = const Duration(milliseconds: 0), Future<Directory> cacheFolder()?})

Properties

backgroundTheme → Theme?
Draws background from a vector tile source when available For vector layerMode only, ignored otherwise.
final
cacheFolder → (Future<Directory> Function()?)
A function that resolves a folder for filesystem caching. If unspecified, defaults to a subfolder of the temporary directory. Applications that wish to delete persistent cache data should specify this function.
final
concurrency int
The level of concurrency to use, must be >= 0. When set to 1 or higher, isolates are used for computations to offload expensive operations from the UI thread. This setting has no effect in debug mode.
final
fileCacheMaximumSizeInBytes int
the maximum size of the file-based cache in bytes. the cache does a good-enough effort to keep the cache size within the specified limit, however the size can exceed the specified limit from time to time.
final
fileCacheTtl Duration
the time to live of items in the file cache consider the terms of your tile provider service and the desired freshness of map data when setting this value
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layerMode VectorTileLayerMode
The mode of rendering. See VectorTileLayerMode for more details.
final
logCacheStats bool
Indicates whether to log cache stats
final
maximumTileSubstitutionDifference int
The maximum zoom difference when substituting tiles while overlapping tiles are loading. A higher zoom difference results in lower chance of a blank map while loading tiles to display. A larger zoom difference requires more memory and can result in an application exceeding available memory, resulting in a crash. To avoid substituting tiles, use a value of 0. For vector layerMode only, ignored otherwise.
final
maximumZoom double?
The maximum zoom of the tile layer, for raster layerMode only.
final
memoryTileCacheMaxSize int
The maximum size in bytes of the memory vector tile cache.
final
memoryTileDataCacheMaxSize int
The maximum size in tiles of the memory vector tile cache. Differs from memoryTileCacheMaxSize in that this is the cache of parsed vector tiles, whereas memoryTileCacheMaxSize is the raw tile data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showTileDebugInfo bool
Indicates whether debug information should be shown for tiles For vector layerMode only, ignored otherwise.
final
sprites SpriteStyle?
the sprites to be used when rendering tiles
final
textCacheMaxSize int
The maximum size of the text cache.
final
theme → Theme
the theme used to render tiles
final
tileDelay Duration
The delay that should be applied to tile loading, useful for slowing down the map to observe how it behaves as tiles are loading
final
tileOffset TileOffset
The tile offset, defaults to TileOffset.DEFAULT. See TileOffset.mapbox.
final
tileProviders TileProviders
provides vector tiles, by source ID where the source ID corresponds to a source in the theme
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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