Gmaps.js using the built-in functions of the Google Maps API v3

So, I download my google maps using gmaps.js, which makes working with them easier. The problem is that some of the native functions are not available, especially I needaddListenerOnce

http://hpneo.imtqy.com/gmaps/

I load my map as follows:

searchmap = new GMaps({
     div: '#searchmap',
     lat: '40.7142691000',
     lng: '-74.0059729000',
});

I can add an event listener as follows:

searchmap.addListener('idle', function() {
     //do something here
});

However, I cannot add native addListenerOnce, so I assumed that I could do this (which does not work):

google.maps.event.addListenerOnce(searchmap, 'idle', function(){
     //do something
});

So, any idea how I can use addListenerOnce? (It's clear that I'm new to JS ... a lot of talk in the github repository didn't help)

+4
source share
1 answer

google.maps.Map:

http://hpneo.imtqy.com/gmaps/documentation.html#GMaps-map

:

google.maps.event.addListenerOnce(searchmap.map, 'idle', function(){
   //do something
});
+7

All Articles