Create a new ArcGIS for Android project and display a local map.
1. Preparation: first, configure the android development environment, then install the development control of ArcGIS for Android in Eclipse, and publish the local map service in ArcCatalog. 1 @ Override 2 public void onCreate (Bundle savedInstanceState) {3 super. onCreate (savedInstanceState); 4 setContentView (R. layout. main); 5 6 mMapView = new MapView (this); 7 mMapView. setLayoutParams (new LayoutParams (LayoutParams. FILL_PARENT, LayoutParams. FILL_PARENT); 8 ArcGISDynamicMapServiceLayer mMAP = new ArcGISDynamicMapServiceLayer ("http: // local IP Address/arcgis/rest/services/AChina/MapServer"); 9 mMapView. addLayer (mMAP); 10 setContentView (mMapView); 11}
Note: to display a map, you must use the address of the map service and the IP address of the Local Machine to access the map.
6. Add the above Code, save it, and run it. The following results are displayed:
7. OK. The map is displayed. The next section describes how to remove the "Licensed for Developer Use Only" watermark and ActionBar. Thank you.
I want to use arcgis for android api for offline map navigation on a mobile phone. How can I achieve this?
How do I export data offline? I can only get my own geographic location without a network, but how can I get a map of your route?
A recent android development project can call google Maps, but how to load local detailed local map data (scenic spots)
Add layers. overlay is equivalent to the canvas on the map. You can add your own items.