Page 1 of 1

cannot read property _e3_ of undefined - adding eventListener to gmap

Posted: Sun May 17, 2015 12:15 am
by Ben Walker

I am trying to add an event listener to a google map using the following code:

var map = Apperyio('map').gmap;

google.maps.event.addListener(map, 'dragend', console.log("dragend fired"));

But I get an console error: Uncaught TypeError: Cannot read property '__e3_' of undefined

Any help appreciated!
Thanks


cannot read property _e3_ of undefined - adding eventListener to gmap

Posted: Sun May 17, 2015 2:38 am
by Bruce Stuart

Hi Ben,

you need to pass your map into the function .... So the parameter inside the parens would be whatever the name of your google map is ( the actual map object )... Make sense ?

Inside the function ... It has no visibility to your map object unless somehow you were to make it public in a JavaScript function.

Best

Bruce