MarkerDataStore class

Holds a collection of markers. Marker could mark a POI (e.g. restaurants) or ways (e.g. special interest areas)

Inheritance

Constructors

MarkerDataStore({int extendMeters = 5000})

Properties

disposed bool
no setterinherited
extendMeters int
how large to extend a bounding area. When retrieving markers we extend the bounding area a bit. By doing so we retrieve a bit more markers than actually needed right now but we do not need to retrieve markers again as long as the view does not extend the extended bounding area by moving the map outside. This saves cpu. Measurements in meters.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMarker(Marker marker) → void
Adds a new marker. Note that you may need to call setRepaint() afterwards. It is not called automatically because often we want to modify many markers at once without repainting after every modification.
clearMarkers() → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
getAllMarkers() List<Marker>
getMarkersToPaint(BoundingBox boundary, int zoomLevel) List<Marker>
returns the markers to draw for the given boundary. If this method needs more time return an empty list and call setRepaint() when finished.
override
isTapped(TapEvent tapEvent) List<Marker>
called if the user taps at the screen. The method will return a list of markers which are considered as "tapped by the user"
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
https://stackoverflow.com/questions/63884633/unhandled-exception-a-changenotifier-was-used-after-being-disposed
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeMarker(Marker marker) → void
retrieveMarkersFor(BoundingBox boundary, int zoomLevel) → void
This method will be called if boundary or zoomlevel changes to give the implementation the chance to replace/retrieve markers for the new boundary/zoomlevel. If this method changes something asynchronously it must call setRepaint afterwards.
setRepaint() → void
Triggers a repaint of the markers for this datastore
inherited
toString() String
A string representation of this object.
inherited
updateMarker(Marker marker) → void
Updates the marker. The marker was already updated but the position changed so it may not be in the _previousMarkers list

Operators

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