[ka-Map-users] Overlays with dynamic information

Pg pg.navone at gmail.com
Sun Jan 1 18:49:30 EST 2006


> When using shiftObject, you must hold the old lon/lat value, call
> geoToPix() twice and calculate delta X and Y for each point. While using
> updateObjects, you just need to assign the current lon/lat value to every
> obj. But on the other hand, you can call shiftObject to set each point
> separately instead of updating the points all at once.

Looking with more attention to the source of ka-map, i realized that
the use on shiftObject is a bad idea to place an object in geographics
coordinates. So I changed the code to use updateObject, as you
suggest. I'm not sure it's more efficient, but it's defintely more
correct.

> Besides, I have some questions. What about the performance of
> wz_jsgraphics, is it necessary to use it?

Now I avoid using wz_jsgraphics when it's possible: the wz_jsgraphics
object is created and used only if in the XML there is a <symbol>
element; using an icon in place of a symbol is possible.

> When using setInterval, it will trigger a new loadXML() running after
> delaying for a specified time period, even the last running is not over. [...]

True. I have replaced setInterval with setTimeout.

> Sorry to bother you, but I'm really interested in dynamic overlay function
> and quite grateful for your work.

Your comments are welcome.
Thanks for useful hints.

You can find the updated working version at the same URL
   http://sistel.dyndns.info/ka-map/indext.html

Bye

2006/1/1, Jie Yan <yanj at ict.ac.cn>:
> Hi, Pg.
> When using setInterval, it will trigger a new loadXML() running after
> delaying for a specified time period, even the last running is not over.
> And there's asynchronous call during the procssing of loadXML(). I wonder
> whether it is safe and efficient.
> When using shiftObject, you must hold the old lon/lat value, call
> geoToPix() twice and calculate delta X and Y for each point. While using
> updateObjects, you just need to assign the current lon/lat value to every
> obj. But on the other hand, you can call shiftObject to set each point
> separately instead of updating the points all at once.
> Maybe there's something wrong, I'm just green hand for ka-Map and Javascript.
>
> Besides, I have some questions. What about the performance of
> wz_jsgraphics, is it necessary to use it?
>
> Sorry to bother you, but I'm really interested in dynamic overlay function
> and quite grateful for your work.
>
> Best regards!
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>



More information about the ka-Map-users mailing list