AnsweredAssumed Answered

first map not drawing

Question asked by fallingdog on Oct 28, 2012
Latest reply on Oct 30, 2012 by fallingdog
I have created simple service on my server and I'm trying to display it on a android device. However when I run the code all I get is a gray screen.

The java code:

import android.app.Activity; import android.os.Bundle;   import com.esri.android.map.MapView; import com.esri.android.map.ags.ArcGISDynamicMapServiceLayer;    public class MyPath_v02Activity extends Activity {    MapView mMapView = null;  private ArcGISDynamicMapServiceLayer dynamicLayer;      /** Called when the activity is first created. */     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);    mMapView = (MapView)findViewById(R.id.map);   dynamicLayer = new ArcGISDynamicMapServiceLayer("http://anc-arcsrv-01.ua.ad.alaska.edu/arcgis/services/myPath_v8/MapServer/MobileServer");   mMapView.addLayer(dynamicLayer);        }   @Override   protected void onDestroy() {    super.onDestroy();  }  @Override  protected void onPause() {   super.onPause();   mMapView.pause();  }  @Override  protected void onResume() {   super.onResume();    mMapView.unpause();  }  }


and the xml code in "main":

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     tools:context=".MyPath_v02Activity"     > <com.esri.android.map.MapView     android:id="@+id/map"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     initExtent = " -16713385.63038, 8560546.73163, -16546828.73922, 8746032.94837">    </com.esri.android.map.MapView> </LinearLayout>


I made the assumption that the args for initExtent are x min, y min, x max, and y max and I got the values from REST services dir.

I there some thing simple that I'm doing wrong. Thnaks for any help.

Outcomes