PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → MapAddItinerary to Windev Mobile for < version 20
MapAddItinerary to Windev Mobile for < version 20
Débuté par adrianoboller, 13 déc. 2014 20:35 - 18 réponses
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:35




Link de como fazer um itinerario

http://maps.googleapis.com/maps/api/directions/xml?origin=dr.+goulin+1661&destination=clavio+molinari+1029


Xml Result
<status>OK</status>
<route>
<summary>Av. Victor Ferreira do Amaral</summary>
<leg>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4189503</lat>
<lng>-49.2445516</lng>
</start_location>
<end_location>
<lat>-25.4189929</lat>
<lng>-49.2440539</lng>
</end_location>
<polyline>
<points>lsczClaqkHFcB</points>
</polyline>
<duration>
<value>6</value>
<text>1 min</text>
</duration>
<html_instructions>Siga na direção <b>leste</b> na <b>R. Dr. Goulin</b> em direção à <b>Rua Flávio Dallegrave</b></html_instructions>
<distance>
<value>50</value>
<text>50 m</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4189929</lat>
<lng>-49.2440539</lng>
</start_location>
<end_location>
<lat>-25.4177243</lat>
<lng>-49.2437741</lng>
</end_location>
<polyline>
<points>tsczCh~pkHUGa@Ka@G[Eq@IuAK</points>
</polyline>
<duration>
<value>38</value>
<text>1 min</text>
</duration>
<html_instructions>Vire à <b>esquerda</b> na <b>Rua Flávio Dallegrave</b></html_instructions>
<distance>
<value>144</value>
<text>0,1 km</text>
</distance>
<maneuver>turn-left</maneuver>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4177243</lat>
<lng>-49.2437741</lng>
</start_location>
<end_location>
<lat>-25.4179433</lat>
<lng>-49.2411403</lng>
</end_location>
<polyline>
<points>vkczCp|pkHD_@Bu@@S@U@e@@K@o@@UDy@@a@HsB@a@@c@</points>
</polyline>
<duration>
<value>39</value>
<text>1 min</text>
</duration>
<html_instructions>Pegue a 1ª <b>à direita</b> para <b>R. Augusto Stresser</b></html_instructions>
<distance>
<value>266</value>
<text>0,3 km</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4179433</lat>
<lng>-49.2411403</lng>
</start_location>
<end_location>
<lat>-25.4280589</lat>
<lng>-49.2415964</lng>
</end_location>
<polyline>
<points>bmczCblpkHnAq@RKb@UHEr@_@jAm@`Ag@`@QPIf@QJEHAJAHAPA^@NBPD@@b@VvCrBZX`D|Bf@^ZV`Av@TNvA|@h@VVJXHXDfANV@T?T?VCTC`@Eb@IfAQfAS^M|Bm@ZKb@SXK@AJENIj@U</points>
</polyline>
<duration>
<value>91</value>
<text>2 minutos</text>
</duration>
<html_instructions>Vire à <b>direita</b> na <b>Av. Nossa Senhora da Luz</b></html_instructions>
<distance>
<value>1259</value>
<text>1,3 km</text>
</distance>
<maneuver>turn-right</maneuver>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4280589</lat>
<lng>-49.2415964</lng>
</start_location>
<end_location>
<lat>-25.4282871</lat>
<lng>-49.2414666</lng>
</end_location>
<polyline>
<points>jlezC~npkHl@Y</points>
</polyline>
<duration>
<value>2</value>
<text>1 min</text>
</duration>
<html_instructions>Continue para <b>Av. Mal. Humberto de Alencar Castelo Branco</b></html_instructions>
<distance>
<value>29</value>
<text>29 m</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4282871</lat>
<lng>-49.2414666</lng>
</start_location>
<end_location>
<lat>-25.4276407</lat>
<lng>-49.2405798</lng>
</end_location>
<polyline>
<points>xmezCdnpkHJSBGBG@C@E?C?A?C?CAECCWGWEKCKEIGIEACEEGGGGGKKOKO</points>
</polyline>
<duration>
<value>20</value>
<text>1 min</text>
</duration>
<html_instructions>Curva acentuada à <b>esquerda</b> na rampa de acesso a <b>R. Papa Rafael</b></html_instructions>
<distance>
<value>142</value>
<text>0,1 km</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4276407</lat>
<lng>-49.2405798</lng>
</start_location>
<end_location>
<lat>-25.4273992</lat>
<lng>-49.2394639</lng>
</end_location>
<polyline>
<points>viezCrhpkHEIEKMg@I_@G]CSAQ?Y@c@</points>
</polyline>
<duration>
<value>8</value>
<text>1 min</text>
</duration>
<html_instructions>Continue para <b>R. Papa Rafael</b></html_instructions>
<distance>
<value>117</value>
<text>0,1 km</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4273992</lat>
<lng>-49.2394639</lng>
</start_location>
<end_location>
<lat>-25.4308316</lat>
<lng>-49.2076653</lng>
</end_location>
<polyline>
<points>fhezCrapkHNsCJqC?KZ_GF_AN}CP_DN}CHiABo@Da@@MZyE@[VyDH_BJ_BFoAFkADkA@_@BY@[NcCFiADo@Do@ZaHR}DV{DBc@TcEFwAFqBBq@Do@Bi@B_@f@uJP_DJkBHeBNoCNgC@YPgDPgD@W?E@KBWZmGBw@R}CD{@LiCDq@f@_K</points>
</polyline>
<duration>
<value>212</value>
<text>4 minutos</text>
</duration>
<html_instructions>Continue para <b>Av. Victor Ferreira do Amaral</b></html_instructions>
<distance>
<value>3216</value>
<text>3,2 km</text>
</distance>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4308316</lat>
<lng>-49.2076653</lng>
</start_location>
<end_location>
<lat>-25.4392423</lat>
<lng>-49.2122606</lng>
</end_location>
<polyline>
<points>t}ezC|zikHr@Vp@X|DfB\NnD~AdBv@dBv@bB|@fB|@bEdB~Ap@~Ar@p@Zn@Xn@Xn@Xn@Xn@Zp@Xn@X</points>
</polyline>
<duration>
<value>136</value>
<text>2 minutos</text>
</duration>
<html_instructions>Vire à <b>direita</b> na <b>R. Pastor Manoel Virgínio de Souza</b></html_instructions>
<distance>
<value>1043</value>
<text>1,0 km</text>
</distance>
<maneuver>turn-right</maneuver>
</step>
<step>
<travel_mode>DRIVING</travel_mode>
<start_location>
<lat>-25.4392423</lat>
<lng>-49.2122606</lng>
</start_location>
<end_location>
<lat>-25.4404691</lat>
<lng>-49.2094845</lng>
</end_location>
<polyline>
<points>frgzCrwjkHfAaDfAaDdAaD^eA</points>
</polyline>
<duration>
<value>59</value>
<text>1 min</text>
</duration>
<html_instructions>Vire à <b>esquerda</b> na <b>R. Clávio Molinari</b><div style="font-size:0.9em">O destino estará à esquerda</div></html_instructions>
<distance>
<value>310</value>
<text>0,3 km</text>
</distance>
<maneuver>turn-left</maneuver>
</step>
<duration>
<value>611</value>
<text>10 minutos</text>
</duration>
<distance>
<value>6576</value>
<text>6,6 km</text>
</distance>
<start_location>
<lat>-25.4189503</lat>
<lng>-49.2445516</lng>
</start_location>
<end_location>
<lat>-25.4404691</lat>
<lng>-49.2094845</lng>
</end_location>
<start_address>Rua Doutor Goulin, 1661 - Alto da Glória, Matriz, Curitiba - PR, 80040-280, Brasil</start_address>
<end_address>Rua Clávio Molinari, 1029 - Capão da Imbuia, Cajuru, Curitiba - PR, 82810-210, Brasil</end_address>
</leg>
<copyrights>Dados cartográficos ©2014 Google</copyrights>
<overview_polyline>
<points>lsczClaqkHFcBUGcASmAOuAKD_@DiAB{@JkCN{EpCyAbFgCx@[TGTCp@?`@Hd@X|JjH|AnAlBlA`Ab@r@N~APj@?rBWnCe@|C{@zAm@tB_ATg@@OAI[Kc@IUMYWg@s@KUWgAKq@Ak@\uIdA}Rb@yHv@}Lr@}Nb@mHn@_NZ_F\{GJcDLyBbCae@lAmU`AwRdBp@zEvBtGvChEtBfB|@bEdB~DdB`EhB`EhBtFkP</points>
</overview_polyline>
<bounds>
<southwest>
<lat>-25.4404691</lat>
<lng>-49.2445516</lng>
</southwest>
<northeast>
<lat>-25.4177243</lat>
<lng>-49.2076653</lng>
</northeast>
</bounds>
</route>
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:37
Procedure WS_CEP_Rota(LOCAL Origem, LOCAL Destino, LOCAL DebugSN)

//Origem ="dr goulin 1699 curitiba PR"
//Destino = "jose lopacinsk 500 curitiba PR"

IF GloDebugSN = "S" THEN
DebugSN = "S"
END



IF Origem <> "" AND Destino = "" THEN
Destino = Origem
END

nVirgula is int = 0

//VARIAIVEIS
nID_Numero is int = 1
nID_Endereco is int = 1
nID_Bairro01 is int = 1
nID_Bairro02 is int = 1
nID_Cidade01 is int = 1
nID_Cidade02 is int = 1
nID_Estado is int = 1
nID_Pais is int = 1
nID_CEP is int = 1
nQTD_ADDRESS_COMPONENT is int = 0

//Limpa variaveis
//Endereço de Origem
GloVoceEnderecoLongo = "ERRO"
GloDestinoEnderecoLongo = "ERRO"
GloVoceLatitude = 0
GloVoceLongitude = 0
GloDestinoLatitude = 0
GloDestinoLongitude = 0

//Norte
GloLatitudeNorte = ""
GloLongitudeNorte = ""

//Sul
GloLatitudeSul = ""
GloLongitudeSul = ""

//Tempo
GloTempoDestino = ""
GloTempoDestinoText = ""
GloTempoTaxi = ""

//Distancia
GloDistanciaDestino = ""
GloDistanciaDestinoText = ""
GloDistanciaTaxi = ""

//Rota
//GloDebugSN, GloVoceEnderecoLongo, GloVoceEndereco, GloDestinoEnderecoLongo, GloDestinoEndereco, GloTempoDestino, GloTempoDestinoText, GloTempoTaxi, GloDistanciaDestino, GloDistanciaDestinoText, GloDistanciaTaxi, GloVoceLatitude, GloVoceLongitude, GloDestinoLatitude, GloDestinoLongitude, GloLatitudeNorte, GloLongitudeNorte, GloLatitudeSul, GloLongitudeSul is string

//Origem
//LocEnderecoOrigem, LocEnderecoCurtoOrigem, LocNumeroOrigem, LocBairro01Origem, LocBairro02Origem, LocCidade01Origem, LocCidade02Origem, LocEstadoOrigem, LocPaisOrigem, LocCepOrigem, LocLatitudeOrigem, LocLongitudeOrigem, LocLatitudeOrigemNorte, LocLongitudeOrigemNorte, LocLatitudeOrigemSul, LocLongitudeOrigemSul is string = ""

//Destino
//LocEnderecoDestino, LocEnderecoCurtoDestino, LocNumeroDestino, LocBairro01Destino, LocBairro02Destino, LocCidade01Destino, LocCidade02Destino, LocEstadoDestino, LocPaisDestino, LocCepDestino, LocLatitudeDestino, LocLongitudeDestino, LocLatitudeDestinoNorte, LocLongitudeDestinoNorte, LocLatitudeDestinoSul, LocLongitudeDestinoSul is string = ""


ok is boolean = False

IF Origem <> "" AND Destino <> ""

ChangeCharset(charsetOccidental) // SEM ACENTO

Origem = Replace(Origem," ","+")

Origem = Capitalize(WS_RemoveAcentos(Origem))

Destino = Replace(Destino," ","+")

Destino = Capitalize( WS_RemoveAcentos(Destino))

//Aceita endereço e lat e long na origem e destino
UrlRota is string = "http://maps.googleapis.com/maps/api/directions/xml?origin="+Origem+"&destination="+Destino+"&sensor=false&mode=driving"

IF DebugSN ="S" THEN
Info("URL Busca Origem Google",UrlRota)
END
ok = HTTPRequest(UrlRota)


//Rota
IF ok = True THEN

XmlResultado is string = WS_Android_IOS_HTTPGetResult()

IF PositionOccurrence(XmlResultado,"<status>OK</status>",firstRank,FromBeginning) > 0 OR PositionOccurrence(XmlResultado,"<status>ok</status>",firstRank,FromBeginning) > 0

XmlResultado = WS_RemoveAcentos(XmlResultado) // retirou caracteres especiais

IF Length(XmlResultado) > 0 THEN

//Point Market
GloRotaEncode = XmlResultado
nInicioPoint is int = PositionOccurrence(XmlResultado,"<copyrights>",firstRank,FromBeginning)
GloRotaEncode = Middle(XmlResultado,nInicioPoint,Length(XmlResultado))
nInicioPoint = PositionOccurrence(XmlResultado,"<points>",firstRank,FromBeginning)
nFinalPoint is int = PositionOccurrence(XmlResultado,"</points>",firstRank,FromBeginning)
GloRotaEncode = Middle(XmlResultado,nInicioPoint,nFinalPoint-nInicioPoint)

//if DebugSN = "S"
Info("POINT",GloRotaEncode)
//end

sXmlResultadoRecorte is string = XmlResultado

//IMPORTANTE LIMPAR O XML

XmlResultado = WS_RemoveCaracteresRota(XmlResultado) // retirou os steps

IF DebugSN ="S" THEN
Info("Retorno XML Busca Origem",XmlResultado)
END
//Corta inicio
//////////////////////////////////////////////////////////////////////////////////////
nInicio is int = PositionOccurrence(XmlResultado,"</step>",lastRank,FromBeginning) + 7
XmlResultado = Middle(XmlResultado,nInicio,Length(XmlResultado))
XmlResultado = "<leg>"+XmlResultado

//Corta fim
nFim is int = PositionOccurrence(XmlResultado,"</leg>",firstRank,FromBeginning) + 5
XmlResultado = Middle(XmlResultado,1,nFim)
//////////////////////////////////////////////////////////////////////////////////////


IF IniOSMode() = True THEN

NoXml is string = XMLExtractString(XmlResultado,"leg")

//Endereço de Origem
GloVoceEnderecoLongo = XMLExtractString(NoXml,"start_address")
GloVoceEnderecoLongo = Capitalize(GloVoceEnderecoLongo)

//Endereço de Destino
GloDestinoEnderecoLongo = XMLExtractString(NoXml,"end_address")
GloDestinoEnderecoLongo = Capitalize(GloDestinoEnderecoLongo)

//Tempo
NoXml1 is string = XMLExtractString(NoXml,"duration")
GloTempoDestino = XMLExtractString(NoXml1,"value")
GloTempoDestinoText = XMLExtractString(NoXml1,"text")
GloTempoTaxi = GloTempoDestino

//Distancia
NoXml1 = XMLExtractString(NoXml,"distance")
GloDistanciaDestino =XMLExtractString(NoXml1,"value")
GloDistanciaDestinoText = XMLExtractString(NoXml1,"text")
GloDistanciaTaxi = GloDistanciaDestino

//Origem
NoXml1 = XMLExtractString(NoXml,"start_location")
IF Val(XMLExtractString(NoXml1,"lat")) < 0
GloVoceLatitude = XMLExtractString(NoXml1,"lat")
GloVoceLongitude = XMLExtractString(NoXml1,"lng")
END

//Destino
NoXml1 = XMLExtractString(NoXml,"end_location")
IF Val(XMLExtractString(NoXml1,"lat")) < 0 THEN
GloDestinoLatitude = XMLExtractString(NoXml1,"lat")
GloDestinoLongitude = XMLExtractString(NoXml1,"lng")
END


ELSE IF InAndroidMode() = True


//XML Leitura
XmlDoc02 is XMLDocument
XmlDoc02 = XMLOpen(XmlResultado,fromString)

//Endereço de Origem
GloVoceEnderecoLongo = XmlDoc02.leg.start_address
GloVoceEnderecoLongo = Capitalize(GloVoceEnderecoLongo)

//Endereço de Destino
GloDestinoEnderecoLongo = XmlDoc02.leg.end_address
GloDestinoEnderecoLongo = Capitalize(GloDestinoEnderecoLongo)

//Tempo
GloTempoDestino = XmlDoc02.leg.duration.value
GloTempoDestinoText = XmlDoc02.leg.duration.text
GloTempoTaxi = GloTempoDestino

//Distancia
GloDistanciaDestino = XmlDoc02.leg.distance.value
GloDistanciaDestinoText = XmlDoc02.leg.distance.text
GloDistanciaTaxi = GloDistanciaDestino

//Origem
IF XmlDoc02.leg.start_location.lat < 0
GloVoceLatitude = XmlDoc02.leg.start_location.lat
GloVoceLongitude = XmlDoc02.leg.start_location.lng
END

//Destino
IF XmlDoc02.leg.end_location.lat < 0 THEN
GloDestinoLatitude = XmlDoc02.leg.end_location.lat
GloDestinoLongitude = XmlDoc02.leg.end_location.lng
END


END

END

ELSE
GloDestinoEndereco = ""
GloDestinoEnderecoLongo = ""

GloTempoDestino = ""
GloDistanciaDestino = ""
END

END


END



IF DebugSN = "S" THEN
Info(GloRotaEncode)
Info("Origem:",GloVoceEnderecoLongo,GloVoceEndereco,"","Destino:",GloDestinoEnderecoLongo,GloDestinoEndereco,"","Tempo: "+GloTempoDestino,"Distancia: "+GloDistanciaDestino,"","Latitude Origem: "+GloVoceLatitude,"Longitute Origem: "+GloVoceLongitude,"","Latitude Destino: "+GloDestinoLatitude,"Longitude Destino: "+GloDestinoLongitude)
END

////Exemplo: Curitiba - Parana =>>> ( - )
IF QtdeOccurrence(GloVoceEnderecoLongo," - ") = 1
GloVoceEndereco = ""
GloVoceNumero = ""
GloVoceEnderecoLongo = "ERRO"
GloVoceLatitude = 0
GloVoceLongitude = 0
END
////Exemplo: Curitiba - Parana =>>> ( - )
IF QtdeOccurrence(GloDestinoEnderecoLongo," - ") = 1
GloDestinoEndereco = ""
GloDestinoNumero = ""
GloDestinoEnderecoLongo = "ERRO"
END
IF DebugSN = "S"
IF GloVoceEnderecoLongo = "ERRO" OR GloDestinoEnderecoLongo = "ERRO"
Info("Endereço inválido")
END
END

RESULT(GloVoceEnderecoLongo)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:38
Procedure WS_Rota_DecodePoints(encoded is string)

//WS_Rota_PlotarPontos("lsczClaqkHFcB")
//WS_Rota_PlotarPontos("tsczCh~pkHUGa@Ka@G[Eq@IuAK")
//WS_Rota_PlotarPontos("vkczCp|pkHM`DM`DI|BIzBC~@E|@E`AE`AOpECl@Ex@CbACl@Cl@IhBGlBGhBIjBIxCCr@EdB")
//WS_Rota_PlotarPontos("rfczCl|rkH|BL|BN")

encoded ="lsczClaqkHFcBUGcASmAOuAKM`DW~GMzDa@rKo@hQ]~KzF\TuHHoBFeBa@c@eBgB"

//encoded ="znizCzumjH_CYoDi@}AUYCs@Q"

poly is array of LatLng

b, Shift, Tempresult is int = 0
Index, nLen is int = 0
Lat, Lng is real

nLen = Length(encoded)

WHILE (Index < nLen)

LOOP

Index++
b = Asc(encoded[[Index]]) - 63
Tempresult = BinaryOR(Tempresult,bitLeftShift(BinaryAND(b,0x1f),Shift))
Shift = Shift + 5

DO WHILE(b >= 0x20)

dlat is int

IF BinaryAND(Tempresult,1) <> 0 THEN

dlat = BinaryNOT(bitRightShift(Tempresult,1))

ELSE

dlat = bitRightShift(Tempresult,1)

END

Lat += dlat
Shift = 0
Tempresult = 0

LOOP

Index++
b = Asc(encoded[[Index]]) - 63
Tempresult = BinaryOR(Tempresult,bitLeftShift( BinaryAND(b,0x1f),Shift))
Shift += 5;

DO WHILE (b >= 0x20)

Dlng is int

IF BinaryAND(Tempresult, 1) <> 0 THEN

Dlng = BinaryNOT(bitRightShift(Tempresult,1))
ELSE

Dlng = bitRightShift(Tempresult,1)

END

Lng += Dlng;
Shift = 0
Tempresult = 0

point is LatLng
point.Latitude = Lat / 100000
point.Longitude = Lng / 100000
ArrayAdd(poly,point)

END

//sTempstr is string
//FOR EACH point OF poly
//
//sTempstr = sTempstr + point.Latitude + " " + point.Longitude + CRLF
//
//
//END
////info (sTempstr)

RESULT poly

//-------------------------------------------------------------C#

//arrSplitRuaNumeroArray is array of geoposi
//StringToArray(arrSplitArray[1], arrSplitRuaNumeroArray,",")

//IF ArrayCount(arrSplitRuaNumeroArray) = 1

////private List<LatLng> decodePoly(string encoded)
//{
//List<LatLng> poly = new List<LatLng>();
//int index = 0, len = encoded.Length;
//int lat = 0, lng = 0;
//while (index < len)
//{
//int b, shift = 0, result = 0;
//do
//{ b = encoded[index++] - 63;
//result |= (b & 0x1f) << shift;
//shift += 5;
//} while (b >= 0x20);
//int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
//lat += dlat;
//shift = 0;
//result = 0;
//do
//{
//b = encoded[index++] - 63;
//result |= (b & 0x1f) << shift;
//shift += 5;
//} while (b >= 0x20);
//int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
//lng += dlng;
//LatLng p = new LatLng((double)lat/ 100000, (double)lng / 100000);
//poly.Add(p);
//}
//return poly;
//}
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:38
Procedure WS_Rota_DistanciaEntrePontos(x1 is real, x2 is real, y1 is real, y2 is real)

Dist is real = 0

IF x1 <> "" AND x2 <> "" AND y1 <> "" AND y2 <> "" THEN

Dist = Root( Power(x1-x2,2) + Power(y1-y2,2) )

ELSE

Info("Falta parametros para calcular a distancia da reta entre 2 pontos")

END


RESULT (Dist)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:38
Procedure WS_Rota_Pitagoras(pA is real, pB is real, pC is real)

ABC is real = 0

IF pA = "" AND pB <> "" AND pC <> "" THEN

pA = Root(Power(pB,2) + Power(pC,2))

ABC = pA

ELSE IF pA <> "" AND pB = "" AND pC <> "" THEN

pB = Root(Power(pA,2) - Power(pC,2))

ABC = pB

ELSE IF pA <> "" AND pB <> "" AND pC = "" THEN

pC = Root(Power(pA,2) - Power(pB,2))

ABC = pC

END

RESULT(ABC)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 13 décembre 2014 - 20:39
Procedure WS_Rota_PlotarPontos(GoogleMapsPoint is string)

//Market_Itinerary
//GoogleMapsPoint ="lsczClaqkHFcBUGcASmAOuAKM`DW~GMzDa@rKo@hQ]~KzF\TuHHoBFeBa@c@eBgB"
//GoogleMapsPoint = "znizCzumjH_CYoDi@}AUYCs@Q"
//GoogleMapsPoint = "lsczClaqkHFcB"
//encoded ="znizCzumjH_CYoDi@}AUYCs@Q"

gloDesenhaItinerario = True //testa itinerario

x is int = 1

MapDeleteAll(WIN_Taxi62.ControleMapa)

nInicial is int = 0
arryPoints is array of LatLng

pointA is LatLng
pointB is LatLng

arryPoints = WS_Rota_DecodePoints(GoogleMapsPoint)

WHILE( x < ArrayCount(arryPoints))

pointA = arryPoints[x]
pointB = arryPoints[x+1]
nomeMaker++
MarkerPonto..Position.Latitude = pointA.Latitude
MarkerPonto..Position.Longitude = pointA.Longitude
MarkerPonto..Image = WIN_Taxi62.IMG_Ponto
MarkerPonto..Name = "Itinerary"+nomeMaker
MarkerPonto..Description = "Itinerary"+nomeMaker
MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)
//MapDisplayPosition(WIN_Taxi62.ControleMapa,pointa)

WS_Rota_PlotarXLinhas(pointA,pointB)

x++

END

MarkerPonto..Position.Latitude = pointB.Latitude
MarkerPonto..Position.Longitude =pointB.Longitude
MarkerPonto..Image = WIN_Taxi62.IMG_Ponto
MarkerPonto..Name = "Itinerary"+x
MarkerPonto..Description = "Itinerary"+x
MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)
//MapDisplayPosition(WIN_Taxi62.ControleMapa,pointb)

MapDisplayPosition(WIN_Taxi62.ControleMapa,WS_CentroReta(arryPoints[1],pointB))
//Fim
// ---------------
//gnTotalPoints++
//MarkerPonto..Position.Latitude = PointAtual.Latitude
//MarkerPonto..Position.Longitude = PointAtual.Longitude
//MarkerPonto..Image = WIN_Taxi62.IMG_Voce
//MarkerPonto..Name = "Itinerary"+x
//MarkerPonto..Description = "Itinerary"+x
//MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)
//MapDisplayPosition(WIN_Taxi62.ControleMapa,PointAtual)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 11:57
This above code works on both Android and iOS, now in version 20 already has developed resource, but to the old versions use this encoding when the project is to run on the iphone and ipad.

Este codigo acima funciona tanto no Android como no iOS, já na versão 20 já tem o recurso desenvolvido, mas para as versões antigas use essa codificação quando o projeto for para rodar no iphone e no ipad.


:merci:
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:28
Procedure MarcadorVoce()

IF GloDebugSN = "S" THEN
Info("MarcadorVoce")
END

IF gnPlane = 1 THEN

//Busca Posicao Atual atualizada do GPS
//////////////////////////////////////
IF GloLatitude <> 0 AND GloLongitude <>0


IF gbBuscaPelaMira = True //mira/// ela zera nao remover
GeoVoce..Latitude = GloLatitude
GeoVoce..Longitude = GloLongitude
ELSE IF gbBuscaPelaMira = False
GeoVoce..Latitude = GloVoceLatitude
GeoVoce..Longitude = GloVoceLongitude
END


END


END

//Criar Icone
IF (gnPlane = 2) THEN

IF GeoVoce <> Null AND GeoVoce..Latitude <> 0 AND GeoVoce..Longitude <> 0 THEN

MarkerVoce..Position = GeoVoce
MarkerVoce..Name = "Voce"
MarkerVoce..Image = IMG_Voce
MapDeleteMarker(ControleMapa, MarkerVoce)
MapAddMarker(ControleMapa , MarkerVoce)
MapDisplayPosition(ControleMapa, GeoVoce)

END

END
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:28
Procedure MarcadorTaxi()

IF GloDebugSN = "S" THEN
Info("MarcadorTaxi")
END

MarkerTaxi..Position = GeoTaxi
MarkerTaxi..Name = "Taxi"
MarkerTaxi..Image = IMG_Taxi
MapDeleteMarker(ControleMapa,MarkerTaxi)
MapAddMarker(ControleMapa, MarkerTaxi)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:29
Procedure GoogleMapsCentroReta(pointa is geoPosition, pointb is geoPosition)

cpoint is geoPosition
cpoint..Latitude = (Min(pointa..Latitude,pointb..Latitude) + ((Max(pointa..Latitude,pointb..Latitude) - Min(pointa..Latitude,pointb..Latitude))/2))
cpoint..Longitude = (Min(pointa..Longitude,pointb..Longitude) + ((Max(pointa..Longitude,pointb..Longitude) - Min(pointa..Longitude,pointb..Longitude))/2))

RESULT cpoint
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:30
Procedure WS_Rota_PlotarPontos(GoogleMapsPoint is string,distancia is int)

//Market_Itinerary
//GoogleMapsPoint ="lsczClaqkHFcBUGcASmAOuAKM`DW~GMzDa@rKo@hQ]~KzF\TuHHoBFeBa@c@eBgB"
//GoogleMapsPoint = "znizCzumjH_CYoDi@}AUYCs@Q"
//GoogleMapsPoint = "lsczClaqkHFcB"
//encoded ="znizCzumjH_CYoDi@}AUYCs@Q"

//goulin
//p1 is geoPosition
//p2 is geoPosition
//p1..Latitude =-25.4189648
//p1..Longitude = -49.2443820
//
//p2..Latitude = -25.4189929
//p2..Longitude = -49.2440539

//sTempstr is string = WS_CEP_Rota("doutor goulin,1661,curitiba,PR ","leonidas Alves cordeiro,285,piraquara,pr","")
//GoogleMapsPoint = GloRotaEncode


ok is boolean = False

IF Length(GoogleMapsPoint) > 6

gloDesenhaItinerario = True //testa itinerario

x is int = 1

//MapDeleteAll(WIN_Taxi62.ControleMapa)

nInicial is int = 0
arryPoints is array of LatLng

pointA is LatLng
pointB is LatLng

arryPoints = WS_Rota_DecodePoints(GoogleMapsPoint)

WHILE( x < ArrayCount(arryPoints))

pointA = arryPoints[x]
pointB = arryPoints[x+1]
nomeMaker++
MarkerPonto..Position.Latitude = pointA.Latitude
MarkerPonto..Position.Longitude = pointA.Longitude
MarkerPonto..Image = WIN_Taxi62.IMG_Ponto
MarkerPonto..Name = "Itinerary"+nomeMaker
MarkerPonto..Description = "Itinerary"+nomeMaker
MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)

WS_Rota_PlotarXLinhas(pointA,pointB,distancia)

x++

END


MarkerPonto..Position.Latitude = pointB.Latitude
MarkerPonto..Position.Longitude = pointB.Longitude
MarkerPonto..Image = WIN_Taxi62.IMG_Ponto
MarkerPonto..Name = "Itinerary"+x
MarkerPonto..Description = "Itinerary"+x
MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)

gloDesenhaItinerario = False

IF pointB.Latitude <> "" AND pointB.Longitude <> "" THEN
ok = True
ELSE
ok = False
END

END

RESULT (ok)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:49
Em caso de ter diversos pontos de coordenadas deve ordernar eles da seguinte forma

Em uma tabela terá que ter as seguintes informações
================================================
Pontos || latitude || longitude || distancia DO ponto inicial
================================================
1 || -25.4544 || -49.45845 || 0 (Portão da Empresa OU GPS Atual)
--------------------------------------------------------------------------------------
2 || -25.4201646 ||-49.2458865 || 0
--------------------------------------------------------------------------------------
3 || -25.4000 || -49.65419 || 0
--------------------------------------------------------------------------------------
...


1 - Estabelecer o ponto de origem qual é o ponto inicial, sé é o valor da latitude / longitude atual DO GPS OU a porta de saida da empresa para fazer as entregas.

2 - Aplicar a função WS_CEP_Rota e descobrir as distancias

Em uma tabela terá que ter as seguintes informações - Order by distancia
================================================
Pontos || latitude || longitude || distancia DO ponto inicial
================================================
1 || -25.4544 || -49.45845 || 0 (Portão da Empresa OU GPS Atual)
--------------------------------------------------------------------------------------
3 || -25.4000 || -49.65419 || 1276 = 1,3 km
--------------------------------------------------------------------------------------
2 || -25.4201646 ||-49.2458865 || 5132 = 5,1 km
--------------------------------------------------------------------------------------
http://maps.googleapis.com/maps/api/directions/xml?origin=-25.4544%20,-49.45845&destination=-25.4201646,-49.2458865&sensor=false&mode=driving
...
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:55
IN CASE you have different points of coordinates must to Sort them as follows

On a table will have to have the following information
======================================================
Points || latitude || longitude || from the starting point
======================================================
[quote][quote]1 || -25.4544 || -49.45845 || 0 (Gate Company OR Current GPS)[/quote][/quote]
-------------------------------------------------------------------------------------------------
2 || -25.4201646 || -49.2458865 || 0
-------------------------------------------------------------------------------------------------
[quote][quote]3 || -25.4000 || -49.65419 || 0[/quote][/quote]
-------------------------------------------------------------------------------------------------
...

1 - Establish the point of origin which is the starting point, sé is the value of latitude / longitude current GPS OR the company's outlet port to make deliveries.

2 - Apply the WS_CEP_Rota FUNCTION AND find the distances

On a table will have to have the following information - Order by distance
======================================================
Points || latitude || longitude || from the starting point
======================================================
1 || -25.4544 ||-49.45845 || 0 (Gate Company OR Current GPS)
-------------------------------------------------- -----------------------------------------------
[quote][quote]3 || -25.4000 ||-49.65419 || 1276 = 1.3 km <------------------------------------------ Closest (Mais Próximo)

-------------------------------------------------- -----------------------------------------------
2 || -25.4201646 ||-49.2458865 || 5132 = 5.1 km
-------------------------------------------------- -----------------------------------------------
...


http://maps.googleapis.com/maps/api/directions/xml?origin=-25.4544%20,-49.45845&destination=-25.4000 ,-49.65419&sensor=false&mode=driving

..

http://maps.googleapis.com/maps/api/directions/xml?origin=-25.4544%20,-49.45845&destination=-25.4201646,-49.2458865&sensor=false&mode=driving
...
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 12:59
Applying HTTPRequest this Link below to Get distanca, time, coordinates of Address, Address, AND routes coded tracing the points that are coordinated arrays from the nearest route.

Aplicando HTTPRequest nesse Link abaixo obtem a distanca, o tempo, as coordenadas dos endereços, o endereço, e as rotas codificadas DO traçado nos points que são arrays de coordenadas da rota mais próxima.

http://maps.googleapis.com/maps/api/directions/xml?origin=-25.4544%20,-49.45845&destination=-25.4201646,-49.2458865&sensor=false&mode=driving
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 13:14
ProcedureGPS_Itinerario15Pontos_Iniciar(LOCALControleMapa,LOCALEnderecoSaida,LOCALEndInt01,LOCALEndInt02,LOCALEndInt03,LOCALEndInt04,LOCALEndInt05,LOCALEndInt06,LOCALEndInt07,LOCALEndInt08,LOCALEndInt09,LOCALEndInt10,LOCALEndInt11,LOCALEndInt12,LOCALEndInt13,LOCALEndInt14,LOCALEndInt15,LOCALEnderecoChegada,LOCALModoCBMP,LOCALCorRed,LOCALCorGreen,LOCALCorBlue,LOCALTransparencia,LOCALPixels)

////CBMP = Carro, Bicicleta, Manual, Pedestre
////CorRed, CorGreen, CorBlue = Cor do Intinerario = RGB
////Transparencia = 0 a 100 - padrao = 60
////Pixel padrao = 8
////15 pontos de intinerário

Retorno isstring=""

IFControleMapa=""THEN
ControleMapa=gloControleMapa
END


IFModoCBMP="Carro"THEN
ModoCBMP=itineraryCar
ELSE IFModoCBMP="Bicicleta"THEN
ModoCBMP=itineraryCyclist
ELSE IFModoCBMP="Manual"THEN
ModoCBMP=itineraryManual
ELSE IFModoCBMP="Bicicleta"THEN
ModoCBMP=itineraryPedestrian
ELSE
ModoCBMP=itineraryCar
END

//RGB
CorIntinerario isint=RGB(CorRed,CorGreen,CorBlue)
IFCorIntinerario=0THEN
CorIntinerario=RGB(255,0,0)
END

//Transparencia
IFTransparencia=""THEN
Transparencia=60
END

//Pixels
IFPixels=""THEN
Pixels=8
END

IFEndInt01=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE
IFEndInt01<>""ANDEndInt02=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt02<>""ANDEndInt03=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt03<>""ANDEndInt04=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt04<>""ANDEndInt05=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt05<>""ANDEndInt06=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt06<>""ANDEndInt07=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt07<>""ANDEndInt08=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt08<>""ANDEndInt09=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt09<>""ANDEndInt10=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt10<>""ANDEndInt11=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt11<>""ANDEndInt12=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EndInt11,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt12<>""ANDEndInt13=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EndInt11,EndInt12,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt13<>""ANDEndInt14=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EndInt11,EndInt12,EndInt13,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt14<>""ANDEndInt15=""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EndInt11,EndInt12,EndInt13,EndInt14,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEndInt15<>""
gloGPS_ItinerarioID=MapAddItinerary(WIN_OS_04GPS.ControleMapa, [EnderecoSaida,EndInt01,EndInt02,EndInt03,EndInt04,EndInt05,EndInt06,EndInt07,EndInt08,EndInt09,EndInt10,EndInt11,EndInt12,EndInt13,EndInt14,EndInt15,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
END
END

IFgloGPS_ItinerarioID=""THEN
Info("Ocorreu um erro ao gerar o intinerario.",ErrorInfo())
Retorno=False
ELSE
Retorno=True
END

RESULT(Retorno)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 15 décembre 2014 - 13:15
ProcedureGPS_Itinerario_Iniciar(LOCALControleMapa,LOCALEnderecoSaida,LOCALEnderecoChegada,LOCALModoCBMP,LOCALCorRed,LOCALCorGreen,LOCALCorBlue,LOCALTransparencia,LOCALPixels)

////CBMP = Carro, Bicicleta, Manual, Pedestre
////CorRed, CorGreen, CorBlue = Cor do Intinerario = RGB
////Transparencia = 0 a 100 - padrao = 60
////Pixel padrao = 8

Retorno isstring=""

IFControleMapa=""THEN
ControleMapa=gloControleMapa
END

IFGPSStatus() =gpsEnabledORGPSStatus() =gpsAvailableTHEN

IFModoCBMP="Carro"THEN
ModoCBMP=itineraryCar
ELSE IFModoCBMP="Bicicleta"THEN
ModoCBMP=itineraryCyclist
ELSE IFModoCBMP="Manual"THEN
ModoCBMP=itineraryManual
ELSE IFModoCBMP="Bicicleta"THEN
ModoCBMP=itineraryPedestrian
END

CorIntinerario isint=RGB(CorRed,CorGreen,CorBlue)

IFEnderecoSaida<>""ANDEnderecoChegada<>""
gloGPS_ItinerarioID=MapAddItinerary(ControleMapa, [EnderecoSaida,EnderecoChegada],ModoCBMP,CorIntinerario,Transparencia,Pixels)
ELSE IFEnderecoSaida=""ANDEnderecoChegada<>""
Info("Endereço de Saída Vazio!...")
ELSE IFEnderecoChegada=""
Info("Endereço de Chegada Vazio!...")
END

IFgloGPS_ItinerarioID=""THEN
Info("Ocorreu um erro ao gerar o intinerario.",ErrorInfo())
Retorno=False
ELSE
Retorno=True
END

ELSE IFGPSStatus() =gpsDisabledTHEN

Info("GPS Desabilitado!")

ELSE IFGPSStatus() =gpsOffServiceORGPSStatus() =gpsUnavailableORGPSStatus() =gpsErrorTHEN

Info("Região sem serviço de GPS",ErrorInfo())

END

RESULT(Retorno)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 17 novembre 2015 - 21:28
Procedure WS_Rota_PlotarXLinhas(pointA is LatLng , pointB is LatLng, distancia is int)

IF pointA.Latitude <> "" AND pointB.Latitude <> "" AND pointA.Longitude <> "" AND pointB.Longitude <> ""

CountPoints is int
nomeMaker is int
metrosEntrePontos is int = 10

IF distancia>= 20000 THEN
metrosEntrePontos = 50
ELSE IF distancia>= 15000 THEN
metrosEntrePontos = 40
ELSE IF distancia>= 10000 THEN
metrosEntrePontos = 30
ELSE IF distancia>= 5000 THEN
metrosEntrePontos = 20
END



//
c1 is real = pointA.Latitude - pointB.Latitude
c2 is real = pointA.Longitude - pointB.Longitude


CountPoints = Root(Power(c1,2) + Power(c2,2)) * (metrosDistancia / metrosEntrePontos)

IF CountPoints = 1 THEN CountPoints = 2
IF CountPoints > 0 THEN

c1 = c1 / CountPoints
c2 = c2 / CountPoints

END

WHILE (CountPoints > 1)

CountPoints--
pointA.Latitude -= c1
pointA.Longitude -= c2
nomeMaker++

//plota no mapa
MarkerPonto..Position.Latitude = pointA.Latitude
MarkerPonto..Position.Longitude = pointA.Longitude
MarkerPonto..Image = WIN_Taxi62.IMG_Ponto
MarkerPonto..Name = "Itinerary"+ nomeMaker
MarkerPonto..Description = "Itinerary"+ nomeMaker
MapAddMarker(WIN_Taxi62.ControleMapa , MarkerPonto)

END

END


--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 20 juillet 2016 - 18:44
Prezados,

Como colocar eventos no controle de mapa no mobile:





:merci:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 30 août 2016 - 02:11
Resumo de uso:

gPosicionPasajero is geoPosition
HReadSeekFirst(ParticipantesEvento,ParticipantesEventoID,gnCodPasajero)
IF HFound(ParticipantesEvento) THEN
gPosicionPasajero..Latitude = ParticipantesEvento.LATITUD
gPosicionPasajero..Longitude = ParticipantesEvento.LONGITUD
END
MapDisplayPosition(MAP_NoName1,MYPSOITION)
gPosicionChofer is Marker
gPosicionChofer..Position = MYPSOITION
gPosicionChofer..Image = "car.png"
MapAddMarker(MAP_NoName1,gPosicionChofer)

gPosicionCliente is Marker
gPosicionCliente..Position = gPosicionPasajero
gPosicionCliente..Image = "client.png"
MapAddMarker(MAP_NoName1,gPosicionCliente)
MapAddItinerary(MAP_NoName1,[gPosicionChofer,gPosicionCliente],itineraryCar,iDarkBlue,70,8)
MAP_NoName1..Zoom = 12


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/