I am trying to change the axis limits in a GeoPlot2D but it only seems to work the first time I set it in the constructor. I set it using the following code
Vector2d min = geoPlot2D.getGeoProjection().project(new LatLonGeo(latmin, lonmin ));
Vector2d max =geoPlot2D.getGeoProjection().project(new LatLonGeo(latmax, lonmax));
geoPlot2D.getAxis().set(min.getX(), max.getX(), min.getY(), max.getY());
I have tried a lot of options including invalidating and repainting and nothing seems to work.
My goal is to be able to add waypoints to the map and auto adjust the zoom based on the added waypoints.
Any thoughts?
Thanks,
Ryan