-
Notifications
You must be signed in to change notification settings - Fork 75
Other included layers
Here are some layer class descriptions. Detailed instructions and code samples are yet to be added.
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.
Read offline maps from MBTiles format database file via SQLite.
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.
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.
Experimental layer which uses Mapsforge - free offline vector-based map rendering system as map tile source. As Mapsforge uses efficient vector format for data storage, then data packages are significantly smaller than with e.g. MBTiles, and you have some other vector advantages like possibility to restyle offline maps, and make some queries (e.g. have interactive POI layer) on same dataset.
You can add VectorObjects using API calls: Points, Lines, Polygons
Loads data from Spatialite database file. Supports spatial indexes for large datasets; so it scales to millions of objects quite well. NB! Spatialite library (as native, can be prebuilt package) has to be added to app project to use this, it is not included with the sample project.
Special layer to add Markers and DynamicMarkers. Marker is pin on map which is shown as "standing up" in 2.5 view mode
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.
Can add 3D polygons via API. 3D polygon means polygon with height, it does not support more complex objects. It is useful for rendering simple data, e.g. OpenStreetMap buildings or building footprints from other sources
Load 3D polygons from Spatialite file, where data is given as normal polygons, so just height is applied to them to create 3D look.
Load 3D models - real models with textures - from SQLite database in special mobile-optimised 3D format (NML). We have special converter which creates NML files from KMZ (as exported from SketchUp or Google 3D Warehouse). This supports most Collada features like textures, meshes etc.
Last but not least - in application you define own map layer types by extending VectorLayer, RasterLayer or some existing other layer.