Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 12 Monaten
Letzter Beitrag:
vor 1 Jahr, 12 Monaten
Beteiligte Autoren:
Arie, Steven Sitas, Jan de Bruin, Fabrice Harari, Sammy Broeders

WD20 - Script error using MAP control

Startbeitrag von Arie am 23.06.2016 08:08


as of today I'm getting java script errors in my WD application.
This is caused by the map control which tries to execute a html-script (create as a tamp file in c:\users\arie\appdata\loca\temp
When I open this file in a browser myself it's telling me the Google map api key is missing.

That is true. So I added this line of code, using a valid API key

But still the error remains. Also the generated temporary HTML file does not show me this key, which I would expect to be in it somewhere.

Anyone knows about this error?
Does it matter where in my code the MapLicenseGgl() is used?



I have the same problems :mad:


von Jan de Bruin - am 23.06.2016 08:11

I had a java update last night.
Maybe that is the problem ??


von Jan de Bruin - am 23.06.2016 08:31
That looks like NLexit instead of BRexit :-(

For now I removed the map control (wasn't used very much in my app anyway)
But I will try to solve it anyway

von Arie - am 23.06.2016 08:33
Probably! Windows forced a restart of my laptop this morning

But my app runs on a terminal server environment at the customers site. I can't do anything about that, like undoing such updates.

von Arie - am 23.06.2016 08:35
Looks like we are not the only ones


von Arie - am 23.06.2016 08:42
Error is caused by a change in the Google policy last night, but Google reverted that already.

According to our French collegues the function MapLicenseGgl() should be used BEFORE opening windows, i.e. in the project init section.

However, the old situation seems to work again, so I cannot confirm if that works.

von Arie - am 23.06.2016 09:02
go here : https://developers.google.com/maps/documentation/javascript/get-api-key

and get a javascript key.
In the PROJECT CODE of your app(s) add the following:

gsGoogleMAPSID is string

Do the same for WD and WebDEV apps.
Most of your WebDEV apps (at your users sites) will still work, even if you don't add the above code.
BUT when you test them from a NEW website domain (or your localhost) they will fail ...

Steven Sitas

von Steven Sitas - am 23.06.2016 10:06

I still have the same problem after your solution. I add it to the project code.
Is there something else i need to do?


von Sammy Broeders - am 23.06.2016 14:30
It works fine here and at my customers ...
One thing to point out is that my projects are all unicode, so my strings are actually unicode strings. Maybe that's the problem ?
You could try : MapLicenseGgl("yourkey") directly, without passing it a string

Steven Sitas

von Steven Sitas - am 23.06.2016 16:17
FYI: PCSoft has published 2 new post on its technical blog (french) on this specific subject.
I do not know if they are available in english, but worse case scenario: google translate is your friend

Best regards

von Fabrice Harari - am 23.06.2016 17:26
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.