PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds an itinerary onto a Map control.
Versions 20 and later
WINDEVWindows This function is now available for the WINDEV applications in Windows.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
New in version 20
WINDEVWindows This function is now available for the WINDEV applications in Windows.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
WINDEVWindows This function is now available for the WINDEV applications in Windows.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Displays a car itinerary between two 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)
Syntax
<Result> = MapAddItinerary(<Map Control> , <Positions> [, <Mode> [, <Color> [, <Opacity> [, <Thickness>]]]])
<Result>: Character string
  • Identifier of added itinerary,
  • Empty string ("") if an error occurred. To find out the error details, use ErrorInfo.
iPhone/iPadUniversal Windows 10 App This function is asynchronous: there is no way to find out whether an error was returned by the function.
<Map Control>: Control name
Name of Map control to use. If this parameter corresponds to an empty string (""), the Map control to which the current process 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.
iPhone/iPad This array must contain two elements (departure position and arrival position). You cannot specify the different steps of the itinerary.
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.
    Universal Windows 10 App Using a character string is not recommended with the mapping service of Bing Map. The positions can be inconsistent.
  • an array of Address variables, describing the address corresponding to each itinerary position.
  • 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 it is not the case).
<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 by respecting the ways accessible to the cars.
Characteristics of this mode:
  • This mode is using the geo-localization mode of Google. An Internet access is required.
  • The order of steps can be modified to get the best possible journey.
Versions 21 and later
itineraryCarNotOptimized
New in version 21
itineraryCarNotOptimized
itineraryCarNotOptimized
The itinerary will be drawn by respecting the ways accessible to the cars.
Characteristics of this mode:
  • This mode is using the geo-localization mode of Google. An Internet access is required.
  • The order of steps will not be modified.
Universal Windows 10 App This constant is not available.
itineraryCyclistThe itinerary will be drawn by respecting the ways accessible to the bicycles. The itineraries for cyclists are not available in all the countries. See the documentation about the geo-localization service of Google for more details.
Characteristics of this mode:
  • This mode is using the geo-localization mode of Google. An Internet access is required.
  • The order of steps can be modified to get the best possible journey.
iPhone/iPad This constant is not available.
itineraryManualThe itinerary will be drawn in a straight line between each specified position while ignoring the roads.
This mode is not necessarily using the geo-localization mode of Google. 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.
iPhone/iPad This constant is not available.
Universal Windows 10 App This constant is not available.
PHP Caution: If the browser used is Internet Explorer 4, the <Positions> parameter must necessarily correspond to an array of GeoPosition variables.
itineraryPedestrianThe itinerary will be drawn by respecting the ways accessible to the pedestrians.
Characteristics of this mode:
  • This mode is using the geo-localization mode of Google. An Internet access is required.
  • The order of steps can be modified to get the best possible journey.
iPhone/iPad This constant is not available.
<Color>: Optional integer
Color for drawing the itinerary. This color corresponds to:
<Opacity>: Optional integer
Percentage of opacity for drawing the itinerary.
  • 0: transparent drawing,
  • 100: no opacity.
This parameter is set to 60. by default.
Universal Windows 10 App This parameter is not available.
<Thickness>: Optional integer
Thickness (in pixels) for drawing the itinerary. The thickness is set to 8 pixels by default.
Universal Windows 10 App This parameter is not available.
Remarks
  • Caution: The order of intermediate steps can be automatically modified in order to display an optimized itinerary.
  • 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.
  • Caution: Creating itineraries between two distant positions may trigger the storage in memory of several points for drawing the itinerary (especially for the cyclist and pedestrian itineraries). Therefore, we advise you to limit the number of itineraries simultaneously displayed on the Map control.
  • Versions 20 and later
    WINDEV To manage specific features regarding the management of itineraries, use MapExecuteJS.
    New in version 20
    WINDEV To manage specific features regarding the management of itineraries, use MapExecuteJS.
    WINDEV To manage specific features regarding the management of itineraries, use MapExecuteJS.
  • Versions 21 and later
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
    New in version 21
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
Related Examples:
The Map control Unit examples (WEBDEV): The Map control
[ + ] This example explains how to use the Map control of WEBDEV.
It can be used to display a map that includes markers as well as an itinerary.
The Map control Unit examples (WINDEV): The Map control
[ + ] Using the Map control of WINDEV.
It is used to display a map that includes markers as well as an itinerary.
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
WEBDEV - Browser code WDJS.DLL
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 18
This page is also available for…
Comments
Video MapIntinerario


Windev
----------

https://youtu.be/aidCmmcp8Qg

Mobile
---------

https://youtu.be/0ZaiZYlTHP0

WebDev

https://youtu.be/2u7T4gUfbqM
amarildo
Nov. 01 2018