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

[FEATURE] zoom to extent of overrideGeojsonSource when using initialView in config #2665

Open
1 task done
G-Boyce opened this issue Dec 16, 2024 · 0 comments
Open
1 task done

Comments

@G-Boyce
Copy link

G-Boyce commented Dec 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Who request this Feature

DMP tool (Data Management Plan)

User Story

When "initialView" is set in the "viewSettings" of the map config,
and the "overrideGeojsonSource" method is used to replace a GeoJSON data layer,
then:

  • Zoom to the extent of the new data layer
  • Change the "Home" button to zoom to that extent.

Implementation UI

When creating a map manually with "createMapFromConfig", and then using "overrideGeojsonSource", this zoom does NOT happen automatically, and the Home button ("Reset to initial view") ISN'T changed to new extent.

However, when the map is created using cgpv.init, and then using "overrideGeojsonSource", this DOES automatically zoom to the new extent, and the Home button IS changed. (@DamonU2 is surprised that this happens here at all, so it might be accidental).

For an example of this good behaviour using cgpv.init, see this DMP web page

If you'd like copies of the underlying code, please ask. Thanks

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

No branches or pull requests

1 participant