Hello.
But I see map on http://www.themilkbank.org/donor-milk/milk-depots/, it have for example marker on left side “Cardinal Glennon Children’s Hospital”
Thanks for the reply,
Apparently it’s loading properly when going to the direct link, but when using the main menu to get to the page the map doesn’t appear until refresh.
Any idea why this would happen?
You can see it happen when on the page and selecting the drop down for “Milk Depots” under the “Donate” menu item.
New URL: http://www.themilkbank.org/locations/
Thanks!
Hello.
Yes, your theme use ajax to switch betwee those pages. And our plugin use jQuery(document).ready() action in javascript to init maps on page. After your theme load ajax – you can see that all html for maps is there, but jQuery(document).ready() is not triggered, so maps javascript is not initialized. If you want to continue use this method of pages load – you should resolve this issue:
1. Trigger jQuery(document).ready() manually after ajax request with page load is compleate, but I not guarantee that all othere scripts will work correctly.
2. Insert code, that is in our plugin and run after jQuery(document).ready():
if(typeof(gmpAllMapsInfo) != 'undefined') {
for(var i in gmpAllMapsInfo){
var map_id = gmpAllMapsInfo[i].id;
gmapPreview.maps[map_id] = {
mapObject: {}
, markerArr: {}
, infoWindows: {}
, mapParams: gmpAllMapsInfo[i]
, onAfterDraw: []
};
}
jQuery(document).trigger('gmpBeforePrepareToDraw');
for(var i in gmpAllMapsInfo){
gmapPreview.prepareToDraw(gmpAllMapsInfo[i].id);
}
}
after your page load ajax request return your html content.