I've extended Overlay and implemented draw()
in order to draw some stuff onto the map.
When zooming is done through mapController.zoomIn()
(called when doubleTapping the map),
the overlay is drawn properly onto the map.
But whenever I zoom in/out with the built in zoom controller, the overlay is not drawn properly and panning the map is needed to get the overlay refreshed.
You can use zoom controller and get rid of this problem.. (ex: zoomView = (LinearLayout) mapView.getZoomControls(); )
check with this link
http://developer.android.com/reference/android/widget/ZoomButtonsController.html
I've been using zoom controllers with no problem at all. even having drawn multi layers on the map and zoom in/out has no bad effect at all.
I suggest to use as below
mapController = mapView.getController();
mapController.zoomIn();// or .zoomOut()
instead of using setZoom(XX) please use zoomIn() / zoomOut() which makes zooming smoother, this may help making it work better esp with multiple overlays.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With