MapFile class

A class for reading binary map files. The mapFile should be disposed if not needed anymore

Inheritance

Properties

boundingBox BoundingBox
Returns the area for which data is supplied.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
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
readBufferSource ↔ ReadbufferSource?
just to see if we should create a cache for blocks
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startPosition LatLong?
Gets the initial map position.
no setteroverride
startZoomLevel int?
Gets the initial zoom level.
no setteroverride
timestamp int?
final
zoomLevelMax int
getter/setter pair
zoomLevelMin int
getter/setter pair

Methods

dispose() → void
extractLocalized(String s) String?
Extracts substring of preferred language from multilingual string using the preferredLanguage setting.
inherited
getDataTimestamp(Tile tile) int?
Returns the creation timestamp of the map file.
override
getMapFileHeader() → MapFileHeader
@return the header data for the current map file.
getMapFileInfo() → MapFileInfo
@return the metadata for the current map file. Make sure lateOpen is already executed
getMapLanguages() List<String>?
@return the map file supported languages (may be null).
lateOpen() Future<void>
Open file descriptors
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processBlocks(ReadbufferSource readBufferSource, QueryParameters queryParameters, SubFileParameter subFileParameter, BoundingBox boundingBox, MapfileSelector selector) Future<DatastoreReadResult>
don't make this method private since we are using it in the example APP to analyze mapfiles
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. Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
override
readLabelsSingle(Tile tile) Future<DatastoreReadResult>
Reads only labels for tile.
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. Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
override
readMapDataSingle(Tile tile) Future<DatastoreReadResult>
Reads all map data for the area covered by the given tile at the tile zoom level.
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. This implementation takes the data storage of a MapFile into account for greater efficiency.
override
readPoiDataSingle(Tile tile) Future<DatastoreReadResult?>
Reads only POI data for tile.
override
restrictToZoomRange(int minZoom, int maxZoom) → void
Restricts returns of data to zoom level range specified. This can be used to restrict the use of this map data base when used in MultiMapDatabase settings.
supportsTile(Tile tile, Projection projection) bool
Returns true if MapDatabase contains the given tile.
override
toString() String
A string representation of this object.
override
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

Static Properties

BITMASK_INDEX_OFFSET int
Bitmask to extract the block offset from an index entry.
final
BITMASK_INDEX_WATER int
Bitmask to extract the water information from an index entry.
final
complete bool
for debugging purposes
final
DEFAULT_START_ZOOM_LEVEL int
Default start zoom level.
final
INDEX_CACHE_SIZE int
Amount of cache blocks that the index cache should store.
final
INVALID_FIRST_WAY_OFFSET String
Error message for an invalid first way offset.
final
SIGNATURE_LENGTH_BLOCK int
Length of the debug signature at the beginning of each block.
final

Static Methods

from(String filename, int? timestamp, String? language, {ReadbufferSource? source}) Future<MapFile>
using(Uint8List content, int? timestamp, String? language) Future<MapFile>