Hi ,
I am trying to develop zooControls like zoomIn and zoomOut. i give below the code about zoomIn and ZoomOut.
public void zoomIn() {
double x, y;
x= mapView.getScaleX();
y= mapView.getScaleY();
mapView.setScaleX(x+1);
mapView.setScaleY(y+1);
}
public void zoomOut() {
double x, y;
x= mapView.getScaleX();
y= mapView.getScaleY();
mapView.setScaleX(x-1);
mapView.setScaleY(y-1);
}
but the problem is when i click zoomIn button the mapview is overlaping with other pane and when i click zoomOut , it is not working and mapview is not zoomout within its stackpane like mouse's zoomIn and zoomout. i attach some code snippet.
For my map application, changes zoom level of map by +1 or -1 and default minimum zoom level is 0, default maximum zoom level is 18.
so , there is another way to work with directly with mapview's zoom level?? above code is not working like mouse's zooming. can you guys give recommendation how to solve this problem?