ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
  • Properties specific to MapImage variables
  • WLanguage functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
MapImage variables are used to define the characteristics of an image to be drawn on the map displayed in a Map control. You can define and change the characteristics of this image using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Ajout d'une image dans le champ Carte
i is MapImage
i.Position = MaPosition
i.Image = "image.png"
i.ActionClick = ProcClic
MapAddImage(CARTE_MaCarte, i)

INTERNAL PROCEDURE ProcClic(i is MapImage)
	ToastDisplay(StringBuild("Clic sur l'image <%1>.", i.Name))
END
Properties

Properties specific to MapImage variables

The following properties can be used to handle an image in a Map control:
Property nameType usedEffect
ActionClickProcedure nameName of the WLanguage procedure called when the user clicks the image displayed in the Map control. This procedure has the following format:
PROCEDURE <Procedure name>(<Image>)
where <Image> is a MapImage variable corresponding to the image the user clicked on.
If this property is not specified (or corresponds to an empty string ("")), no action will be performed on click.
Note: it is advisable to use global procedures. If the procedure is a local procedure, it is necessary to prefix the procedure name with the full name of the object to which the procedure belongs (e.g. for a local window procedure: "FEN_Fenêtre1.MaProcedure").
WEBDEV - Server codeWEBDEV - Browser code This procedure can be a Browser or Server procedure.
AlignmentInteger constantAlignment of the image with respect to the position given by the Position property:
  • mqHaut: image above position.
  • mqBas: image below position.
  • mqCenter (Default): image centered on position.
  • mqRight: image to the right of position.
  • mqLeft: image to the left of position.
AngleIntegerRotation angle in degrees (between 0 and 360) to be applied to the image. The rotation is performed using the position given by the Position property as the center of rotation.
This property is set to 0 by default.
DescriptionCharacter stringDescription of the image, used to store additional information, for example.
New in version 2025
Extra
VariantAllows you to store advanced information without affecting the execution of the application. You can store values of any type (array, etc.). It is also possible to add members to the Extra property.
Example:
MyVariable.Extra.Info1 = Value
MyVariable.Extra[Info2] = Value2
MyVariable.Extra.Date = DateSys()
HeightRealHeight (in meters) that the image should occupy on the map.
If this property is not specified in or is set to 0, the height will be automatically calculated according to the width specified via the Width property, respecting the image ratio.
ImageCharacter string
or Image variable
Image to display. This property corresponds to:
  • a character string corresponding to the path of the image,
  • a variable of type Image.
This image cannot be a vector image (SVG).
NameCharacter stringImage name. 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 image with MapDeleteImage.
OpacityIntegerImage opacity percentage. By default, this property is set to 100.
PositiongeoPositionGeographic position at which the image is to be drawn. The alignment of the image with respect to this position is given by the Alignment property.
WidthRealWidth (in meters) that the image should occupy on the map.
This property must be specified.
ZOrderIntegerZ-order of the image 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.
Remarks

WLanguage functions

The following WLanguage functions use MapImage variables:
MapAddImageAdds a new image to the map displayed in a Map control.
MapDeleteImageDeletes an image drawn on the map displayed in a Map control.
MapModifyImageModifies an image drawn on the map displayed in a Map control.
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help