PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD20 - GglAddressToCoordinates fails when called to fast
WD20 - GglAddressToCoordinates fails when called to fast
Iniciado por guest, 02,jun. 2016 20:02 - 2 respuestas
Publicado el 02,junio 2016 - 20:02
Hi,

I'm trying to get the coordinates of a couple addresses using the GglAddressToCoordinates() function.
I noticed it fails every now and then and after some testing it looks like you cannot call this function too fast one after another.
FOR EACH qry_Adresses
aLocation = GglAddressToCoordinates(qry_Adresses.Address)
END

It does work however if I add aa multitask(10) between each call. But that slows down too much.
Is there another way to get coordinates of say 25 adresses at a time?
Publicado el 03,junio 2016 - 09:40
Google uses these standard limits
2,500 free requests per day
10 requests per second

Until now I got the coordinates every time addresses were shown on a map.
I'm writing a little routine now to get cordinates ones per address and save them in my database. Then I can work around the limits and it avoid a certain latency showing the map.
Publicado el 05,junio 2016 - 11:56
Hi Arie,

There are other api on the web that can give you lattitude and longitude out of an adres / zip code etc. There are free ones as well. ( not all are reliable t hough !)

I did some experimenting with it and yes I to save the lat and long in db as well

Remenber that google is free as long as the map is free accesible to any one!!. If you plan using it in say a pasword protected area then it is not free! I guess the same applies for using it in a windev app.

Regards
Allard