Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of MapPolygon variables
  • WLanguage functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The MapPolygon type is used to define the characteristics of a polygon to be drawn on the map displayed in a Map control. The characteristics of this polygon can be defined and modified 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.
// Ajoute un polygone dans le champ Carte
MonPolygone is MapPolygon
FOR EACH PointPosition OF tabPositions
Add(MonPolygone.Point, PointPosition)
MonPolygone.LineColor = LightRed
MonPolygone.ActionClick = ProcClic
MapAddShape(CARTE_MaCarte, MonPolygone)
INTERNAL PROCÉDURE ProcClic(p is MapPolygon)
ToastDisplay(StringBuild("Clic sur le polygone <%1>.", p.Name))

Properties specific to the description of MapPolygon variables

The following properties can be used to manipulate a polygon:
Property nameType usedEffect
ActionClickProcedure nameName of the WLanguage procedure called when the user clicks the polygon displayed in the Map control. This procedure has the following format:
PROCEDURE <Nom de la procédure>(<Polygone>)
where <Polygon> is a MapPolygon variable corresponding to the polygon that 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.
ZOrderIntegerZ-order of the circle 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.
iPhone/iPad This property is not available.
BackgroundColorColor, integer, Integer constantPolygon background color. This color can correspond to:
Remark: To change the opacity of the fill, you can write:
MaCartePolygone.CouleurFond.Opacité = 50
LineColorColor, integer, Integer constantPolygon outline color. This color can correspond to:
DescriptionCharacter stringDescription of the shape, used to store additional information, for example.
ThicknessIntegerLine thickness used for the polygon outline.
The thickness is set to 2 by default.
  • True to indicate that the drawing of the polygon must take into account the curvature of the Earth,
  • False (default value) to draw a straight line.
iPhone/iPad Not available.
NameCharacter stringName of the shape (here, name of the polygon). 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 polygon with MapDeleteShape.
PointArray of geoPositionPoints corresponding to the vertices of the polygon. The polygon will be automatically closed, so the start and end points can be different.
LineInteger constantLine style used between the vertices of the polygon:
  • LineSolid (default value): Solid line.
  • LineDotted: Dots.
  • LineDash: Dashes.
  • LineDotAndDash: Dots and dashes.
WINDEVWEBDEV - Server codeWEBDEV - Browser code Not available.

WLanguage functions

The following WLanguage functions are used to handle MapPolygon variables:
Versions 26 and later
New in version 26
Adds a new shape (polygon, line, circle) to the map displayed in a Map control.
Versions 26 and later
New in version 26
Deletes a shape drawn on the map displayed in an Map control.
Versions 26 and later
New in version 26
Modifies a shape drawn on the map displayed in a Map control.
Minimum version required
  • Version 26
This page is also available for…
Click [Add] to post a comment