AnsweredAssumed Answered

AGSGeometryEngine, map not fully loaded

Question asked by vasu01 on Apr 26, 2012
Latest reply on May 14, 2012 by vasu01
Hello,

I have a problem with AGSGeometryEngine, I have make the possibility to identify some room with an area selection. But it seems the map isn't fully loaded, when I click to the map, it's just the identify symbol it's appear but not my blue square. And after a while it's OK.

Here is a part of my code :

AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine]; AGSEnvelope *actualEnv = (AGSEnvelope *)[ge projectGeometry:self.mapView.visibleArea.envelope toSpatialReference:self.spaRef] ;  double xLength = actualEnv.xmax - actualEnv.xmin; 


With this, the actualEnv.xmax has a 0.0 value. And after a while it's the good value.

I have try to make this with the help of the forum :

//Previously in my method AGSEnvelope *visibleEnv = [[self.mapView.visibleArea.envelope copy] autorelease]; AGSSpatialReference *spaRef = [[self.spaRef copy] autorelease]; ... AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine]; AGSEnvelope *actualEnv = (AGSEnvelope *)[ge projectGeometry:visibleEnv toSpatialReference:self.spaRef] ;  double xLength = actualEnv.xmax - actualEnv.xmin;


But it's not better.

Thank you in advance for any help.

Outcomes