Android Google Maps Talking To Google Maps Enterprise Data?
Is it possible to switch the Android Google Maps code to utilize custom data provided by a Google Enterprise? Details: Google provides an 'enterprise' version of its maps service,
Solution 1:
There is no API for switching the MapView
data source, and since it is not open source, there's no obvious way to change it.
You can, however, use WebView
to embed a standard Web-based Google Maps that could, presumably, come from your "enterprise" edition.
Solution 2:
With the new V2 api on android you can set the tile source by providing a custom TileProvider. I am not familiar with the enterprise offerings, but this should be possible if the tiles are available via a url. The exact implementation will depend on how the tiles are accessed, but here some code to get started:
map.setMapType(GoogleMap.MAP_TYPE_NONE);
TileOverlayOptions options = new TileOverlayOptions();
options.tileProvider(new UrlTileProvider(256, 256) {
@Override
public URL getTileUrl(int x, int y, int z) {
try {
String f = "http://yourURL/%d/%d/%d.png";
return new URL(String.format(f, z, x, y));
}
catch (MalformedURLException e) {
return null;
}
}
});
map.addTileProvider(options);
Post a Comment for "Android Google Maps Talking To Google Maps Enterprise Data?"