Select to view content in your preferred language

GraphicsLayer getExtent() returns full map extent, not graphics extent

486
1
11-03-2011 11:45 AM
NicoleSchmidt
Emerging Contributor
getExtent on a GraphicsLayer with the ArcGIS Android API does not behave as I would expect it to behave.

getExtent() returns the full map extent instead of the extent of the graphics contained within the layer.  Has anyone else experienced this?  Is this as designed?  This is how I am constructing the GraphicsLayer

_mygraphicsLayer = new GraphicsLayer(this.getContext());
0 Kudos
1 Reply
wittayajunfong
New Contributor
Envelope rExtent=new Envelope(); 
   map.getExtent().queryEnvelope(rExtent);
 
   double leftB_x=rExtent.getXMin(); 
   double leftB_y=rExtent.getYMin(); 
   double topR_x=rExtent.getXMax(); 
   double topR_y=rExtent.getYMax();
0 Kudos