Imagery class abstract

A data container for an imagery layer. Fields are based on the editor layer index, and just the identifier and type are required. This is the super-class for the multitude of implementations, including TMS, WMS, and vector tiles.

Implementers

Constructors

Imagery({required String id, ImageryCategory? category, String? name, MultiIcon? icon, String? attribution, bool best = false, bool overlay = false})
Create a new instance of imagery.
const

Properties

attribution → String?
Imagery attribution. Displayed in a corner for most maps.
final
best → bool
Whether this imagery is the best imagery for the region. Might affect sorting.
final
category → ImageryCategory?
Imagery category. Not really used anywhere.
final
hashCode → int
The hash code for this object.
no setteroverride
icon → MultiIcon?
Icon to display.
final
id → String
Identifier of the imagery. Should be unique for every layer.
final
kUserAgentPackageName → String
Package name to send to servers.
final
name → String?
Display name, shown in lists when choosing an imagery layer.
final
overlay → bool
Whether this imagery is an overlay. Not used currently.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildLayer({bool reset = false}) → Widget
Builds the widgets to add to the FlutterMap. Note that this method is called on every widget rebuild, which can happen like 60 times a second. Do cache things.
initialize() → Future<void>
Initialize layer state. May be useful when needed to make some async request, e.g. to download data from an URL. Executed by imageryProvider when the layer is chosen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override