Ben Walker
Posts: 0
Joined: Mon Jan 19, 2015 2:13 pm

cannot read property _e3_ of undefined - adding eventListener to gmap

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

cannot read property _e3_ of undefined - adding eventListener to gmap

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

Return to “Issues”