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
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a new shape (polygon, line, circle) to the map displayed in a Map control.
Example
// Ajoute un polygone dans le champ Carte
Polygone is MapPolygon
FOR EACH PositionPoint OF tabPositions
	Add(Polygone.Point, PositionPoint)
END
Polygone.LineColor = LightRed
Polygone.ActionClick = ProcClic
MapAddShape(CARTE_MaCarte, Polygone)
Syntax
<Result> = MapAddShape(<Map control> , <Shape>)
<Result>: Boolean
  • True if the shape could be added to the Map control,
  • False otherwise. To get more details on the error, use ErrorInfo.
<Map control>: Control name
Name of the Map control to be used. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<Shape>: MapCircle, MapPolygon or MapPolyline variable
Shape to be drawn on the map displayed in the Map control. This shape can be described using one of the following types of variables:
Remarks
  • Once the shape has been added, you can use its name (Name property of the associated variable).
  • If the shape has already been added in the Map control, or if the shape is invalid (e.g. polygon with an insufficient number of points), a fatal error will be displayed.
  • To delete a shape drawn in a Map control, use MapDeleteShape.
  • To modify a shape drawn in a Map control, use MapModifyShape.
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
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/18/2024

Send a report | Local help