PB-506 : embed sends information to parent about selected features#847
Merged
PB-506 : embed sends information to parent about selected features#847
Conversation
Passing run #2298 ↗︎Details:
Review all test suite changes for PR #847 ↗︎ |
|||||||||||||||
schtibe
reviewed
May 16, 2024
Contributor
schtibe
left a comment
There was a problem hiding this comment.
It doesn't work on the test link, or maybe I don't do it correctly (I selected public transport stops). I'm gonna check out the branch tomorrow and test it locally again!
Contributor
Author
right... I have not added a relative URL to the debug view but a localhost one... Will update that tomorrow |
390de90 to
cf837c5
Compare
ltshb
reviewed
May 21, 2024
cf837c5 to
f6dd363
Compare
f142941 to
3add735
Compare
using postMessage API to send the feature ID and layer ID of selected features to parent
3add735 to
fec32b8
Compare
if the app was embedded in an iframe with featureInfo=none in the URL, it is because this iframe shouldn't show any tooltip at all (and the user will managed feature selection through the postMessage API), so no reset is needed at first feature selection (it is essentially persistent)
fec32b8 to
40b6b23
Compare
schtibe
approved these changes
May 24, 2024
Contributor
schtibe
left a comment
There was a problem hiding this comment.
Apart from the little detail about the optional chaining operator, which is maybe irrelevant, this looks good to me!
with features given as null the code could break in some ways, here we make sure we have an array that contains something
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
using postMessage API to send the feature ID and layer ID of selected features to parent
Can be tested in the this codepen (by changing the URL from test.map.geo.admin.ch to this PR's testlink) codepen here
Test link