Google map event after all pins are loaded(api3) -
question simple. on page load have map without pins. there control on map enable user place pins on map. number of pins need placed on 2000 , process need time. question there google map event similar jquery document.ready wait until map pins placed on map. need display loading overlay until pins placed on map , after hide it.
just function map
window.google.maps.event.addlistener(map, 'idle', function () { // }); i try idle if map don't change zoom event not executed(this situation possible when add pins on map).
to answer question, no there no google maps event when pins placed. not need one. write code these actions in order when load pins:
- apply loading overlay
- loop through creation of pins , add them map
- remove loading overlay
if code helps more:
function loadmypins(pindatacollection){ addmyoverlay(); for(var i=0; i<pindatacollection.length; i++){ //create new pin } removemyoverlay(); }
Comments
Post a Comment