MEMapInfo Class Reference
Inherits from | MEMapFileInfo : NSObject |
Declared in | MEMapInfo.h MEMapInfo.m |
Overview
Describes a map layer and options for it. Used when adding a map or inquiring about map. There are several sub-classes of MEMapInfo. When adding a map, you create an MEMapInfo object of the appropriate type, populate its properties and then call MEMapViewController addMapUsingMapInfo passing in the MEMapInfo object.
There are several possible map types:
- kMapTypeUnknown: Default. Will result in a warning if you have verbose messages enabled.
- kMapTypeFileTerrain: Disk-based terrain map generated by metool.
- kMapTypeFileTerrainTAWS: Disk-based terrain map drawn with a terrain proximity color-bar.
- kMapTypeFileRaster: Disk-based raster map generated by metool.
- kMapTypeFileRasterPVR: Disk-based raster map comprised of PVR-compressed textures with headers, generated by metool.
- kMapTypeFileRasterPVR_RAW: Disk-based raster map comprised of PVR-compressed textures without headers, generated by metool.
- kMapTypeVirtualRaster: A map in which data will be supplied by an METileProvider-derived object.
- kMapTypeVirtualRasterAnimated: A multi-frame animated map in which data will be supplied by an METileProvider-derived object.
- kMapTypeFileVector: Disk-based vector map generated by metool.
- kMapTypeDynamicVector: In-memory vector map in which lines, polygons, and vector markers are dynamically added or removed.
- kMapTypeFileMarker: Disk-based marker map generated by metool.
- kMapTypeFileMarkerCreate: Instructs the mapping engine to create and write out a clustered marker map with the supplied markers.
- kMapTypeMemoryMarker: In-memory clustered marker map. Added using an array of MEMarker objects. Marker images will be requested as needed from the delegate.
- kMapTypeDynamicMarker: In-memory dynamic marker map to which markers can be added and later have their positions updated. Marker images will be requested as needed from the delegate.
- kMapTypeFileMBTiles: Disk-based mbtiles map generated with the MapBox TileMill program.
When adding a map you must select the appropriate MEMapInfo object type.
- MEMapInfo: Terrain and raster maps generated with metool.
- MEMBTilesMapInfo: MapBox mbtiles file.
- MEMarkerMapInfo: Any marker map type.
- MEVectorMapInfo: Any vector map type.
- MEVirtualMapInfo: Non-animated maps for which you will provide the data via an METileProvider-derived object.
- MEAnimatedVirtualMapInfo: Animated maps for which you will provide the data via an METileProvider-derived object.
Different maps can have different content types and loading strategies.
Content types meanings:
- kZoomDependent: The map is comprised of different imagery at different zoom levels. This would apply to almost all internet-based street maps where the level of detail of the data increases as you zoom in. This would not apply to most aerial or satellite image. When using content of this type, you will might want to set tileLevelBiasing to 1.0 which will force tiles to always be of the same level (at a memory cost).
- kZoomIndependent: The map is created by sampling a large fixed raster data set (satellite images, scanned FAA sectionals, aerial photographs, etc.).
Controlling loading strategies:
- kLowestDetailFirst: The currently viewed area of the map is loaded from the lowest detail to the highest. This costs more in terms of loading time but if maps are local, can result in a smoother feel when zooming and panning.
- kHighestDetailOnly: Only the detail level currently in view is loaded. Generally faster for internet-based virtual maps.
For marker maps:
- kMarkerImageLoadingAsynchronous: Marker map delegate will receive requests for images, as-needed, on a background thread. Good for when you have hundreds of thousands of markers and loading speed is not super important.
- kMarkerImageLoadingSynchronous: Marker map delegate will receive requests for iamges, as-needed, on the primary thread. Good for when you have hundreds of markers and loading speed is important.
- kMarkerImageLoadingPrecached: Marker images are pre-cached with the mapping engine. There is no separate loading step. This is good for limited use when you need the fastest possible display.
Tasks
-
mapType
property -
mapLoadingStrategy
property -
name
property -
zOrder
property -
maxLevel
property -
priority
property -
alpha
property -
isVisible
property -
compressTextures
property -
minX
property -
minY
property -
maxX
property -
maxY
property -
borderPixelCount
property -
defaultTileName
property
Properties
alpha
0 to 1 value for the map alpha. 0 is invisible, 1 is opaque.
@property (assign) double alpha
Declared In
MEMapInfo.h
borderPixelCount
Specifies number of pixels that border each tile.
@property (assign) unsigned int borderPixelCount
Declared In
MEMapInfo.h
compressTextures
Whether or not to compress textures for this map to 2 byte formats.
@property (assign) BOOL compressTextures
Declared In
MEMapInfo.h
defaultTileName
Specifies the name of the pre-loaded default tile to render while tiles are being loaded or to use when a tile is not available.
@property (retain) NSString *defaultTileName
Declared In
MEMapInfo.h
isVisible
Whether or not the map is vibile.
@property (assign) BOOL isVisible
Declared In
MEMapInfo.h
mapLoadingStrategy
Map loading strategy type.
@property (assign) MEMapLoadingStrategy mapLoadingStrategy
Declared In
MEMapInfo.h
maxLevel
Maximum detail level of the map. (Specified for in-memory marker maps and virtual maps).
@property (assign) unsigned int maxLevel
Declared In
MEMapInfo.h