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

location.flyTo extents, tests, and documentation #1469

Open
cityremade opened this issue Sep 6, 2024 · 3 comments
Open

location.flyTo extents, tests, and documentation #1469

cityremade opened this issue Sep 6, 2024 · 3 comments
Assignees
Labels
Code Issues related to the code structure and performance. Documentation Adding or updating documentation. RFC Request for Comment or Change.

Comments

@cityremade
Copy link
Member

Spotted behaviour:

Onload: selected location has a geojson catchment which is turned off

zoom to feature bounds flies to the point - location extent is a point at this time - as expected

Catchment is displayed from checkbox

zoom to feature bounds flies to the extent of the catchment - as expected

Catchment is hidden from checkbox

zoom to feature bounds still flies to the extent of the catchment - surprising

This means that once a geojson catchment is displayed it alters location extent and its visibility doesn't update location extent anymore.

When catchment is an mvt_clone it doesn't change location extent - zoom to feature bounds flies to the point at all times, regardless of initial value for display flag - again surprising. Should fly to mvt clone extent.

Is this the desired behaviour?

@cityremade cityremade added the RFC Request for Comment or Change. label Sep 6, 2024
@dbauszus-glx
Copy link
Member

MVT_clones are about to be retired due to a multitude of issues.

Can I get a JSON location to replicate the issue with the location.flyTo() method?

@dbauszus-glx dbauszus-glx added Code Issues related to the code structure and performance. Documentation Adding or updating documentation. labels Sep 10, 2024
@dbauszus-glx dbauszus-glx self-assigned this Sep 10, 2024
@dbauszus-glx dbauszus-glx changed the title Point location + catchment - zoom to extent behaviour location.flyTo extents, test, and documentation Sep 10, 2024
@dbauszus-glx
Copy link
Member

The get extents part should be split from the flyTo method so that this can be tested and documented.

At the core of this method is the ability to get features and calculate their total extent. You can not get features from an MVT source. The features are tiles which doesn't give you the total extent of tiles not loaded.

It is theoretically possible to calculate the extent from a query but this would require an array of mapp-layer objects and not just ol-layer objects.

@dbauszus-glx dbauszus-glx changed the title location.flyTo extents, test, and documentation location.flyTo extents, tests, and documentation Sep 10, 2024
@dbauszus-glx
Copy link
Member

The issue to resolve the layer extent must be completed first. #1473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Issues related to the code structure and performance. Documentation Adding or updating documentation. RFC Request for Comment or Change.
Projects
None yet
Development

No branches or pull requests

2 participants