Arcgis Android manually build the development environment

Source: Internet
Author: User

Objective

This article is for you to share the manual build process of the ArcGIS Android environment, by default you know a certain Java and Android basics, already have the Android development environment. If you lack the above environment and knowledge, please add it yourself.

Version Introduction

Arcgis Android from version 2.0 to now (2015-08-31) the latest 10.2.6 version, in the middle there are several small versions, briefly. The 10 series is the newer series, and the 2.0 series is a relic. Where 10.2.4 started supporting shapefiles and some raster data, please refer here for details. If you remember correctly, at the beginning of the 10.2.2 series, the Graphiclayer is more efficient than the lower version. The 10.2.5 version is no longer supported by the Eclipse plug-in, and it is recommended to use the 10.2.4 version if you want to build the development environment using the Eclipse plugin. Officials have begun to turn to support Android studio. Overall, it's better to use the new version as much as possible, as illustrated by the example of Eclispe manually building ArcGIS Android 10.2.6.

ArcGIS Android 10.2.6 Download, Volume 1, Sub-volume 2. (using the sub-volume compression, 2 are downloaded and then decompressed)

Specific steps

1. Create a new Android project.

2. Unzip the ArcGIS android10.2.6 Tarball, locate the Libs folder, and copy the folders and jars under the Libs folder to the Libs folder of the Android project.

3. Add the following code to the Androidmanifest.xml

<uses-permissionAndroid:name= "Android.permission.INTERNET" /><uses-permissionAndroid:name= "Android.permission.ACCESS_FINE_LOCATION" /><uses-permissionAndroid:name= "Android.permission.WRITE_EXTERNAL_STORAGE" /><uses-featureandroid:glesversion= "0x00020000"android:required= "true"/>
Start Project
<com.esri.android.map.mapview    xmlns:android= "http://schemas.android.com/apk/res/android"    android:id = "@+id/mapview"    android:layout_width= "fill_parent"    android:layout_height= "fill_parent"    />

Add a map control to XML

and add a map to the show.

Mapview Mmapview; Arcgistiledmapservicelayer tilelayer; @Overrideprotected void OnCreate (Bundle savedinstancestate) {    Super.oncreate (savedinstancestate);    Setcontentview (r.layout.activity_main);    mmapview= (Mapview) Findviewbyid (R.id.mapview);    Tilelayer = new Arcgistiledmapservicelayer (            "Http://services.arcgisonline.com/ArcGIS/rest/services/World_ Street_map/mapserver ");    ADD tiled layer to Mapview    mmapview.addlayer (tilelayer);}

Try adding a HelloWorld.

Let's take a look at the real-machine test.

Precautions:

1. Due to the loading of the Basemap, network access is required to ensure that WiFi or data networks are connected

2. Check the Enable GPU in the simulator creation option when testing simulator

It's done.

Arcgis Android manually build the development environment

Related Article

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.