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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add container ground overlays in KML/KMZ #1166

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

jeffdgr8
Copy link
Contributor

@jeffdgr8 jeffdgr8 commented Mar 7, 2023

Pass the correct set of ground overlays from a nested container to properly add to the map.

Fixes #740 馃

@OlavAa
Copy link

OlavAa commented May 21, 2023

Pass the correct set of ground overlays from a nested container to properly add to the map.

Fixes #740 馃

Confirmed, issue is fixed.

@wangela wangela requested a review from kikoso August 8, 2023 00:02
@wangela
Copy link
Member

wangela commented Aug 8, 2023

@jeffdgr8 Since this no longer uses GetGroundOverlayMap(), should this be treated as a breaking change?

@jeffdgr8
Copy link
Contributor Author

jeffdgr8 commented Aug 8, 2023

@wangela no, it shouldn't break anything. The current behavior uses getGroundOverlayMap() to get the root container's ground overlays and passes them to addGroundOverlays(), along with the child containers. This function iterates over the child containers and adds their ground overlays as well. But the bug is that this function doesn't use these child containers' ground overlays from the parameter, but instead calls getGroundOverlayMap() to get the root container's ground overlays that have already been added.

So current behavior works for ground overlays in the root of the XML, but ground overlays in nested containers are not rendered as they should be. All ground overlays should be rendered correctly now with the change.

@kikoso
Copy link
Collaborator

kikoso commented Aug 8, 2023

This seems to fix the issue, great job @jeffdgr8 !

@wangela
Copy link
Member

wangela commented Aug 8, 2023

Thank you @jeffdgr8 for contributing a fix to an issue reported by @OlavAa. Much appreciated!

@wangela wangela merged commit 2010bb7 into googlemaps:main Aug 8, 2023
googlemaps-bot pushed a commit that referenced this pull request Aug 8, 2023
## [3.5.1](v3.5.0...v3.5.1) (2023-08-08)

### Bug Fixes

* Add container ground overlays in KML/KMZ ([#1166](#1166)) ([2010bb7](2010bb7))
@googlemaps-bot
Copy link
Contributor

馃帀 This PR is included in version 3.5.1 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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

Successfully merging this pull request may close these issues.

GroundOverlay not put on map for KMZ-formatted bathymetric maps
5 participants