[worldKit-dev] Trouble with javascript - to - worldKit

Mikel Maron mikel_maron at yahoo.com
Thu Oct 11 02:37:27 PDT 2007


Hi Jason

(Sorry for the delay -- still getting caught up after travels...)

> We're also having trouble speaking to WorldKit with javascript.
 Everything
> is fine when we have a popup window such as this: 
> http://www.charlotteobserver.com/images/graphics/cms_schools_small/test/
> 
> But when we embed worldKit on our main schools page, the same script
 doesn't
> seem to be able to speak to the worldKit.swf.
> http://www.charlotte.com/schools/
> Scroll to the bottom and you'll see a blank map that uses the same
 script as
> the link above. 

This problem is related to the browser security model. worldkit.swf is being loaded from charlotteobserver.com, but displayed on charlotte.com. The flash runs fine, but javascript communication between the "domains" is blocked.

The quick solution, if possible, is to server the swf from the same domain. Will that be ok for you?

The long term solution is to implement a config option, which would grant permission to the local domain. I'll add a ticket for that.

> We're also experiencing trouble when we try loading all three layers of
 our
> map with only one layer set to visible in our config file like this: 
> <visible>
 > <elementary>true</elementary>
 > <middle>false</middle>
> <high>false</high>
> </visible>
>
> No layer is visible when we try it and JLayComm doesn't seem to help
 make
> them visible. 

The default value needs to be set as well.

<visible>true
 <elementary>true</elementary>
 <middle>false</middle>
 <high>false</high>
</visible>

I'll improve the documentation on this point.

Hope that help.

Mikel





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.brainoff.com/pipermail/worldkit-dev-brainoff.com/attachments/20071011/15494c63/attachment-0005.htm>


More information about the worldkit-dev mailing list