MemoryDatastore class
In-memory datastore implementation for testing and dynamic tile generation.
This datastore holds all map data in memory using simple lists, making it suitable for testing, prototyping, or scenarios where map data is generated dynamically at runtime.
Key characteristics:
- Fast access to data (no I/O operations)
- Limited by available memory
- Supports adding POIs and ways programmatically
- Implements basic spatial filtering by tile boundaries
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pointOfInterests
→ List<
PointOfInterest> -
Collection of Points of Interest stored in memory.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
ways
→ List<
Way> -
Collection of ways (roads, paths, boundaries) stored in memory.
final
Methods
-
addPoi(
PointOfInterest poi) → void - Adds a Point of Interest to the in-memory collection.
-
addWay(
Way way) → void - Adds a way to the in-memory collection.
-
dispose(
) → void - Clears all stored data from memory.
-
getBoundingBox(
) → Future< BoundingBox> - Returns the maximum possible bounding box as this datastore has no fixed bounds.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readLabels(
Tile upperLeft, Tile lowerRight) → Future< DatastoreBundle> - Reads label data for a rectangular area defined by two corner tiles.
-
readLabelsSingle(
Tile tile) → Future< DatastoreBundle> - Reads label data for a single tile.
-
readMapData(
Tile upperLeft, Tile lowerRight) → Future< DatastoreBundle> - Reads complete map data for a rectangular area.
-
readMapDataSingle(
Tile tile) → Future< DatastoreBundle> - Reads map data for a single tile by filtering stored data.
-
readPoiData(
Tile upperLeft, Tile lowerRight) → Future< DatastoreBundle> - Reads POI data for a rectangular area defined by corner tiles.
-
readPoiDataSingle(
Tile tile) → Future< DatastoreBundle> - Reads Point of Interest (POI) data for a single tile.
-
supportsTile(
Tile tile) → Future< bool> - Always returns true as memory datastore can generate tiles on demand.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited