PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WM21] I can't get my coordinates
[WM21] I can't get my coordinates
Iniciado por guest, 22,may. 2017 23:24 - No hay respuesta
Publicado el 22,mayo 2017 - 23:24
Good afternoon

Has anyone done anything with geolocation?
I can't get my coordinates, this is my code.

//-----------------------------------------------------------------------------------------------------//

GPSInitParameter(gpsAuto,gpsAltitude+gpsDirection+gpsSpeed+gpsPrecisionHigh+gpsEnergyMedium)

MyPosition is geoPosition
MyPosition = GPSGetPosition()
IF NOT ErrorOccurred THEN
Info("Error")
END

MyAddress is Address
MyAddress = geoGetAddress(MyPosition..Latitude + "," + MyPosition..Longitude)
IF NOT ErrorOccurred = False THEN
Info("Error")
END

Info(MyAddress..City + " - " + MyAddress..ZipCode)

//-----------------------------------------------------------------------------------------------------//

I'm working on Android, I have the key provided by google for the application.
The geoGetAddress works if I give you the coordinates directly

Thanks in advance.