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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic map marker contents #49

Closed
frietboer opened this issue May 30, 2024 · 5 comments
Closed

Dynamic map marker contents #49

frietboer opened this issue May 30, 2024 · 5 comments

Comments

@frietboer
Copy link

Is there a way of having the marker popup content in a dynamic map, be filled by the corresponding post title, excerpt and permalink?

@gsarig
Copy link
Owner

gsarig commented May 30, 2024

Hi @frietboer Are you referring to the new feature that draws the info from the new "Location" custom field, as described here?

@frietboer
Copy link
Author

No I hadn't seen that new feature yet! I was referring to the map that "syncs" locations from posts, or with the [ootb_query] shortcode. But I can image that this could be the same for the new feature.

@gsarig
Copy link
Owner

gsarig commented May 30, 2024

This request would make more sense for the new feature than the standard query. The reason is that the standard query gathers the locations from the blocks, and each post can have multiple blocks and each block, in turn, can have multiple markers, so it wouldn't make sense to override all the markers' values with the post's data.

The new "Location" feature, though, only allows a single marker, and is tied to the post. So, I could perhaps look into extending its functionality to add some hook with which you could override the default output.

@frietboer
Copy link
Author

Yes that would make more sense.
A hook would be ideal. If one could hook into the popup content as well as the marker icon, I would imagine that this would greatly enhance the possibilities of this plugin.

@gsarig
Copy link
Owner

gsarig commented Jun 2, 2024

Hi @frietboer Just letting you know that this has been implemented with version v.2.8.2. More specifically, two hooks have been introduced, allowing you to fully modify the content of the modal, as well as the marker's icon. You can read more details, along with examples, in the Release Notes.

I'm closing this ticket as done!

@gsarig gsarig closed this as completed Jun 2, 2024
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

No branches or pull requests

2 participants