<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <!-- MapView layout and initial extent --> <com.esri.android.map.MapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" initExtent = "-1.3296373526814876E7 3930962.41823043 -1.2807176545789773E7 4201243.7502468005">. <com.esri.android.map.ags.ArcGISFeatureLayer Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2" mode="snapshot" /> </com.esri.android.map.MapView> </LinearLayout>
public class AndroidTestingActivity extends Activity { MapView map = null; /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Retrieve the map and initial extent from XML layout map = (MapView)findViewById(R.id.map); // Add dynamic layer to MapView map.addLayer(new ArcGISTiledMapServiceLayer("" + "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer")); map.addLayer(new ArcGISDynamicMapServiceLayer("" + "http://gis.logis.org/arcgis/rest/services/MG_Test/MapServer/5"));
map.addLayer(new ArcGISFeatureLayer("" + "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"));
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.