ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
  • Properties specific to MapPolyline variables
  • WLanguage functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The MapPolyline type is used to define the characteristics of a line composed of several segments to be drawn on the map displayed in a Map control. The characteristics of this row can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Add a line to the Map control
Line is MapPolyline
FOR EACH PointPosition OF arrPositions
Add(Line.Point, PointPosition)
END
Line.LineColor = LightRed
Line.ActionClick = ClickProc
MapAddShape(MAP_MyMap, Line)
 
INTERNAL PROCÉDURE ClickProc(l is MapPolyline)
ToastDisplay(StringBuild("Click on the <%1> line.", l.Name))
END
Remarks

Properties specific to MapPolyline variables

The following properties can be used to handle a line:
Property nameType usedEffect
ActionClickProcedure nameName of the WLanguage procedure called when the user clicks the line displayed in the Map control. This procedure has the following format:
PROCEDURE <Procedure name>(<Line>)
where <Line> is a MapPolyline variable corresponding to the line the user clicked on.
If this property is not specified (or corresponds to an empty string ("")), no action will be performed on click.
Remark: it is recommended to use global procedures. If the procedure is local, its name must be prefixed by the full name of the object to which the procedure belongs (example for a local window procedure: "WIN_Window1.MyProcedure").
WEBDEV - Server codeWEBDEV - Browser code This procedure can be a Browser or Server procedure.
DescriptionCharacter stringDescription of the shape, used to store additional information, for example.
GeodesicBoolean
  • True to indicate that the drawing of the line must take into account the curvature of the Earth,
  • False (default) to draw a straight line.
LineInteger constantLine style used:
  • LineSolid (default value): Solid line.
  • LineDotted: Dots.
  • LineDash: Dashes.
  • LineDotAndDash: Dots and dashes.
LineColorColor, integer, Integer constantLine color. This color can correspond to:
Name Character stringName of the shape (here, name of the line). A name is automatically assigned when the variable is created. It can be modified, but it has to be unique if the shape is added to the Map control. This name can be used to delete the line with MapDeleteShape.
PointArray of geoPositionPoints corresponding to the ends of the segments that make up the line.
ThicknessIntegerLine thickness.
The thickness is set to 2 by default.
ZOrderIntegerZ-order of the line in relation to the other shapes in the Map control. Allows you to manage overlays.
A shape with a high Z-order will be drawn over a shape with a lower Z-order.
This property is set to 0 by default.

WLanguage functions

The following WLanguage functions are used to handle MapPolyline variables:
MapAddShapeAdds a new shape (polygon, line, circle) to the map displayed in a Map control.
MapDeleteShapeDeletes a shape drawn on the map displayed in an Map control.
MapModifyShapeModifies a shape drawn on the map displayed in a Map control.
Related Examples:
WD Extended Map Training (WINDEV): WD Extended Map
[ + ] This example shows the different features of the Map control in desktop (Windows) and mobile (Android, iOS) devices
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help