Is Reprojection on the fly supported on the Map control?

Discussion created by stephen_quan on Jan 18, 2012
Latest reply on Feb 20, 2012 by stephen_quan
Hi, I've just been trying to get geographic coordinates to display on the Hello World Map sample with projection on the fly. I prefer to keep the data in geographic coordinates and not code reprojection if the map control can be coerce to do it for me.

public void onCreate(Bundle savedInstanceState) {

  // Retrieve the map and initial extent from XML layout
  map = (MapView)findViewById(;
  map.addLayer(new ArcGISDynamicMapServiceLayer("" +

  // Add a BLUE DIAMOND point near San Bernadino using Web Mercator coordinates - this works!
  GraphicsLayer merclayer = new GraphicsLayer();
   new Graphic(
    new Point(-13051775.04, 4066103.08),
    new SimpleMarkerSymbol(Color.BLUE, 15, STYLE.DIAMOND))
  // Add a RED DIAMOND point in Australia using WGS84 geographic coordinates - fail (point is shown at equator)
  GraphicsLayer wgslayer = new GraphicsLayer(SpatialReference.create(4326), null);
    new Graphic(
     new Point(144, -37),
     new SimpleMarkerSymbol(Color.RED, 15, STYLE.DIAMOND))

  //Retrieve the non-configuration instance data that was previously returned.
  Object init = getLastNonConfigurationInstance();
   if (init != null) {
   map.restoreState((String) init);