I’ve got a google maps application on an ASP.NET ajax enabled page through an update panel. I had used setInterval to run a javscript function periodically and update the markers on the map. Over time, I noticed that when the map was updated through ajax while the javascript code was executing, i got the one of the following two errors:

'__e_' is null or not an object
'undefined' is null or not an object

These errors didn’t seem to have any effect, other than a javascript error being noted.

Through debugging, I determined that it was because of GEvent.addListener(), GEvent.clearListeners(), and marker.setImage(). Because I was getting real time updates, it was ok if every once in a while these things didn’t get updated – I could just ignore it and it probably will be updated next round. So, if you simply put these calls in a try/catch block, the errors don’t get generated.

try
{
	marker.setImage(newImagePath);
}
catch(err){} //it's ok to fail here - ignore it.

Good luck!

About Shane
Shane is the creator of task management system TaskShot and musician's helper SongKeyFinder

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2012 ShaneLabs Suffusion theme by Sayontan Sinha