PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of Marker variables
  • Functions that use the Marker variables
  • Reinitialization
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
The Marker type is used to define the characteristics of a marker that must be positioned on a map displayed in a Map control.
A marker is defined by a name and a geographical position (latitude and longitude) and it can be filled with a description and an action on the click.
The characteristics of this marker can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Versions 18 and later
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
Versions 20 and later
WINDEVWindows This type of variable is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This type of variable is now available in Browser code.
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the WEBDEV sites in Windows and in Linux.
PHP This type of variable is now available for the PHP WEBDEV sites.
New in version 20
WINDEVWindows This type of variable is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This type of variable is now available in Browser code.
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the WEBDEV sites in Windows and in Linux.
PHP This type of variable is now available for the PHP WEBDEV sites.
WINDEVWindows This type of variable is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This type of variable is now available in Browser code.
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the WEBDEV sites in Windows and in Linux.
PHP This type of variable is now available for the PHP WEBDEV sites.
Versions 21 and later
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
Example
// Displays a marker and runs a procedure during a click on this marker
MyPosition is geoPosition
MyPosition..Latitude = 43.613708
MyPosition..Longitude = 3.876972
MyMarker is Marker
MyMarker..Position = MyPosition
MyMarker..ActionClick = ProcMarkerClick

MapAddMarker("MapControl", MyMarker)
//------------------------------------------

PROCÉDURE ProcMarkerClick(m is Marker)
ToastDisplay(StringBuild("Position: %1 N, %2 E ", ...
m..Position..Latitude, m..Position..Longitude))
Remarks

Properties specific to the description of Marker variables

The following properties can be used to handle a Marker variable:
Property nameType usedEffect
ActionClickCharacter stringName of the WLanguage procedure called when the user clicks the marker displayed in the Map control.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Marker>)
where <Marker> is a Marker variable corresponding to the marker that was clicked by the user.
If this property corresponds to an empty string (""), no action will be performed during the click.
Note: We recommend that you use global procedures. If the procedure is a local procedure, the name of this procedure must be prefixed by the full name of the object to which the procedure belongs (example for a local window procedure: "WIN_Window1.MyProcedure").
Versions 20 and later
WEBDEV - Server codeWEBDEV - Browser code This procedure can be a Browser or Server procedure.
New in version 20
WEBDEV - Server codeWEBDEV - Browser code This procedure can be a Browser or Server procedure.
WEBDEV - Server codeWEBDEV - Browser code This procedure can be a Browser or Server procedure.
Versions 21 and later
Alignment
New in version 21
Alignment
Alignment
Integer constantMode for aligning the marker when it is displayed on a map:
  • mkBottom: Marker displayed at the bottom of the position.
  • mkCenter: Marker displayed on the position.
  • mkRight: Marker displayed on the right of the position.
  • mkLeft: Marker displayed on the left of the position.
  • mkTop: Marker displayed at the top of the position.
DescriptionCharacter stringDescription of the marker, used for example to store the address corresponding to the position of the marker.
This property is optional.
ImageCharacter stringPath of the image corresponding to the icon associated with the marker.
If this property is not specified, the default image of the Map control will be used. This image is specified in the "General" tab of the description window of the control.
Note: On the map, the icon associated with the marker will be displayed just above the specified position.
NameCharacter stringName of the marker.
Notes:
  • This property is optional: if no name is specified, a random name is associated with the marker.
  • When adding a marker named like an existing marker, MapAddMarker fails: the marker is not added.
PositiongeoPosition variableGeographical position (latitude and longitude) at which the marker must be displayed.
If no position is associated with the marker, ..Position will return NULL.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the Marker variables

Versions 17 and later
MapAddMarker
New in version 17
MapAddMarker
MapAddMarker
Adds a new marker onto a map displayed in a Map control.
Versions 17 and later
MapDeleteMarker
New in version 17
MapDeleteMarker
MapDeleteMarker
Deletes a marker from a map displayed by a Map control
Versions 17 and later
MapModifyMarker
New in version 17
MapModifyMarker
MapModifyMarker
Modifies a marker displayed in a Map control.

Reinitialization

To reinitialize the content of a Marker variable, you have the ability to use VariableReset.
Related Examples:
WM Geo-localization Cross-platform examples (WINDEV Mobile): WM Geo-localization
[ + ] This example explains how to perform proximity searches with geolocalization:
- search around me
- search in a city, at a given address, or close to a specific address.
The results are displayed in a looper and in a map with markers.
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment