... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google Map Links
#1
Hi

Your RouteConverter is just great. On thing I just found is about handling Google Map links. I know you state it's currently broken, but for my own purposes I provided a small fix, perhaps you would like to incorporate it in your own code as well.

The trick is, that you just add "&output=kml" to the Google Maps URL. Now this currently does not work with RouteConverter, because you still have a "isGoogleMapsUrl" check inside NavigationFileParser.java. So your converter still tries to parse the URL as a standard google-maps link.

So there are two things you could do:
1.) Remove the "isGoogleMapsUrl" check in your code (line 200 or so in NavigationFileParser.java), so when I manually add "&output=kml" to the Google maps url, it will automatically choose the KML converter instead (This I'm currently doing)
2.) Add the "&output=kml" to the URL by yourself and convert it as normal KML, which already works fine with RouteConverter.

again, thanks your your great converter!
Michael
Reply
#2
(10.08.2010, 13:21)kusmi Wrote: Your RouteConverter is just great.

Hi Michael,

thank you.

(10.08.2010, 13:21)kusmi Wrote: On thing I just found is about handling Google Map links. I know you state it's currently broken, but for my own purposes I provided a small fix, perhaps you would like to incorporate it in your own code as well.

The Google Maps link handling is not completely broken, it's just not perfect Wink Unfortunately your fix didn't make it into the forum. But since your nice description showed that is really easy to implement.

I've changed RouteConverter to automatically append &output=kml to Google Maps URLs and parse the KML result. Please try the latest prerelease and report.

Two observations I've made while playing around with Google Maps URLs:
  • the KML file contains a waypoint list and a track and no track
  • the waypoint list is displayed first and I guess most users would expect the route view
  • the last position of the Google Maps URL sometimes was some invalid position

Since a lot of people plan in Google Maps I guess this should be optimized to show just a route and omit the last position, shouldn't it?
--
Christian
Reply
#3
(11.08.2010, 09:45)routeconverter Wrote: the waypoint list is displayed first and I guess most users would expect the route view
Yes, showing the route is certainly good, but showing the waypoints is ok, too. Only a matter of the point of view...

(11.08.2010, 09:45)routeconverter Wrote: the last position of the Google Maps URL sometimes was some invalid position
I have that, too - but not always. In my case it was a position from the beginning of the route.
Maybe you could detect if the last waypoint position is wrong by comparing it with the last coordinate of the route?
Reply
#4
(23.08.2010, 09:43)asp Wrote: Maybe you could detect if the last waypoint position is wrong by comparing it with the last coordinate of the route?

But how would you define "wrong" then?
--
Christian
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)