Skip to content

Conversation

@Kocal
Copy link
Member

@Kocal Kocal commented Mar 16, 2025

Q A
Bug fix? no
New feature? no
Issues Fix #...
License MIT

After some public and private interactions on Slack, I think it's time to correctly document rawOptions and extra features.

In bonus, I rewrote and moved some sections in order to be more understandable and logic.

@carsonbot carsonbot added Documentation Improvements or additions to documentation Map Status: Needs Review Needs to be reviewed labels Mar 16, 2025
@Kocal Kocal self-assigned this Mar 16, 2025
@Kocal Kocal requested review from kbond and smnandre March 16, 2025 22:34
@Kocal Kocal requested a review from javiereguiluz March 17, 2025 11:16
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Mar 18, 2025
@Kocal
Copy link
Member Author

Kocal commented Mar 18, 2025

Thanks @javiereguiluz, your reviews are always appreciated!

@Kocal Kocal merged commit 40b0a0a into symfony:2.x Mar 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Map Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants