PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
GPS - Address of a monument - Endereço de um monumento
GPS - Address of a monument - Endereço de um monumento
Started by adrianoboller, Nov., 24 2014 1:14 PM - No answer
Connect yourself…
adrianoboller
#1
Registered member
3,662 messages
Popularité : +175 (223 votes)
Posted on November, 24 2014 - 1:14 PM
Procedure
GPS_LocalizaEnderecoMonumento
(
LOCAL
ControleMapa
,
LOCAL
EnderecoMonumento
,
LOCAL
TipoRetorno
,
LOCAL
WindowSN
)
ok
=
False
Retorno is
string
=
""
MyAddress is
Address
MyAddress
=
geoGetAddress
(
EnderecoMonumento
)
Pos is
geoPosition
Pos.Latitude
=
MyAddress
..
Position.Latitude
Pos.Longitude
=
MyAddress
..
Position.Longitude
IF
ControleMapa
=
""
THEN
ControleMapa
=
gloControleMapa
END
IF
GPSStatus
(
) =
gpsEnabled
OR
GPSStatus
(
) =
gpsAvailable
THEN
IF
ErrorOccurred
=
True
THEN
IF
TipoRetorno
=
1
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
AdminArea
)
END
Retorno
=
MyAddress
..
AdminArea
ELSE IF
TipoRetorno
=
2
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
City
)
END
Retorno
=
MyAddress
..
City
ELSE IF
TipoRetorno
=
3
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Country
)
END
Retorno
=
MyAddress
..
Country
ELSE IF
TipoRetorno
=
4
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Label
)
END
Retorno
=
MyAddress
..
Label
ELSE IF
TipoRetorno
=
5
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Position
)
END
Retorno
=
MyAddress
..
Position
ELSE IF
TipoRetorno
=
6
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Altitude
)
END
Retorno
=
MyAddress.Position
..
Altitude
ELSE IF
TipoRetorno
=
7
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
AltitudeValid
)
END
Retorno
=
MyAddress.Position
..
AltitudeValid
ELSE IF
TipoRetorno
=
8
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Direction
)
END
Retorno
=
MyAddress.Position
..
Direction
ELSE IF
TipoRetorno
=
9
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
DirectionValid
)
END
Retorno
=
MyAddress.Position
..
DirectionValid
ELSE IF
TipoRetorno
=
10
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Latitude
)
END
Retorno
=
MyAddress.Position
..
Latitude
ELSE IF
TipoRetorno
=
11
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Longitude
)
END
Retorno
=
MyAddress.Position
..
Longitude
ELSE IF
TipoRetorno
=
12
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
MeasurementDate
)
END
Retorno
=
MyAddress.Position
..
MeasurementDate
ELSE IF
TipoRetorno
=
13
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
PositionValid
)
END
Retorno
=
MyAddress.Position
..
PositionValid
ELSE IF
TipoRetorno
=
14
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Precision
)
END
Retorno
=
MyAddress.Position
..
Precision
ELSE IF
TipoRetorno
=
15
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
PrecisionValid
)
END
Retorno
=
MyAddress.Position
..
PrecisionValid
ELSE IF
TipoRetorno
=
16
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Speed
)
END
Retorno
=
MyAddress.Position
..
Speed
ELSE IF
TipoRetorno
=
17
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
SpeedValid
)
END
Retorno
=
MyAddress.Position
..
SpeedValid
ELSE IF
TipoRetorno
=
18
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Street
)
END
Retorno
=
MyAddress
..
Street
ELSE IF
TipoRetorno
=
19
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Type
)
END
Retorno
=
MyAddress
..
Type
ELSE IF
TipoRetorno
=
20
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress
..
ZipCode
)
END
Retorno
=
MyAddress
..
ZipCode
ELSE
IF
TipoRetorno
=
21
THEN
Retorno
=
MyAddress
..
AdminArea
+
";"
+
MyAddress
..
City
+
";"
+
MyAddress
..
Country
+
";"
+
MyAddress
..
Label
+
";"
+
...
MyAddress
..
Position
+
";"
+
MyAddress.Position
..
Altitude
+
";"
+
MyAddress.Position
..
AltitudeValid
+
";"
+
...
MyAddress.Position
..
Direction
+
";"
+
MyAddress.Position
..
DirectionValid
+
";"
+
MyAddress.Position
..
Latitude
+
";"
+
...
MyAddress.Position
..
Longitude
+
";"
+
MyAddress.Position
..
MeasurementDate
+
";"
+
MyAddress.Position
..
PositionValid
+
";"
+
...
MyAddress.Position
..
Precision
+
";"
+
MyAddress.Position
..
PrecisionValid
+
";"
+
MyAddress.Position
..
Speed
+
";"
+
...
MyAddress.Position
..
SpeedValid
+
";"
+
MyAddress
..
Street
+
";"
+
MyAddress
..
Type
+
";"
+
MyAddress
..
ZipCode
ELSE IF
TipoRetorno
=
22
THEN
IF
WindowSN
=
"S"
Info
(
MyAddress.Position
..
Latitude
+
"; "
+
MyAddress.Position
..
Longitude
)
END
Retorno
=
MyAddress.Position
..
Latitude
+
"; "
+
MyAddress.Position
..
Longitude
ELSE IF
TipoRetorno
=
23
THEN
IF
WindowSN
=
"S"
Info
(
"Latitude: "
+
MyAddress.Position
..
Latitude
+
"; Longitude: "
+
MyAddress.Position
..
Longitude
)
END
Retorno
=
"Latitude: "
+
MyAddress.Position
..
Latitude
+
"; Longitude: "
+
MyAddress.Position
..
Longitude
ELSE IF
TipoRetorno
=
24
THEN
//Endereço Completo
IF
WindowSN
=
"S"
Info
(
MyAddress
..
Label
+
"; "
+
MyAddress
..
Street
+
";"
+
MyAddress
..
City
+
";"
+
MyAddress
..
Country
+
";"
+
MyAddress
..
ZipCode
+
";"
+
MyAddress.Position
..
Latitude
+
";"
+
MyAddress.Position
..
Longitude
)
END
Retorno
=
MyAddress
..
Label
+
"; "
+
MyAddress
..
Street
+
";"
+
MyAddress
..
City
+
";"
+
MyAddress
..
Country
+
";"
+
MyAddress
..
ZipCode
+
";"
+
MyAddress.Position
..
Latitude
+
";"
+
MyAddress.Position
..
Longitude
ELSE IF
TipoRetorno
=
25
THEN
//Endereço Completo
IF
WindowSN
=
"S"
Info
(
"Local: "
+
MyAddress
..
Label
+
"; Endereço: "
+
MyAddress
..
Street
+
"; Cidade: "
+
MyAddress
..
City
+
"; País: "
+
MyAddress
..
Country
+
"; CEP: "
+
MyAddress
..
ZipCode
+
"; Latitude: "
+
MyAddress.Position
..
Latitude
+
"; Longitude: "
+
MyAddress.Position
..
Longitude
)
END
Retorno
=
"Local: "
+
MyAddress
..
Label
+
"; Endereço: "
+
MyAddress
..
Street
+
"; Cidade: "
+
MyAddress
..
City
+
"; País: "
+
MyAddress
..
Country
+
"; CEP: "
+
MyAddress
..
ZipCode
+
"; Latitude: "
+
MyAddress.Position
..
Latitude
+
"; Longitude: "
+
MyAddress.Position
..
Longitude
END
ELSE
IF
WindowSN
=
"S"
Info
(
"Endereço não encontrado"
)
END
Retorno
=
"Endereço não encontrado"
END
ok
=
MapDisplayPosition
(
ControleMapa
,
Pos
)
IF
ok
=
True
THEN
IF
WindowSN
=
"S"
THEN
Info
(
"Posição detectada"
)
END
Retorno
=
"Posição detectada"
ELSE
IF
WindowSN
=
"S"
THEN
Info
(
"Posição não foi detectada"
)
END
Retorno
=
"Posição não foi detectada"
END
ELSE IF
GPSStatus
(
) =
gpsDisabled
THEN
Info
(
"GPS Desabilitado!"
)
ELSE IF
GPSStatus
(
) =
gpsOffService
OR
GPSStatus
(
) =
gpsUnavailable
OR
GPSStatus
(
) =
gpsError
THEN
Info
(
"Região sem serviço de GPS"
,
ErrorInfo
(
)
)
END
RESULT
(
Retorno
)
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text