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

Constructors

MultiMapDataStore.new(DataPolicy dataPolicy)

Properties

boundingBox BoundingBox?
getter/setter pair
dataPolicy DataPolicy
final
hashCode int
The hash code for this object.
no setterinherited
mapDatabases List<Datastore>
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?
getter/setter pair
startZoomLevel int?
getter/setter pair

Methods

addMapDataStore(Datastore mapDataStore, bool useStartZoomLevel, bool useStartPosition) Future<void>
adds another mapDataStore
dispose() → void
override
extractLocalized(String s) String?
Extracts substring of preferred language from multilingual string.
Example multilingual string: "Base\ren\bEnglish\rjp\bJapan\rzh_py\bPin-yin".
inherited
getBoundingBox() Future<BoundingBox>
Returns the area for which data is supplied.
override
getDataTimestamp(Tile tile) Future<int?>
Returns the timestamp of the data used to render a specific tile.
override
getStartPosition() Future<LatLong?>
Gets the initial map position.
override
getStartZoomLevel() Future<int?>
Gets the initial zoom level.
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) Future<void>
setStartPosition(LatLong startPosition) → void
setStartZoomLevel(int startZoomLevel) → void
supportsTile(Tile tile) Future<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