Hi,
Is there any way to find out when the zoom of the map changed ?
I search something like a Listener.
I've tried following:
// The zoom before Click --> 10
Log.i("Zoom..: ",""+mapComponent.getZoom());
zoomControls.setOnZoomInClickListener(new View.OnClickListener()
{
public void onClick(final View v)
{
mapComponent.zoomIn();
// the zoom after zoomIn is still 10
Log.i("Zoom..: ",""+mapComponent.getZoom());
}
});
It seems, that "mapComponent.zoomIn();" isnt finish at this time and I got the old value of the zoom.
What can I do ?
I need all this because I would like to call a method when the zoom got change, but I got always the false value.
I would implement MapListener, this has mapMoved() method and this is called also if zoom is changed. You should remember zoom before and after anyway. ZoomControl is probably not enough, as user can zoom without it also (using pinch gesture or double-click).
/JaakL