Create a new ArcGIS for Android project and display a local map.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.