AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Mapa
  • Properties specific to Marker variables
  • Functions that use Marker variables
  • Reinitialization
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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.
You can define and change the characteristics of this marker 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.
Ejemplo
// Displays a marker and runs a procedure during a click on this marker 
MyLocation is geoPosition
MyLocation.Latitude = 43.613708 
MyLocation.Longitude = 3.876972
MyMarker is Marker
MyMarker.Position = MyLocation
MyMarker.ActionClick = ProcMarkerClick
MapAddMarker("MapControl", MyMarker)
//------------------------------------------
PROCEDURE ProcMarkerClick(m is Marker)
ToastDisplay(StringBuild("Position: %1 N, %2 E ", m.Position.Latitude, m.Position.Longitude))
Propiedades

Properties specific to Marker variables

The following properties can be used to handle Marker variables:
Property nameType usedEffect
ActionClickProcedure nameName 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 is set 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 - Código ServidorWEBDEV - Código Navegador This procedure can be a Browser or Server procedure.
ActionClickPopupCharacter stringName of the WLanguage procedure called when the user clicks the marker popup.
This procedure has the following format:
PROCEDURE <Procedure name>(<Marker>)
where <Marker> is a Marker variable corresponding to the marker associated with the popup.
If this property is set to an empty string (""), no action will be performed on click.
WEBDEV - Código ServidorWEBDEV - Código Navegador This procedure can be a Browser or Server procedure.
PHP This property is not available.
ActionDragCharacter stringName of the WLanguage procedure called when the user moves the marker displayed in the Map control (if the Movable property is set to True).
This procedure has the following format:
PROCEDURE <Procedure name>(<Marker>)
where <Marker> is a Marker variable corresponding to the moved marker.
This procedure is called when the user releases the marker.
If this property is set to an empty string (""), no action will be performed.
WEBDEV - Código ServidorWEBDEV - Código Navegador This procedure can be a Browser or Server procedure.
PHP This property is not available.
AlignmentInteger constantMode for aligning the marker when it is displayed on a map:
  • mqBas: Marker displayed at bottom of position.
  • mqCentre: Marker displayed on position.
  • mqRight: Marker displayed to the right of the position.
  • mqLeft: Marker displayed to the left of the position.
  • mqHaut: Marker displayed at the top of the position.
ClusterBoolean
  • True if the marker is to be grouped in a cluster if necessary,
  • False otherwise.
Note: A new optional event is available: "Marker grouping"..
  • This event is run each time a marker cluster is created or modified on the Map control.
  • It takes an array of Marker variables as parameter. This array corresponds to the markers in the cluster.
  • This event can return an image or a MarkerImage variable that will be used to represent the cluster on the map. If this event does not return a value (or returns an empty string), the cluster will be displayed in default mode.
PHP This property is not available.
DescriptionCharacter stringDescription of the marker, used for example to store the address corresponding to the position of the marker.
The text of this description is used in the marker popup.
This property is optional.
Novedad versión 2025
Extra
VariantPermite almacenar información avanzada sin afectar la ejecución de la aplicación. Puede almacenar valores de cualquier tipo (array, etc.). También es posible agregar miembros a la propiedad Extra.
Ejemplo:
MyVariable.Extra.Info1 = Value
MyVariable.Extra[Info2] = Value2
MyVariable.Extra.Date = DateSys()
ImageCharacter string or MarkerImage variable
  • Path of the image corresponding to the icon associated with the marker.
  • MarkerImage variable used to customize the marker image.
If this property is not specified, the default image of the Map control will be used. This image can be specified in the "General" tab of the control description window.
Remark: On the map, the icon associated with the marker will be displayed just above the specified position.
MovableBoolean
  • True if the marker can be moved by the user (Drag and Drop),
  • False otherwise.
Note: If the marker can be moved, a new optional event is available: "Move marker".. This event takes as parameter the Marker variable associated with the moved marker. The geographic position associated with the marker is automatically updated.
PHP This property is not available.
NameCharacter stringName of the marker.
Remarks:
  • This property is not mandatory: if no name is specified, a random name is assigned to the marker..
  • If a popup is displayed, it will display this name and the marker description.
  • When adding a marker with the same name as an existing marker to a map, the MapAddMarker function fails: the marker is not added..
NoteAny typeUsed to store additional information (not be visible to the user) about the marker.
PHP This property is not available.
OpacityIntegerPercentage of opacity of the marker on the Map control.
iPhone/iPad The marker popup takes this opacity percentage into account.
PHP This property is not available.
PositiongeoPosition variableGeographical position (latitude and longitude) at which the marker must be displayed.
If no position is associated with the marker, the Position property will return NULL
WithPopupBoolean
  • True if a popup can be displayed when the marker is clicked on,
  • False otherwise. The popup displays the name (Name property) and the description of the marker (Description property).
The popup can be customized with the InternalPagePopup or InternalWindowPopup properties.
PHP This property is not available.
ZOrderIntegerZ-order of the marker in relation to the other markers in the Map control. Allows you to manage overlays.
A marker with a high Z-order will be drawn over a marker with a lower Z-order.
This property is set to 0 by default.
iPhone/iPadIOS WidgetMac CatalystPHP This property is not available.
Observaciones

Functions that use Marker variables

MapAddMarkerAdds a new marker onto a map displayed in a Map control.
MapDeleteMarkerDeletes a marker from a map displayed by a Map control.
MapModifyMarkerModifies a marker displayed in a Map control.

Reinitialization

You can use VariableReset to reset the content of a Marker variable.
Versión mínima requerida
  • Versión 17
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local