Skip to content Skip to sidebar Skip to footer

Google Maps Api: Cannot Read Property '__e3_' Of Undefined

Here is the Listener I'm adding - var map; var geocoder; function initialize() { var myOptions = { zoom: 8, center: new google.maps.LatLng(22,

Solution 1:

Move your listener into the initializer function.

Solution 2:

It's hard to tell with only a small part of your code, but that sounds like it cannot find "map".

Either your map variable is not global, or somehow accessible by that code OR the map was not created with:

map = new google.maps.Map(....)

before you try and add a new click listener.

Solution 3:

I don't know if this may be an issue for you since we don't see the part of your code where you are linking to the google maps library, but I just discovered the reason I was getting this error was from trying to include the "visualizations" library. Luckily I didn't need to use it anymore.

I had this:

<scripttype="text/javascript"src="http://maps.google.com/maps/api/js?libraries=geometry,visualization&sensor=true"></script>

and changed it to this:

<scripttype="text/javascript"src="http://maps.google.com/maps/api/js?libraries=geometry&sensor=true"></script>

I no longer get the e3 error.

By the way, this error for me was not consistent and I could not figure out how to replicate it. I had to sit there and hit refresh over and over until the error occurred.

I hope this helps someone.

Solution 4:

This happens when loading your data asynchronous. You can avoid that by including your document.ready code into the ajaxStop function

$().ready(function() {
    $(document).ajaxStop(function () {
        /* your code here ?*/
    });
});

Solution 5:

In my case it was that the global map variable had been overwritten in the initializer but I wanted to use that global variable in another function and this caused the problem.

Post a Comment for "Google Maps Api: Cannot Read Property '__e3_' Of Undefined"