jdb1a1

Bug Report: mapview setFrame

Discussion created by jdb1a1 on Oct 30, 2011
Latest reply on Oct 31, 2011 by pml
When I instantiate an AGSMapView like this:

AGSMapView *mapview = [[AGSMapView alloc] init];


later calling "setFrame" like this:

[_mapView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 325)];


produces the following error, when I try to interact with the map object (e.g. autoPan = YES, zoom in/out, or manually pan the map) after I make the setFrame call:

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'


Instantiating the AGSMapView and setting the frame all at once, on the other hand, produces the correct results:

_mapView = [[AGSMapView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 325)];


I can work around it; if it is in fact a bug, I thought you would like to know.

Outcomes