Sign in to follow this  
Earl.Bennett

Map callbacks do not work after loading 2nd map.

Recommended Posts

I am replacing an existing map with a second one by creating a new FusionMaps object with the registerWithJS flag set to 1.  The callback functions (getEntityList, setDataXML, etc.) are not being properly registered, and generate an error when I try to call them. (The first map works OK)

The problem appears to be the following code in the render function in FusionMaps.js.

if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])

window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));

It appears that the if statement prevents the window[this.getAttribute('id')] being properly set for the 2nd map, preventing the callback functions from being properly registered.

This is FusionMaps V3.0, using IE 7.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this