Virtual Earth: Drawing Lines from each Pin

I am using virtual Earth and reading from a xml file to display coordinates on Virtual Earth. I want to draw a line from each coordinate which is displayed by a push pin. Is there any way of doing this My xml looks like:

< xml version="1.0" encoding="utf-8" >

<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<!--
This is a XML document generated for to Read Longitude and Latidute Co-ordinates
-->
<channel>
- <item>
<geo:lat>53.0775816666667</geo:lat>
<geo:long>-7.2556</geo:long>
</item>
- <item>
<geo:lat>53.0787283333333</geo:lat>
<geo:long>-7.24789</geo:long>
</item>
-<<item>
<c</channel>
</rss>
Can it be done through the xml file or javascript Any help would be great
Thanks,
Sean Ryan

<



Answer this question

Virtual Earth: Drawing Lines from each Pin

  • HAKK1NEN

    There is a specific geoRSS format that VE accepts as a "layer".

    look at "use pushpin layers" on:

    http://dev.live.com/virtualearth/sdk/

    I recommend parsing the xml yourself and then adding the pins using javascript, the link above has the VE javascript and for parsing xml look at:

    http://www.webreference.com/programming/javascript/definitive2/index.html

    John.



  • LAE2

    Yes parse out your geoRSS Lat/Longs and send them up via StringBuilder

    An idea for an app that you are looking for would be:

    1) Parse out the Lat/Longs from your file
    2) Add a pushpin on the location
    3) Parse out your next lat/long from file
    4) Draw a polyline from original location to the next location
    5) Add a pushpin to the next location
    6) Repeat 1) - 5)



  • Hussain Saffar

    What do you mean by parsing the xml Do you mean extract the <geo:lat> and <geo:long> coordinates information and then write that to a javascript

    Thanks,

    Sean Ryan



  • Virtual Earth: Drawing Lines from each Pin