AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Mapa
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds an itinerary onto a Map control.
Ejemplo
// Displays a car itinerary between two specified addresses
MapAddItinerary(MAP_MapControl, ["Place de la Comédie, Montpellier", ...
"Avenue des Champs Elysées, Paris"], itineraryCar)
// Displays an itinerary corresponding to the list of specified geographical positions
posDeparture is geoPosition
posDeparture.Latitude = XXX
posDeparture.Longitude = XXX
 
posArrival is geoPosition
posArrival.Latitude = XXX
posArrival.Longitude = XXX
 
MapAddItinerary(MAP_MapControl, [posDeparture, posArrival])
 
// You also have the ability to use the following code:  
// arrPositions is array of geoPosition
// Add(arrPositions, posDeparture)
// Add(arrPositions, posArrival)
// MapAddItinerary(MAP_MapControl, arrPositions)
Sintaxis
<Result> = MapAddItinerary(<Map control> , <Positions> [, <Mode> [, <Color> [, <Opacity> [, <Thickness>]]]])
<Result>: Character string
  • Identifier of added itinerary,
  • Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo.
<Map control>: Control name
Name of the Map control to be used. If this parameter corresponds to an empty string (""), the Map control to which the current event belongs will be used.
<Positions>: Array
Name of Array variable containing the different positions:
  • The first element corresponds to the departure point of itinerary.
  • The last element corresponds to the arrival point.
  • The other array elements represent the intermediate steps of itinerary. This array must contain at least two elements (departure position and arrival position). If you are using the default Google Map license, this array can contain up to 8 intermediate positions (steps). If you are using a "Google Maps API" license key, the number of intermediate positions is unlimited.
This array can be:
  • an array of character strings, describing the address corresponding to each itinerary position. For example: avenue des Champs Elysée, Paris, France.
  • an array of Address variables, describing the address corresponding to each position of the itinerary.
  • an array of geoPosition variables, indicating the geographical position corresponding to each itinerary position.
  • an array of Marker variables, representing each itinerary position on the map (the markers will be automatically added to the Map control if not already added).
<Mode>: Optional Integer constant
Mode for calculating the itinerary. This parameter can take one of the following values:
itineraryCar
(Default value)
The itinerary will be drawn taking into account the roads accessible to cars.
Characteristics of this mode:
  • This mode uses Google's geolocation mode. An Internet access is required.
  • You can rearrange the order of the stops get the best possible route.
itineraryCarNotOptimizedThe itinerary will be drawn taking into account the roads accessible to cars.
Characteristics of this mode:
  • This mode uses Google's geolocation mode. An Internet access is required.
  • The order of the stops will not be changed.
itineraryCyclistThe itinerary will be drawn by respecting the ways accessible to the bicycles. The itineraries for cyclists are not available in all the countries. For more information, please consult the Google geolocation service documentation.
Characteristics of this mode:
  • This mode uses Google's geolocation mode. An Internet access is required.
  • You can rearrange the order of the stops get the best possible route.
itineraryManualThe itinerary will be drawn in a straight line between each specified position while ignoring the roads.
This mode avoids the use of Google's geolocation mode.. In this case, <Positions> must correspond to an array of geoPosition variables or to an array of Marker variables.
In this mode, the intermediate steps are taken into account according to the addition order in the array.
PHP Please note: If you're using Internet Explorer 4, parameter <Positions> parameter must correspond to an array of variables of type geoPosition.
itineraryPedestrianThe itinerary will be drawn by respecting the ways accessible to the pedestrians.
Characteristics of this mode:
  • This mode uses Google's geolocation mode. An Internet access is required.
  • You can rearrange the order of the stops get the best possible route.
<Color>: Optional integer
Color for drawing the itinerary. This color can correspond to:
<Opacity>: Optional integer
Percentage of opacity for drawing the itinerary.
  • 0: transparent trace,
  • 100: no opacity.
This parameter is set to 60 by default.
<Thickness>: Optional integer
Thickness (in pixels) for drawing the itinerary. The thickness is set to 8 pixels by default.
Observaciones
  • Using Google maps: the "Directions" API must be activated in your Google Maps key.
  • Caution: The order of intermediate stages can be automatically modified to display an optimized route.
  • To customize the image of the itinerary markers, all you have to do is add the markers beforehand with MapAddMarker on the same itinerary positions.
  • To delete an itinerary from a map, use MapDeleteItinerary.
  • To delete all the itineraries from a map, use MapDeleteAll.
  • Warning Creating routes between two distant positions may require a very large number of points to be stored in memory for route design (particularly for cycle and pedestrian routes). Therefore, we advise you to limit the number of itineraries simultaneously displayed on the Map control.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 18
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local