Skip to content

Update MapboxMap with VLE props for using inside an iframe #503

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

Merged
merged 4 commits into from
Mar 26, 2025

Conversation

k-gerner
Copy link
Contributor

@k-gerner k-gerner commented Mar 26, 2025

In this PR, I have added two props to the MapboxMap component: iframeWindow and allowUpdates. These props were added to enable usage of this component in the Visual Layout Editor. Because we are using the component in an iframe, we need to use the iframe's mapboxgl library to properly reference the window. Additionally, the allowUpdates property is used so that we can dynamically change properties / styles of the map through the VLE. Currently, we only allow changing the "style" of the map (such as satellite view, dark mode, etc), but more can be added as necessary. With this property set to true, we will listen to updates to the mapbox options, and update when applicable.

Separately, I have added a navigation button section, which contains + and - buttons for zooming in and out of the map.

@k-gerner k-gerner requested a review from a team as a code owner March 26, 2025 00:13
@Fondryext
Copy link
Contributor

Could you add a little more context to the commit message and perhaps change the title? Going through Slack I think I understand the motivation here but it isn't as clear in the PR proper.

@k-gerner k-gerner changed the title Update MapboxMap with VLE props Update MapboxMap with VLE props for using inside an iframe Mar 26, 2025
@k-gerner
Copy link
Contributor Author

Could you add a little more context to the commit message and perhaps change the title? Going through Slack I think I understand the motivation here but it isn't as clear in the PR proper.

Updated!

Copy link
Contributor

Current unit coverage is 91.95837275307474%
Current visual coverage is 78.96150402864816%
Current combined coverage is 92.43498817966903%

@k-gerner k-gerner merged commit bc006a4 into hotfix/v1.8.2 Mar 26, 2025
19 of 20 checks passed
@k-gerner k-gerner deleted the dev/mapbox-map-vle-iframe-updates branch March 26, 2025 19:58
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

Successfully merging this pull request may close these issues.

2 participants