0

here's my code:

MapController cont = map.getController();
GeoPoint center = new GeoPoint((maxLat + minLat)/2,(maxLon+ minLon)/2 );
cont.zoomToSpan((maxLat- minLat),(maxLon- minLon));
cont.setCenter(center);
cont.zoomOut(); // this cause my app to crash

I need the 'cont.zoomOut();' because android's zoomToSpan is ALMOST good enough . i still need to zoom out (one level up) in order to make all my overlays/geopoints etc. visible .

so where do i zoomOut after zoomToSpan ?

programmer
  • 3,043
  • 1
  • 22
  • 30

1 Answers1

0

the right solution is using some padding when using zoomToSpan method: Android MapView -setting zoom automatically until all ItemizedOverlay's are visible

Community
  • 1
  • 1
programmer
  • 3,043
  • 1
  • 22
  • 30