Re: Google Static Maps in IDL [message #80751] |
Thu, 12 July 2012 04:50  |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 11 juil, 23:37, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>> To this end, I built a small object that exposes quite
>> a bit of the Google Static Map API:
>
>> https://developers.google.com/maps/documentation/staticmaps/
>
> I've been having a couple of problems with this today.
> Does anyone have any special knowledge of firewalls?
> This seems to be a firewall issue to me.
>
> I use the IDLnetURL object to connect to the Internet.
> My NASA client is having a problem connecting to the Google
> static map location and retrieving a map. The command
> we use looks like this:
>
> cmd = 'http://maps.googleapis.com/maps/api/staticmap?'+ $
> 'center=35.8271,-106.6480&zoom=12&size=640x390' + $
> '&maptype=satellite&sensor=false&format=png32'
> netObj = Obj_New('IDLnetURL')
> void = netObj -> Get(URL=cmd, FILENAME='gmap.png')
> Obj_Destroy, netObj
>
> We get the following error message when we issue this command:
>
> IDLNETURL::GET: CCurlException: Error: Http Get Request Failed.
> Error = Failed writing body (0 != 11946), Curl Error Code = 23..
>
> However, if we issue this command:
>
> cmd = 'http://www.idlcoyote.com/misc/toucan.png'
> netObj = Obj_New('IDLnetURL')
> void = netObj -> Get(URL=cmd, FILENAME='gmap.png')
> Obj_Destroy, netObj
>
> We have no problem whatsoever.
>
> Are the properties on the end of the Google URL giving
> us problems with the NASA firewall, do you think?
>
> I appreciate any help you can give.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>
I used your command and could get the image without any problem.
(IDL8.2 win32 and Win7 32 bits).
You might check rights for writing on *your* machine (according to
curl error).
alain.
|
|
|