[Map][Docs] Improve "Interact with the map" section - #2638
Merged
Conversation
javiereguiluz
approved these changes
Mar 18, 2025
javiereguiluz
left a comment
Member
There was a problem hiding this comment.
A great contribution! Hugo, thanks a lot for taking care of the docs.
I made some minor comments about grammar, minor rewords, etc.
| Advanced: Passing extra data from PHP to the Stimulus controller | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| For higher customization and extensibility, you can also pass extra data from PHP to the Stimulus controller. |
Member
There was a problem hiding this comment.
For greater customization and extensibility, you can pass additional data from PHP
to the Stimulus controller. This can be useful when associating extra information
with a specific marker; for example, indicating the type of location it represents.| For higher customization and extensibility, you can also pass extra data from PHP to the Stimulus controller. | ||
| It may be useful to pass data for a specific marker, e.g. the type of place it represents. | ||
|
|
||
| Those extra data are only defined and used by you, UX Map only passes them to the Stimulus controller. |
Member
There was a problem hiding this comment.
These additional data points are defined and used exclusively by you; UX Map
only forwards them to the Stimulus controller.| ], | ||
| )); | ||
|
|
||
| JavaScript side, you can access your extra data through the ``event.detail.definition.extra`` object |
Member
There was a problem hiding this comment.
On the JavaScript side, you can access your extra data via the
``event.detail.definition.extra`` object, available in the
``ux:map:*:before-create`` and ``ux:map:*:after-create`` events:
Member
Author
|
Thanks @javiereguiluz, your reviews are always appreciated! |
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.
After some public and private interactions on Slack, I think it's time to correctly document
rawOptionsandextrafeatures.In bonus, I rewrote and moved some sections in order to be more understandable and logic.