Select to view content in your preferred language

MapView.toMapPoint  Error

458
0
03-03-2012 12:46 AM
wangyongfeng
New Contributor
ArcGIS for Android Beta API
ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
 
  mapView.addLayer(tiledLayer,0);
 
  this.mapView.setExtent(new Envelope(-9533882.033281835,4612681.968546082,-9532735.477857525,4614497.347967905));

  Point point = this.mapView.toMapPoint((float)500.03,(float)233.14575);

with the Watch ,this point have the right values

ArcGIS for Android  Release API
ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(VehicleMapActivity.this,"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
  tiledLayer.setId(0);
  mapView.addLayer(tiledLayer,0);
 
  mapEv = new Envelope(-9533882.033281835,4612681.968546082,-9532735.477857525,4614497.347967905);
  this.mapView.setExtent(mapEv);
 
  Point point = this.mapView.toMapPoint((float)500.03,(float)233.14575);
with the watch,this point is null!


if this is true,we aren't to develop the drawtool on the release Vesion API.
0 Kudos
0 Replies