Sub Globals
Dim lm As LocationManager
Dim GPS_Longitud As Double
Dim GPS_Latitud As Double
dim FlagCheckGPS As Boolean
' ...........
' ...........
' ...........
GPS_Longitud = 0
GPS_Latitud = 0
FlagCheckGPS = false
lm.Initialize("Localizacion")
lm.requestMobileLocation ' activa la localización - poner flag a verdadero FlagCheckGPS = true
lm.stopMobileListening ' para la localizacion - poner flag a falso FlagCheckGPS = false
Sub Localizacion_ProviderDisabled (Provider As String)
If FlagCheckGPS Then Msgbox("Por favor, active la Ubicación","")
End Sub
Sub Localizacion_LocationChanged (Longitude As Double, Latitude As Double, Altitude As Double, Accuracy As Float, Bearing As Float, Provider As String, Speed As Float, Time As Long)
GPS_Latitud = Latitude
GPS_Longitud = Longitude
if FlagCheckGPS then PintarCoordenadasGPS
End Sub
Sub PintarCoordenadasGPS
' pinta o emplea las coordenadas
End Sub