Welcome! Log In Create A New Profile

Advanced

New google api key rejected in Windev/Webdev/WM 22

Posted by Steve.M 
Google is updating their google maps platform:

In the meanwhile I updated to the new policy terms, i noticed that windev/webdev/windev Mobile is rejecting this new key (Version 22)?

Anyone else that has problems with this migration? From 11 june 2018 the old keys won't be usable anymore. This seems like a big issue if the new keys won't be accepted...
Version 23 is ok

I used the map control in a windev app and it works exactly as expected

Regards
Allard
Hi

I am using keyless api call from google map, does it mean that
I won't get any mapViews from wm22 map controls even I can
get GPSGetPosition() work after Jun 11, 2018.

Thx in advance

King
well,

I tried without code in webdev22 and it worked on my pc but when I put it on the net it didnot anymore.
Now version 23 I did a map in windev and that still works when it runs in production.

regards
Allard
Re: New google api key rejected in Windev/Webdev/WM 22
November 07, 2018 05:02AM
Hmm - I'm stuck on V22 until V24 arrives.

Just to be sure - could someone show me the syntax using the api key


The help file says ...
Retrieving a map in your applications or in your sites

To include a map that is using the Google Maps service in your applications or in your sites:
Generate a Google key. This key is supplied by Google. See [developers.google.com] for more details. Caution: the address of this page may have been modified since the publication date of this page.
Create an Image control in your WINDEV or WEBDEV project. This control will be used to display the requested map.
In the code used to retrieve the map, assign the result of GglGetStaticMap to the Image control. This function expects the following parameters:
the Google key

the latitude and longitude of the central point of the map
the zoom performed
the size of image to retrieve. The maximum size is set to 640 x 640. This limit is defined by the Google Maps service at the date of publication of this page.
the type of requested map (road map, satellite, ...).


.. but I don't see the syntax for providing the google key.

Alternatively - anyone know of a workaround using java script?

Regards,
Derek
Re: New google api key rejected in Windev/Webdev/WM 22
November 07, 2018 09:09AM
Derek,

I see 4 syntaxes of this function in the help, where the 3rd an 4th are referring to the API key. In fact these are the same as 1 and 2 WITH the option for the Google key as the extra (be it the first) parameter. Isn't that what you need?

<Result> = GglGetStaticMap(<Google Key> , <Latitude> , <Longitude> , <Zoom> , <Image Width> , <Image Height> [, <Type of Map> [, <Advanced Parameters>]])

Arie
Re: New google api key rejected in Windev/Webdev/WM 22
November 07, 2018 06:58PM
Hi Arie,

Yes, thank you, you are right. I had tried that syntax but forgot about the other functions like GglAddressToCoordinates which also now needs a key.

Not working yet - but as it is not a priority for me - if it doesn't work on WebDev 22 - I will probably be on WebDev 24 before I get back to this.

Regards,
Derek
Re: New google api key rejected in Windev/Webdev/WM 22
November 07, 2018 08:21PM
Hi Derek,

I did a little test in WD22 and it works too…

gsGoogleApiGeoKey is string = "AIzaSyCDXsC75 etc etc my key"
MyAddress is gglCoordinate
MyAddress = GglAddressToCoordinates(gsGoogleApiGeoKey,"City Hall 64 Victoria Street London")

Gives the right coordinates.

Can you give us the code, you have issues with?

Arie
Re: New google api key rejected in Windev/Webdev/WM 22
November 08, 2018 12:07AM
Hi Arie

Thanks very much for that. Greatly appreciated.

I may in fact have configured security on the google key or made some other mistake. I will re-check this and try again as soon as I can manage some time (a few days away).

If it's working for you then I have certainly made some sort of mistake.

Regards,
Derek
I got it working with my new api key by using MapLicenseGgl(myNewAPIKey) in top init of project, not init in windows.

Crazy...

HTH

King
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: