Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Google Maps Engine map on Android Maps v2?

I've been looking at creating a custom map using the Google Maps Engine API which looks great. I understand how to create the layer and publish a map. What I don't understand is how I can display that data on an Android device using the Google Maps Android API v2. Is this feature supported at this time?

like image 376
Bobbake4 Avatar asked Jun 06 '13 01:06

Bobbake4


1 Answers

Google Maps Android API v2 does not currently have the equivalent of the MapsEngineLayer as found in the JS API.

However, you can add arbitrary tiles using a TileOverlay, and then use the WMS endpoint of your published and public Maps Engine map.

You can find some example code to do this, including the conversion from WMS requests to tile requests, at https://github.com/saxman/maps-wms-tiles-sample

There is also a video at https://www.youtube.com/watch?feature=player_embedded&v=U6ZbHAXPnhg which demonstrates how this is done, including an example that pulls from Maps Engine.

Alternatively, you could use the Maps Engine API to pull the features as vector data (GeoJSON format in this case) and draw them on the device, rather than having Maps Engine render tile images for you, however this will be a performance hit as you draw more shapes.

like image 87
jlivni Avatar answered Oct 19 '22 21:10

jlivni