Closed lindseydiloreto closed 2 years ago
Very useful addition to the GoogleMaps plugin. Thanks a lot for turning that into reality so quickly! 💯
Similarly... It would be great if we could trigger a JavaScript callback function when clicking on a marker.
Certain data would need to be passed into the callback (including the element's ID and/or handle).
google.maps.event.addListener(marker, 'click', callback(data));
This is done, and will be formally released with v4.1.0. 👍
In the meantime, you can switch to the dev
branch to get all the latest changes...
"doublesecretagency/craft-googlemaps": "dev-v4-dev"
Check out the new On Marker Click docs to learn how to use the new markerLink
and markerClick
options.
Currently, it's possible to use the
infoWindowTemplate
option to make an info window open when you click on markers.It would be nice if there were a
markerLink
option to make a marker clickable as a link...Under the hood, it would operate very similarly to
infoWindowTemplate
...You obviously would not be able to use
markerLink
andinfoWindowTemplate
at the same time. One of these settings would override the other.