Skip to content

Other included layers

nutiteq edited this page Jan 21, 2013 · 3 revisions

Following is list of bundled layer classes. Detailed instructions and code samples are yet to be added. See other classes in the wiki page.

Raster layers

TMSMapLayer

Most common online map layer type, for "google maps" style tiled map sources. You can use it for free providers like OpenStreetMap, MapQuest, also commercial providers like CloudMade, Navteq MapTP. You define base URL for tiles and that's it.

MBTilesMapLayer

Read offline maps from MBTiles format database file via SQLite.

PackagedMapLayer

Put map tiles to /res/raw/tz_x_y.png files for offline usage, so they are bundled with the app. Easy to set up, but there are limits how big .apk file can become (officially 50MB, but many users would already hate so big installer) , so you can put limited number of map tiles there in practise.

StoredMapLayer

Special format coming from the vintage MGMaps application (MGM). Similar to MBTiles in principle, but instead of sqlite uses set of files. Provided for legacy support reasons, for new apps we suggest MBTiles instead.

Vector layers

GeometryLayer

You can add VectorObjects using API calls: Points, Lines, Polygons

MarkerLayer

Special layer to add Markers and DynamicMarkers. Marker is pin on map which is shown as "standing up" in 2.5 view mode

TextLayer

Text objects. It is useful to have base map without labels, and add labels as TextLayer, this way you have texts with correct orientation, when map is rotated.

Own map layer

Last but not least - in application you define own map layer types by extending VectorLayer, RasterLayer or some existing other layer.

Clone this wiki locally