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; import android.os.Bundle;   import; import;    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(;   dynamicLayer = new ArcGISDynamicMapServiceLayer("");   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=""     xmlns:tools=""     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     tools:context=".MyPath_v02Activity"     > <     android:id="@+id/map"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     initExtent = " -16713385.63038, 8560546.73163, -16546828.73922, 8746032.94837">    </> </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.