if (zoomType == ScrollZoomType.ZOOM_POSITION) {
mapModel.getMapView().scale(
2.0f,
MapView.ZoomOption.LEVEL_CHANGE,
mapModel.getMapView().getWorldViewTransformer()
.viewToWorld(new Coordinate(event.getX(), event.getY())));
} else {
mapModel.getMapView().scale(2.0f, MapView.ZoomOption.LEVEL_CHANGE);
}
} else {
if (zoomType == ScrollZoomType.ZOOM_POSITION) {
mapModel.getMapView().scale(
0.5f,
MapView.ZoomOption.LEVEL_CHANGE,
mapModel.getMapView().getWorldViewTransformer()
.viewToWorld(new Coordinate(event.getX(), event.getY())));
} else {
mapModel.getMapView().scale(0.5f, MapView.ZoomOption.LEVEL_CHANGE);
}
}
}