Google Maps *output*

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Google Maps *output*

Andy Helsby
Is there a plan to provide an export format in google maps format such
as below (from
http://www.google.com/apis/maps/documentation/#Using_XML_and_Asynchronous_RPC_A)

 Download the data in data.xml and load it on the map. The format we
 expect is:
 <markers>
   <marker lat="37.441" lng="-122.141"/>
   <marker lat="37.322" lng="-121.213"/>
 </markers>

I didn't see anything on the mailing list (as the api was only announced
a day or so ago thats not suprising)


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-misc mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Google Maps *output*

Ron Parker-2
At 09:40 AM 6/30/2005, Andy Helsby wrote:

>Is there a plan to provide an export format in google maps format such as
>below (from
>http://www.google.com/apis/maps/documentation/#Using_XML_and_Asynchronous_RPC_A)
>
>Download the data in data.xml and load it on the map. The format we
>expect is:
><markers>
>   <marker lat="37.441" lng="-122.141"/>
>   <marker lat="37.322" lng="-121.213"/>
></markers>
>
>I didn't see anything on the mailing list (as the api was only announced a
>day or so ago thats not suprising)

That's not really a standard, per se.  It's just the format that that
specific fragment of Javascript code parses.  You could just as easily
adapt the Javascript code to accept the .loc (GPSBabel 'geo') or .gpx formats.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-misc mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Google Maps *output*

Robert Lipe
Ron Parker wrote:

> specific fragment of Javascript code parses.  You could just as easily
> adapt the Javascript code to accept the .loc (GPSBabel 'geo') or .gpx
> formats.

Funny you should suggest that as I did exactly that last night.  It
turns out it's a trivial tweak to their example to get it to read coords
from a GPX file.

          var markers = xmlDoc.documentElement.getElementsByTagName("wpt");
          for (var i = 0; i < markers.length; i++) {
            var point = new GPoint(parseFloat(markers[i].getAttribute("lon")),
                                   parseFloat(markers[i].getAttribute("lat")));
              var wptnodes=markers[i].childNodes;
              var cname = "";
              var gcnum = "";
              for (var j=0; j<wptnodes.length; j++) {
                if (wptnodes[j].tagName == "cmt") {
                        cname = wptnodes[j].childNodes[0].nodeValue;
                }
                if (wptnodes[j].tagName == "name") {
                        gcnum = wptnodes[j].childNodes[0].nodeValue;
                }
              }


No laughing at my remedial Javascript/DOM.  I'm sure there's a smarter
way to get cmt and name.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Gpsbabel-misc mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc