[ka-Map-users] GPX Parser / issue with icons ?

Edouard Lafargue elafargue at gmail.com
Sun Feb 18 17:22:51 EST 2007


  hi to all list member,

  This week-end, I wrote a quick GPX parser for Ka-Map, to display waypoints
on a world map, nothing very fancy. Nevertheless, I decided to use graphical
icons (KaXmlIcon) for the waypoints on Ka-Map 1.0, and I realised that
contrary to Overlay reference that is on the wiki on Omniverdi, the
variables to initialize for the icons are not x,y and img, but icon_x,
icon_y and icon_img: am I right, or is there something I did not understand
in the way I should use KaXmlIcon (see code below)? Anyway, using variables
prefixed by "icon_", everything works very well!

   Otherwise, any hint on how best to implement MouseOver or Click callbacks
on the icons would be most welcome...

   My code looks like this:

        if (iconName != "") {
           var my_icon = new kaXmlIcon();
           my_icon.icon_src = "/relative_path/" + iconName + ".png";
           my_icon.icon_h = my_icon.icon_w =  10;
           my_icon.opacity = 1;
           my_point.addGraphic(my_icon);
        } else {
        var my_symbol = new kaXmlSymbol();
        my_symbol.size = 6;
        my_symbol.opacity = 0.7;
        my_symbol.color = '#ff0000';
        my_point.addGraphic(my_symbol);


Thanks for your help! Is there a place, apart from this list, where I could
post this GPX parser once it's ready ? One last thing, thanks for this
project, Ka-Map is really powerful and easy to use!

Regards,

Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070218/24ed0516/attachment.html


More information about the ka-Map-users mailing list