Home>Support>Custom JS function to draw polylines with the Google Maps widget

Custom JS function to draw polylines with the Google Maps widget

Hello… I am trying to draw a polyline display on the google maps widget from the Widget Bundle. I want to use a custom JS function to render the polylines between the geocords of the markers, is there a callback/hook I can use to allow my function to be executed after the plugin renders completes the initial map rendering?

Thanks in advance.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 14 days, 23 hours ago Alex S Hi, I Work Here

    Hi Luke,

    You can use the maps_loaded event to detect when the maps have finished loading (and rendering). You can then get the maps instance by checking window.sowb.SiteOriginGoogleMapInstances.

    Kind regards,
    Alex

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More