Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #6182
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Google Maps Functions Integration |
| Date | 2013-10-31 13:45 +0100 |
| Message-ID | <bdf1noFh4rvU1@mid.individual.net> (permalink) |
| References | <99e97844-dbf7-4108-92bb-9c66248018c2@googlegroups.com> |
Hi Paul,
> Is there a google maps function to calculate driving distances
> between 2 places (United Kingdom) and can it be accessed from within
> a VO 2.8 application.
>
> I know i can calculate the distances if i go on the google maps
> webpage and key it in manually (for mileage expenses) but because i
> have many journeys to input it would save me a lot of time if i could
> automate this from within the application.
this is very easy, but limited if you don't like to pay for it. Please
read Google's terms about a commercial use of the map functions.
You can send a http request to Google's servers and they will return an
XML file with the requested information:
This is the code I'm using:
cHostName := "maps.google.it"
cURL := ParmSubst(
"maps/api/directions/xml?origin=%1&destination=%2&sensor=false",
self:_FixAdresse( _cStartAdresse ), self:_FixAdresse( _cZielAdresse ) )
oHttp := clsHttpComm{ cHostName }
oHttp:ServerName := cHostName
while ( _nLastCall + 0.30 ) >= Seconds()
Sleep( 300 )
debOut( "Sleeping 300 milli-seconds" )
end
_cXMLResult := oHttp:GetResult( cURL )
if oHttp:Error
return false
endif
You need to pass in the adress in the format Google Maps likes - try on
their Maps page.
HTH
Wolfgang
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Google Maps Functions Integration Whizzwilly <whizzwilly@hotmail.co.uk> - 2013-10-30 11:01 -0700
Re: Google Maps Functions Integration "Gerhard Bunzel" <g.bunzel@domonet.de> - 2013-10-31 00:54 +0100
Re: Google Maps Functions Integration Whizzwilly <whizzwilly@hotmail.co.uk> - 2013-10-31 03:13 -0700
Re: Google Maps Functions Integration "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-10-31 13:45 +0100
Re: Google Maps Functions Integration Whizzwilly <whizzwilly@hotmail.co.uk> - 2013-11-01 10:19 -0700
Re: Google Maps Functions Integration "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-11-01 21:11 +0100
csiph-web