(IF (SETQ ARQKEY (FINDFILE "GOOGLEKEY.TXT"))
(ALERT "file GOOGLEKEY.TXT OK.")
(ALERT "File GOOGLEKEY.TXT not found!")
)
(IF ARQKEY
(PROGN
(SETQ ARQ (OPEN ARQKEY "r")) (SETQ MYKEY (READ-LINE ARQ)) (CLOSE ARQ)
(setq MYSTR (STRCAT "https://maps.googleapis.com/maps/api/staticmap"
"?center=-22.876012,-42.445214"
"&size=400x400"
"&scale=1"
"&zoom=18"
"&format=jpg"
"&maptype=satellite"
"&key=" MYKEY))
(SETQ MYIMG (vl-filename-mktemp "MYIMG" (GETVAR "TEMPPREFIX") ".jpg"))
(SETQ MYARQ (vk_DownloadFile MYSTR MYIMG))
(IF MYARQ (ALERT MYARQ))
)
)
(PRINC)
Yes, with your help, Vovka, it was easy.
The next step, the most important is to insert the image.
The conversion of geographic coordinates to UTM does not have to, since I have some guidelines for this.
What I really need are: scale, angle of rotation and the insertion point because a center point is passed and the image is inserted in the lower left corner.
I also know that the size and zoom will also interfere but I can see later maybe.
Can you help me with these Vovka too?