Loading ...
Sorry, an error occurred while loading the content.
 

GPX file as input into Google Maps for a multi-point route

Expand Messages
  • Daniel
    Hi guys, I hope you can help out here. We re stuck on one issue and could use the experience of people with more history in pushing around navigation data. We
    Message 1 of 2 , Apr 20, 2010
      Hi guys,

      I hope you can help out here. We're stuck on one issue and could use the experience of people with more history in pushing around navigation data.

      We are exporting a route from a GPX and are trying to have
      it display with the driving directions/route correctly overlaid on
      Google Maps.

      Question: can we use a gpx file as input into Google Maps to show a driving route given several intermediate points? How?

      More fully:

      If I just call Google Maps with several route points, it displays the
      map correctly.

      http://maps.google.com/maps?saddr=34.210214,-118.200274&daddr=34.373063,-117.752172%20to:34.365936,-117.652859

      (We've exported those coordinates from a gpx file).

      But when I try to construct a KML file and have Google Maps point at
      the KML file (e.g. http://maps.google.com/maps?q=http://myserver.com/blahblah.kml), the route shows up as a straight line between
      waypoints. I want the route to follow the road.

      What are we doing wrong?

      The path ends up looking like http://greatestroad.com/images/straightlines.jpg
      . The current kml file looks like this:

      <kml>
      <Document>
      <name>Paths</name>
      <description/>
      <Placemark>
      <name>Rosedale Valley Rd. to ice cream</name>
      <description>The long way...</description>
      <styleUrl>#roadStyle</styleUrl>
      <LineString>
      <extrude>1</extrude>
      <tessellate>1</tessellate>
      <altitudeMode>absolute</altitudeMode>
      <coordinates>
      -79.388924,43.675508,0
      -79.388924,43.675508,0
      -79.359655,43.670045,0
      -79.359655,43.670045,0
      -79.367809,43.67886,0
      -79.367809,43.67886,0
      -79.362831,43.682708,0
      -79.362831,43.682708,0
      -79.339845,43.695714,0
      -79.339845,43.695714,0
      -79.335547,43.700161,0
      -79.335547,43.700161,0
      -79.356973,43.683819,0
      -79.356973,43.683819,0
      </coordinates>
      </LineString>
      </Placemark>
      </Document>
      </kml>

      Thanks for your help,

      Daniel Pifko
      Greatest Road Software
    • Clement Fouque
      Hi, I m not really used to kml files, but your path is declared as a multi-point line built from your waypoints. I think this is the core of your problem.
      Message 2 of 2 , Apr 21, 2010
        Hi,

        I'm not really used to kml files, but your path is declared as a
        multi-point line built from your waypoints. I think this is the core of
        your problem.

        Maybe you should use another kml data type to export your waypoints. But
        wich one, i can't tell.

        Daniel a écrit :
        >
        >
        > Hi guys,
        >
        > I hope you can help out here. We're stuck on one issue and could use the
        > experience of people with more history in pushing around navigation data.
        >
        > We are exporting a route from a GPX and are trying to have
        > it display with the driving directions/route correctly overlaid on
        > Google Maps.
        >
        > Question: can we use a gpx file as input into Google Maps to show a
        > driving route given several intermediate points? How?
        >
        > More fully:
        >
        > If I just call Google Maps with several route points, it displays the
        > map correctly.
        >
        > http://maps.google.com/maps?saddr=34.210214,-118.200274&daddr=34.373063,-117.752172%20to:34.365936,-117.652859
        > <http://maps.google.com/maps?saddr=34.210214,-118.200274&daddr=34.373063,-117.752172%20to:34.365936,-117.652859>
        >
        > (We've exported those coordinates from a gpx file).
        >
        > But when I try to construct a KML file and have Google Maps point at
        > the KML file (e.g.
        > http://maps.google.com/maps?q=http://myserver.com/blahblah.kml
        > <http://maps.google.com/maps?q=http://myserver.com/blahblah.kml>), the
        > route shows up as a straight line between
        > waypoints. I want the route to follow the road.
        >
        > What are we doing wrong?
        >
        > The path ends up looking like
        > http://greatestroad.com/images/straightlines.jpg
        > <http://greatestroad.com/images/straightlines.jpg>
        > . The current kml file looks like this:
        >
        > <kml>
        > <Document>
        > <name>Paths</name>
        > <description/>
        > <Placemark>
        > <name>Rosedale Valley Rd. to ice cream</name>
        > <description>The long way...</description>
        > <styleUrl>#roadStyle</styleUrl>
        > <LineString>
        > <extrude>1</extrude>
        > <tessellate>1</tessellate>
        > <altitudeMode>absolute</altitudeMode>
        > <coordinates>
        > -79.388924,43.675508,0
        > -79.388924,43.675508,0
        > -79.359655,43.670045,0
        > -79.359655,43.670045,0
        > -79.367809,43.67886,0
        > -79.367809,43.67886,0
        > -79.362831,43.682708,0
        > -79.362831,43.682708,0
        > -79.339845,43.695714,0
        > -79.339845,43.695714,0
        > -79.335547,43.700161,0
        > -79.335547,43.700161,0
        > -79.356973,43.683819,0
        > -79.356973,43.683819,0
        > </coordinates>
        > </LineString>
        > </Placemark>
        > </Document>
        > </kml>
        >
        > Thanks for your help,
        >
        > Daniel Pifko
        > Greatest Road Software
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.