Google Maps XML (google) - URL not working

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Google Maps XML (google) - URL not working

pizzipie
Hi,

I'm trying to use the Google Maps format but keep getting error 404. Here is my modified GPSBabel bash script w/o the '2&>/dev/null '.  I'm trying to see what is going on.

NOTE: If I run the URL - https://goo.gl/maps/qDR1osRYwn62 on a web page, by itself,  my google map, complete with the route I selected, is displayed.

#!/bin/sh
wget -O - "https://goo.gl/maps/qDR1osRYwn62&output=js" >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx

Command:  ./google-maps-to-garmin.sh

Result:

--2016-02-08 13:02:37--  https://goo.gl/maps/qDR1osRYwn62&output=js
Resolving goo.gl (goo.gl)... 63.110.67.57, 63.110.67.55, 63.110.67.54, ...
Connecting to goo.gl (goo.gl)|63.110.67.57|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-02-08 13:02:37 ERROR 404: Not Found.

XML Reader:Read error: Premature end of document. (google_map.js, line 1, col 0)
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

Robert Lipe-4
That's not a GPSBabel error. Your wget is trying to fetch a page that Google doesn't want to send you. Error 404 is "not found"
and you can see that in your browser.

The output=js stuff was never an official API from Google Maps and may have been turned down.

RJL

On Mon, Feb 8, 2016 at 1:50 PM, pizzipie <[hidden email]> wrote:
Hi,

I'm trying to use the *Google Maps* format but keep getting error 404. Here
is my modified GPSBabel bash script w/o the '2&>/dev/null '.  I'm trying to
see what is going on.

*NOTE:* If I run the *URL - /https://goo.gl/maps/qDR1osRYwn62/* on a web
page, by itself,  my google map, complete with the route I selected, is
displayed.

#!/bin/sh
wget -O - "https://goo.gl/maps/qDR1osRYwn62&output=js" >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx

Command:  ./google-maps-to-garmin.sh

Result:

--2016-02-08 13:02:37--  https://goo.gl/maps/qDR1osRYwn62&output=js
Resolving goo.gl (goo.gl)... 63.110.67.57, 63.110.67.55, 63.110.67.54, ...
Connecting to goo.gl (goo.gl)|63.110.67.57|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-02-08 13:02:37 ERROR 404: Not Found.

XML Reader:Read error: Premature end of document. (google_map.js, line 1,
col 0)




--
View this message in context: http://gpsbabel.2324879.n4.nabble.com/Google-Maps-XML-google-URL-not-working-tp11963.html
Sent from the GPSBabel - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

pizzipie
GPSBabel documentation Says"

Google Maps XML (google) wrote
 If you use a Unix-compatible operating system, this shell script might be useful:

#!/bin/sh
FROM="233 S. Upper Wacker Dr, Chicago, IL"
TO="1060 W. Addison St, Chicago, IL"
wget -O - "http://maps.google.com/maps?q=$FROM to $TO&output=js" \
2&>/dev/null >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx
 In my case the URL returned by Google Maps is: https://goo.gl/maps/qDR1osRYwn62&output=js. I added the '&output=js' as suggested by GPSBabel above

Google URL Shortner Says: "404: Page not found – the page https://goo.gl/maps/qDR1osRYwn62&output=js does not exist."

Any idea how to make this work??

R

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

tsteven4-2
I can't try it right now, but I think the output=js thing doesn't work any more.  Try the googledir format.  I think the doc has some escaping problems, I changed the bold line below.

This format can...

  • read tracks

This format is designed to read the XML emitted when you use the Google Directions API.

If you use a Unix-compatible operating system, this shell script might be useful:

#!/bin/sh 
FROM="233 S. Upper Wacker Dr, Chicago, IL" 
TO="1060 W. Addison St, Chicago, IL" 
wget -O - "http://maps.googleapis.com/maps/api/directions/xml?origin=$FROM&destination=$TO&sensor=false" \
2&>/dev/null >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx


On 2/8/2016 5:43 PM, pizzipie wrote:
GPSBabel documentation Says"


Google Maps XML (google) wrote
 If you use a Unix-compatible operating system, this shell script might be
useful:

#!/bin/sh
FROM="233 S. Upper Wacker Dr, Chicago, IL" 
TO="1060 W. Addison St, Chicago, IL" 
wget -O - "http://maps.google.com/maps?q=$FROM to $TO&output=js" \
2&>/dev/null >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx
 In my case the URL returned by Google Maps is:
*https://goo.gl/maps/qDR1osRYwn62*&output=js. I added the '&output=js' as
suggested by GPSBabel above

Google URL Shortner Says: "404: Page not found – the page
https://goo.gl/maps/qDR1osRYwn62&output=js does not exist."

Any idea how to make this work??

R





--
View this message in context: http://gpsbabel.2324879.n4.nabble.com/Google-Maps-XML-google-URL-not-working-tp11963p11967.html
Sent from the GPSBabel - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

Robert Lipe-4
Good call, Steven.  'google' instead of 'google_map' seems to be a much better traveled road.

I don't see evidence that google_map has been mentioned on the list in any non-mechanical way since 2010. I spent a ridiculous amount of time dragging that format into 1.5 when I should have simply removed it.

Does anyone see a reason to NOT drop this format? It's just misleading in contemporary times.

On Mon, Feb 8, 2016 at 7:15 PM, tsteven4 <[hidden email]> wrote:
I can't try it right now, but I think the output=js thing doesn't work any more.  Try the googledir format.  I think the doc has some escaping problems, I changed the bold line below.

This format can...

  • read tracks

This format is designed to read the XML emitted when you use the Google Directions API.

If you use a Unix-compatible operating system, this shell script might be useful:

#!/bin/sh 
FROM="233 S. Upper Wacker Dr, Chicago, IL" 
TO="1060 W. Addison St, Chicago, IL" 
wget -O - "http://maps.googleapis.com/maps/api/directions/xml?origin=$FROM&destination=$TO&sensor=false" \
2&>/dev/null >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx


On 2/8/2016 5:43 PM, pizzipie wrote:
GPSBabel documentation Says"


Google Maps XML (google) wrote
 If you use a Unix-compatible operating system, this shell script might be
useful:

#!/bin/sh
FROM="233 S. Upper Wacker Dr, Chicago, IL" 
TO="1060 W. Addison St, Chicago, IL" 
wget -O - "http://maps.google.com/maps?q=$FROM to $TO&output=js" \
2&>/dev/null >google_map.js
gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx
 In my case the URL returned by Google Maps is:
*https://goo.gl/maps/qDR1osRYwn62*&output=js. I added the '&output=js' as
suggested by GPSBabel above

Google URL Shortner Says: "404: Page not found – the page
https://goo.gl/maps/qDR1osRYwn62&output=js does not exist."

Any idea how to make this work??

R





--
View this message in context: http://gpsbabel.2324879.n4.nabble.com/Google-Maps-XML-google-URL-not-working-tp11963p11967.html
Sent from the GPSBabel - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

pizzipie
google_map.gpxgoogle_map.js


My OS is Ubuntu 14.04.

I ran your script and the results are attached.

The google_map.js file contains a lot of stuff. The
google_map.gpx file contains basically nothing.

I guess this means I can't create a map in Google Maps with multiple destinations and use GPSBabel Google Maps XML (google)  to create a gpx file that can be uploaded to my Garmin GPSmap 76cx, eh?

R
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

Robert Lipe-4
Even if you could, your 76 wouldn't route it sensibly.  Well, unless you're in a boat or a helicopter, but then you probably wouldn't be using Google's driving directions.

http://www.gpsfaqs.org/faqs/garmin/xseries/g76csx/routes.html

Seriously, for multipoint routing in a car, you really just want a sequence of points (name them sensibly so you know when you leave town X you're heading to town X+1) and let the device route you on the fly.  Even on the Garmins that WILL do multipoint routing, this tends to work badly because one of the points will be 3 feet on the other side of a divided road and it'll run you up an exit and into a U-turn and other crazy things.

You've managed to step into an impressive of landmines. Wow. 



On Mon, Feb 8, 2016 at 11:15 PM, pizzipie <[hidden email]> wrote:
google_map.gpx
<http://gpsbabel.2324879.n4.nabble.com/file/n11970/google_map.gpx>
google_map.js
<http://gpsbabel.2324879.n4.nabble.com/file/n11970/google_map.js>


My OS is Ubuntu 14.04.

I ran your script and the results are attached.

The google_map.js file contains a lot of stuff. The
google_map.gpx file contains basically nothing.

I guess this means I can't create a map in Google Maps with multiple
destinations and use GPSBabel Google Maps XML (google)  to create a gpx file
that can be uploaded to my Garmin GPSmap 76cx, eh?

R



--
View this message in context: http://gpsbabel.2324879.n4.nabble.com/Google-Maps-XML-google-URL-not-working-tp11963p11970.html
Sent from the GPSBabel - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

Dr Rainer Woitok
In reply to this post by tsteven4-2
Steve,

On Monday, 2016-02-08 18:15:53 -0700, you wrote:

> ...
> > If you use a Unix-compatible operating system, this shell script might
> > be useful:
> >
> > #!/bin/sh
> > FROM="233 S. Upper Wacker Dr, Chicago, IL"
> > TO="1060 W. Addison St, Chicago, IL"
> > wget -O - "http://maps.googleapis.com/maps/api/directions/xml?origin=$FROM&destination=$TO&sensor=false" \
> > 2&>/dev/null >google_map.js

Could it be  that this "&>" here is some sort of  artefact caused by the
need to somehow escape the ">" character  from being interpreted by HTML
or whatever?

The sequence "&>" is understood by, for instance, the Bash Shell but not
necessarily by others.   It is causing the Bash Shell to send both, std-
out and stderr, to the file specified.   However, "2&>" is simply inter-
preted as "2 &>", that is, it just adds "2" as last argument to the com-
mand line.

So even in a Bash Shell this line doesn't seem to make much sense.

Sincerely,
  Rainer

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

tsteven4-2
thanks.  that was ONE of the remaining errors.  the script in the new
document actually works!
> #!/bin/sh
> FROM="233 S. Upper Wacker Dr, Chicago, IL"
> TO="1060 W. Addison St, Chicago, IL"
> URL="http://maps.googleapis.com/maps/api/directions/xml"
> wget -O - "$URL?origin=$FROM&destination=$TO&sensor=false" \
> 2>/dev/null >google_map.xml
> gpsbabel -i googledir -f google_map.xml -o gpx -F google_map.gpx



On 2/9/2016 3:54 AM, Dr Rainer Woitok wrote:

> Steve,
>
> On Monday, 2016-02-08 18:15:53 -0700, you wrote:
>
>> ...
>>> If you use a Unix-compatible operating system, this shell script might
>>> be useful:
>>>
>>> #!/bin/sh
>>> FROM="233 S. Upper Wacker Dr, Chicago, IL"
>>> TO="1060 W. Addison St, Chicago, IL"
>>> wget -O - "http://maps.googleapis.com/maps/api/directions/xml?origin=$FROM&destination=$TO&sensor=false" \
>>> 2&>/dev/null >google_map.js
> Could it be  that this "&>" here is some sort of  artefact caused by the
> need to somehow escape the ">" character  from being interpreted by HTML
> or whatever?
>
> The sequence "&>" is understood by, for instance, the Bash Shell but not
> necessarily by others.   It is causing the Bash Shell to send both, std-
> out and stderr, to the file specified.   However, "2&>" is simply inter-
> preted as "2 &>", that is, it just adds "2" as last argument to the com-
> mand line.
>
> So even in a Bash Shell this line doesn't seem to make much sense.
>
> Sincerely,
>    Rainer


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

tsteven4-2
In reply to this post by pizzipie
The example script had additional errors.  Try something like the following.
> #!/bin/sh
> FROM="233 S. Upper Wacker Dr, Chicago, IL"
> TO="1060 W. Addison St, Chicago, IL"
> URL="http://maps.googleapis.com/maps/api/directions/xml"
> wget -O - "$URL?origin=$FROM&destination=$TO&sensor=false" \
> 2>/dev/null >google_map.xml
> gpsbabel -i googledir -f google_map.xml -o gpx -F google_map.gpx
1. The redirection to /dev/null wasn't correct (but was harmless)
2. the input format needs to be googledir, not google
3. I renamed the captured output from js to xml, which is more
appropriate but doesn't really matter.
4. I shortened the lines using $URL so they didn't get truncated in our
pdf document.

On 2/8/2016 10:15 PM, pizzipie wrote:

> google_map.gpx
> <http://gpsbabel.2324879.n4.nabble.com/file/n11970/google_map.gpx>
> google_map.js
> <http://gpsbabel.2324879.n4.nabble.com/file/n11970/google_map.js>
>
>
> My OS is Ubuntu 14.04.
>
> I ran your script and the results are attached.
>
> The google_map.js file contains a lot of stuff. The
> google_map.gpx file contains basically nothing.
>
> I guess this means I can't create a map in Google Maps with multiple
> destinations and use GPSBabel Google Maps XML (google)  to create a gpx file
> that can be uploaded to my Garmin GPSmap 76cx, eh?
>
> R
>
>
>
> --
> View this message in context: http://gpsbabel.2324879.n4.nabble.com/Google-Maps-XML-google-URL-not-working-tp11963p11970.html
> Sent from the GPSBabel - General mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Gpsbabel-misc mailing list http://www.gpsbabel.org
> [hidden email]
> To unsubscribe, change list options, or see archives, visit:
> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Maps XML (google) - URL not working

pizzipie
In reply to this post by Robert Lipe-4
That explains a lot. I had a GPSmap 76 prior to the 76CSx. You could actually put in a 'route' and it would follow along that route. I guess the difference is that the 76CSx will calculate a route while the 76 didn't. I'll stick with going from point to point like I have been doing.
Loading...