- Properties specific to MapCircle variables
- WLanguage functions
MapCircle (Type of variable)
In french: CarteCercle
type is used to define the characteristics of a circle to be drawn on the map displayed in a Map control. The characteristics of this circle can be defined and changed using different WLanguage properties.
: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Add a circle to the Map control
Circle is MapCircle
Circle.Center = Position
Circle.Radius = 50
Circle.LineColor = LightRed
Circle.ActionClick = ClickProc
INTERNAL PROCEDURE ClickProc(c is MapCircle)
ToastDisplay(StringBuild("Click on the <%1> circle.", c.Name))
Properties specific to MapCircle variables
The following properties can be used to handle a circle:
|Property name||Type used||Effect|
|ActionClick||Procedure name||Name of the WLanguage procedure called when the user clicks the circle displayed in the Map control. This procedure has the following format: |
where <Circle> is a MapCircle variable corresponding to the circle that the user clicked on.
PROCEDURE <Procedure name>(<Circle>)
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").
|BackgroundColor||Color, integer, Integer constant||Circle background color. This color can correspond to:|
Remark: To change the opacity of the fill, you can write:
MyMapCircle.BackgroundColor.Opacity = 50
|Center||geoPosition||Center of the circle.|
|Description||Character string||Description of the shape, used to store additional information, for example.|
|Line||Integer constant||Line style used for the circle outline: |
- LineSolid (default value): Solid line.
- LineDotted: Dots.
- LineDash: Dashes.
- LineDotAndDash: Dots and dashes.
|LineColor||Color, integer, Integer constant||Circle outline color. This color can correspond to:|
|Name ||Character string||Name of the shape (here, name of the circle). 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 circle with MapDeleteShape.|
|Radius||Real||Radius of the circle in metres. The default radius is 100 meters.|
|Thickness||Integer||Line thickness used for the circle outline. |
The thickness is set to 2 by default.
|ZOrder||Integer||Z-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.
The following WLanguage functions are used to handle MapCircle
|MapAddShape||Adds a new shape (polygon, line, circle) to the map displayed in a Map control.|
|MapDeleteShape||Deletes a shape drawn on the map displayed in an Map control.|
|MapModifyShape||Modifies a shape drawn on the map displayed in a Map control.|
Training (WINDEV): WD Extended Map
This page is also available for…