Add Google map or bing as base layer in ArcGIS api for android

1.3k views Asked by At

I'm using the ArcGIS Runtime SDK for Android to build my application. I want to add a Google map as the basemap. Is that possible? Can I use ArcGISFeatureLayer to add a Google map layer or other layer to my MapView?

1

There are 1 answers

2
Gary Sheppard On BEST ANSWER

Use the BingMapsLayer class to add a Bing Maps layer to the MapView. You'll need to obtain a Bing Maps key from Microsoft.

There's no direct interface for adding Google Maps to the MapView. But you could try extending TiledServiceLayer if you must use Google Maps. Do a web search for "extends TiledServiceLayer" for examples. Here's an example that uses Google Maps, though I don't know if it works, and I don't know if it abides by Google's terms of service.

You should also consider the easier and no-cost options of ArcGIS Online basemaps (see ArcGISTiledMapServiceLayer) and OpenStreetMap (see OpenStreetMapLayer).

In any case, ArcGISFeatureLayer is not the right class to use for a tiled basemap. It's for feature services.