Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello JamesBates.

    Only on single maps and not mashups. On single maps you can get the marker from the data attribute on .pgm element. The data key is google-maps-marker.

    To attach listeners to that marker you will have to look at the Google Maps JS documentation. That can be found here:

    https://developers.google.com/maps/documentation/javascript/events

    Hope that helps you!

    Thread Starter JamesBates

    (@jamesbates)

    Hello Leon,

    Thanks for the quick reply and this plugin is great by the way!

    I have tried using their documentation.

    The problem is I cant access markers that have already been created by pgm.

    There is no get current markers as far as I can see. In all of their examples the markers are created in same script that accessed them for further manipulation.

    Thanks, James

    Plugin Author Remco Tolsma

    (@remcotolsma)

    @jamesbates that’s correct, the markers created by our plugin are not accesible.

    https://github.com/pronamic/wp-pronamic-google-maps/blob/2.2.8/js/site.js#L119

    If you want you can always fork the Pronamic Google Maps plugin on GitHub and do a merge request with the feature you need.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trigger markers click event externally’ is closed to new replies.