bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
493 stars 235 forks source link

add a Callback function when an infowindow is loaded #216

Open rmassoud opened 6 years ago

rmassoud commented 6 years ago

Hello,

I want to load the business status (open now or closed) from Google Places API in the infowindow when a list item is selected or a marker is clicked.

Since I have thousands of locations loaded on the map so I prefer to lazy load it when a location is selected from the list or a marker is clicked rather than looping on all the locations and update a property "open_now". This will require a callBackInfoWindowLoaded function I guess or something similar.

Any suggestions please?

bjorn2404 commented 6 years ago

There isn't a callback specific to info windows at this time. createInfowindow is the method that sets up the info windows but even if there were a callback there it might be a challenge to manipulate the Handlebars templates that are already loaded.