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. 5 months, 13 days 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

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More