Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapView does not update prefCenter and prefZoom #69

Open
ctipper opened this issue May 14, 2022 · 4 comments
Open

MapView does not update prefCenter and prefZoom #69

ctipper opened this issue May 14, 2022 · 4 comments

Comments

@ctipper
Copy link

ctipper commented May 14, 2022

In the course of trying to integrate this as a library it has become apparent that MapView updates BaseMap coordinate and zoom via the variables prefCenterLat, prefCenterLon and prefZoom exactly once and that these variables are never updated again as the user zooms and pans the MapView. Consequently a library user has no way of persisting the state of the map and it is not really suitable to be used as a library. There are other issues in particular the private InputEvent handlers which can be worked around with EventFilters, but currently this is not suitable for my purposes.

@ctipper
Copy link
Author

ctipper commented May 15, 2022

The MapView.getMapPosition appears to return lon and lat but this is not clear from variable names. I might have to withdraw this issue, but it is frustrating that there is no access to underlying BaseMap from MapView, this would allow access to the BaseMap readOnlyProperties.

@ctipper
Copy link
Author

ctipper commented May 15, 2022

MapView.getZoom returns BaseMap.prefZoom so still no way to retrieve last zoom level from MapView.

@ctipper
Copy link
Author

ctipper commented Jun 20, 2022

I've examined the options and it seems I only need in MapView

public double getMapZoom() {
    return baseMap.zoom().get();
}

I don't know the likelihood of getting a PR accepted I've never done a pull request before.

@ctipper
Copy link
Author

ctipper commented Nov 5, 2022

For the same project I've also had need of this function in MapView

public void moveMap(double x, double y) {
        baseMap.moveX(x);
        baseMap.moveY(y);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant