[worldKit-dev] geowiki mod

Mikel Maron mikel_maron at yahoo.com
Wed Feb 22 04:01:00 PST 2006


 Markus,

> http://ctrlw.net/geo/geowiki/

Nice stuff, great that you can build polygons and lines from the editor.

> * I'd like to set config options (like inputonly) from javascript, or give
> the url of a config file and ask to load this (e.g. JConfComm ?).

In worldkitInteraction.as, there's a function "SetupJavascript". Add support for the new variable similar to the others. If the variable was JInputComm, define a new function onJInputComm. That function could set toggle the value of conf.inputonly


JConfComm is a good idea, but a little more complicated -- there's a question of how much of worldKit could/should be reconfigured on the fly. I've added that as an issue anyway.

> * Currently I get the infos for each clicked item from the server. Is it
> possible to get it from worldkit directly (e.g. xml = getItem(uid))?

It's not possible to directly receive a return value, but nearly with a couple of tightly coupled js/as functions.

Similarly to above, define a new javascript comm variable (JGetItemComm). The handler function would lookup the annotation in rss.Points, and call a javascript function with those values. worldkitInteraction.annotate demonstrates how call javascript.


Ultimately, worldKit should start using the Flash/Javascript Integration Kit -- http://www.osflash.org/doku.php?id=flashjs
This works more consistently across browsers, and is a cleaner interface. Also, it would be nice to wrap up all the javascript api into a library, so developers were a little more buffered from the mechanisms here.

> The new worldkit behaves slightly different regarding JLoadComm. Now it
> seems that I have to clear the map first and then load the data file, while
> before it was enough to just load the new file. Not really a bug, just sth.
> I had to adapt to.

What happens with JLoadComm, without the clear? Does it plot the new points, or do nothing?

If you want to show only the new points, <showonlynew> should be true.

Best,
 Mikel






More information about the worldkit-dev mailing list