Filtering from google maps

I would like my site user to view the locations from the map and be able to click on certain location to view the collections from the location.

currently i am able to view the locations on map…just hover like this example: https://www.wix.com/code-examples/multiple-markers

i would like to extend this and allow the user to be able to click on a like to view collections like this examples:

https://www.abovedown.co.uk/map
https://www.wonderwix.net/google-map

can anyone help me with the code?

this wix expert example could only help me view locations on hover but not further than that…
https://www.wix.com/code-examples/multiple-markers
please help…

Thanks

A dding code to an HTML component is not a part of the Corvid product (which is what this forum is about). For what you want to do you will need to consult the Google Maps documentation.

But then how will I ensure I query from collections?

@Digital Nomad As the Multiple Markers Google Maps example illustrates, you can communicate with the HtmlElement by sending messages back and forth. You will have to use the Google development resources to find out how to generate an event when clicking on a location, since that’s part of the map’s code. However, once you have the event, you can then send a message to the page (that the map is embedded on) and then do whatever it is you want - for example, open up a page associated with the location that was clicked on.

Refer to the HtmlComponent API documentation for more information. Look at the article Corvid: Working with the HTML Element for an explanation on how to use.

@sirvansmo Since you are adding the locations to the map, you know which one is which. When you send a message from the map to the page, make sure that you indicate which location was clicked. You can then do a query on your database collection based on that selection.