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() {
});
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(){
});
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)
source
share