- This topic has 3 replies, 2 voices, and was last updated 5 months ago by Matthew.
April 15, 2022 at 8:16 pm #72855prakashParticipant
how is it possible with a PHP snippet (in theme or with a plugin) print the value of Latitude/longitude/address/other-values properly setup with your plugin inside a post?
Thank you!April 19, 2022 at 10:24 am #72869MatthewModerator
Thank you for getting in touch with us, we do appreciate your time.
Please may I ask if you may confirm if you would simply like to retrieve specific marker data and output it onto the page in HTML?
If so, please may you also confirm how you would like to display the data so that I may get a better understand of how you would like the output to look, as well as if you may provide me with the link to your map page/post so that I may take a closer look?
I look forward to hearing back from you.
MatthewApril 22, 2022 at 12:54 am #72901prakashParticipant
the idea is that in a website like http://test.masterunits.net I can click on one Marker (e.g. the Portuguese one, with name “Ananda Valley”), and then I arrive to a post where I added the Ananda Valley location, and some description of the place.
In the same page I would like (apart from seeing a map with only this marker! but this I added as a separate question), to have a box where some information, like Latitude, Longitude, Address,… are shown (in a PHP snippet, or in a future in a block or in my theme customization).
Can you tell me how can I extract these informations (like Latitude, Longitude, and so on) from JS/PHP ?
prakashApril 25, 2022 at 9:45 am #72919MatthewModerator
Thank you for getting back to me and for your time on this, it is much appreciated.
Thank you for the confirmation, you may use some JS code which I have written for you in my following Gist to retrieve the information of the marker when a marker is clicked on the map: https://gist.github.com/MatthewCodeCabin/8a8b3580d4afa169a6a76be7139da6a9
In the above Gist, the “markerInfo” variable contains the information of the marker that is clicked.
Please do let me know if this helps?
- You must be logged in to reply to this topic.