PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 26 feature!
  • Properties specific to the description of MapImage variables
  • WLanguage functions
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
MapImage variables are used to define the characteristics of an image to be drawn on the map displayed in a Map control. The characteristics of this image 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.
Example
// Add an image to the Map control
i is MapImage
i.Position = MyPosition
i.Image = "image.png"
i.ActionClick = ClickProc
MapAddImage(MAP_MyMap, i)
 
INTERNAL PROCEDURE ClickProc(i is MapImage)
ToastDisplay(StringBuild("Click on the <%1> image.", i.Name))
END
Remarks

Properties specific to the description of 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.
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").
AlignmentInteger constantAlignment of the image with respect to the position given by the Position property :
  • mkTop: image above the position.
  • mkBottom: image below the position.
  • mkCenter (Default value): image centered on the position.
  • mkRight: image to the right of the position.
  • mkLeft: image to the left of the position.
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.
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.
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,
  • an Image variable.
This image cannot be a vector image (SVG).
WidthRealWidth (in meters) that the image should occupy on the map.
This property must be specified.
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.

WLanguage functions

The following WLanguage functions are used to handle MapImage variables:
Versions 26 and later
MapAddImage
New in version 26
MapAddImage
MapAddImage
Adds a new image to the map displayed in a Map control.
Versions 26 and later
MapDeleteImage
New in version 26
MapDeleteImage
MapDeleteImage
Deletes an image drawn on the map displayed in a Map control.
Versions 26 and later
MapModifyImage
New in version 26
MapModifyImage
MapModifyImage
Modifies 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