MultiMapDataStore class
A MapDatabase that reads and combines data from multiple map files. The MultiMapDatabase supports the following modes for reading from multiple files:
- RETURN_FIRST: the data from the first database to support a tile will be returned. This is the fastest operation suitable when you know there is no overlap between map files.
- RETURN_ALL: the data from all files will be returned, the data will be combined. This is suitable if more than one file can contain data for a tile, but you know there is no semantic overlap, e.g. one file contains contour lines, another road data.
- DEDUPLICATE: the data from all files will be returned but duplicates will be eliminated. This is suitable when multiple maps cover the different areas, but there is some overlap at boundaries. This is the most expensive operation and often it is actually faster to double paint objects as otherwise all objects have to be compared with all others.
- Inheritance
-
- Object
- Datastore
- MapDataStore
- MultiMapDataStore
Constructors
- MultiMapDataStore(DataPolicy dataPolicy)
Properties
- boundingBox ↔ BoundingBox?
-
Returns the area for which data is supplied.
getter/setter pairoverride-getter
- dataPolicy → DataPolicy
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mapDatabases
→ List<
MapDataStore> -
final
- preferredLanguage → String?
-
the preferred language when extracting labels from this data store. The actual
implementation is up to the concrete implementation, which can also simply ignore
this setting.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startPosition ↔ LatLong?
-
Gets the initial map position.
getter/setter pairoverride-getter
- startZoomLevel ↔ int?
-
Gets the initial zoom level.
getter/setter pairoverride-getter
Methods
-
addMapDataStore(
MapDataStore mapDataStore, bool useStartZoomLevel, bool useStartPosition) → void - adds another mapDataStore
-
extractLocalized(
String s) → String? -
Extracts substring of preferred language from multilingual string using
the preferredLanguage setting.
inherited
-
getDataTimestamp(
Tile tile) → int? -
Returns the timestamp of the data used to render a specific tile.
override
-
lateOpen(
) → Future< void> -
Open file descriptors
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readLabels(
Tile upperLeft, Tile lowerRight) → Future< DatastoreReadResult?> -
Reads data for an area defined by the tile in the upper left and the tile in
the lower right corner. The default implementation combines the results from
all tiles, a possibly inefficient solution.
Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
override
-
readLabelsSingle(
Tile tile) → Future< DatastoreReadResult?> -
Reads only labels for tile. Labels are pois as well as ways that carry a name tag.
It is permissible for the MapDataStore to return more data.
This default implementation returns all map data, which is inefficient, but works.
override
-
readMapData(
Tile upperLeft, Tile lowerRight) → Future< DatastoreReadResult?> -
Reads data for an area defined by the tile in the upper left and the tile in
the lower right corner. The default implementation combines the results from
all tiles, a possibly inefficient solution.
Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
override
-
readMapDataSingle(
Tile tile) → Future< DatastoreReadResult?> -
Reads data for tile.
override
-
readPoiData(
Tile upperLeft, Tile lowerRight) → Future< DatastoreReadResult?> -
Reads POI data for an area defined by the tile in the upper left and the tile in
the lower right corner. The default implementation combines the results from
all tiles, a possibly inefficient solution.
Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
override
-
readPoiDataSingle(
Tile tile) → Future< DatastoreReadResult?> -
Reads only POI data for tile.
override
-
removeAllDatastores(
) → void -
removeMapDataStore(
double minLatitude, double minLongitude, double maxLatitude, double maxLongitude) → void -
setStartPosition(
LatLong startPosition) → void -
setStartZoomLevel(
int startZoomLevel) → void -
supportsTile(
Tile tile, Projection projection) → bool -
Returns true if MapDatabase contains the given tile.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
wayAsLabelTagFilter(
List< Tag> tags) → bool -
Returns true if a way should be included in the result set for readLabels()
By default only ways with names, house numbers or a ref are included in the result set
of readLabels(). This is to reduce the set of ways as much as possible to save memory.
@param tags the tags associated with the way
@return true if the way should be included in the result set
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited