new ProMarker(row)
Pro marker class. Please do not call this constructor directly. Always use createInstance rather than instantiating this class directly. Using createInstance allows this class to be externally extensible.
Parameters:
| Name | Type | Description |
|---|---|---|
row |
object | The data for the marker |
Extends
Methods
-
_triggerListeners()
-
Handles the logic of triggering listeners
- Inherited From:
-
addEventListener(type, callback [, thisObject] [, useCapture])
-
Adds an event listener on this object
Parameters:
Name Type Argument Description typestring The event type, or multiple types separated by spaces callbackfunction The callback to call when the event fires thisObjectobject <optional>
The object to use as "this" when firing the callback useCapturebool <optional>
If true, fires the callback on the capture phase, as opposed to bubble phase - Inherited From:
-
dispatchEvent(event)
-
Fires an event on this object
Parameters:
Name Type Description eventstring | WPGMZA.Event Either the event type as a string, or an instance of WPGMZA.Event - Inherited From:
-
getAnimation()
-
Returns the animation set on this marker (see WPGMZA.Marker ANIMATION_* constants).
- Inherited From:
-
getDraggable()
-
Gets whether this marker is draggable or not
- Inherited From:
Returns:
True if the marker is draggable- Type
- bool
-
getIcon()
-
Gets the marker icon image URL, without the protocol prefix
- Inherited From:
Returns:
The URL to the markers icon image- Type
- string
-
getPosition()
-
Gets the position of the marker
- Inherited From:
Returns:
LatLng literal of this markers position- Type
- object
-
getVisible()
-
Get the marker visibility
- Inherited From:
- To Do:
-
- Implement
-
hasEventListener(type)
-
Test for listeners of type on this object
Parameters:
Name Type Description typestring The event type to test for - Inherited From:
Returns:
True if this object has listeners bound for the specified type- Type
- bool
-
off()
-
Alias for removeEventListener
- Inherited From:
- See:
-
on()
-
Alias for addEventListener
- Inherited From:
- See:
-
onAdded()
-
Called when the marker has been added to a map
- Inherited From:
Fires:
- module:WPGMZA.Marker~event:select When this marker is targeted by the marker shortcode attribute
Listens to Events:
- module:WPGMZA.Marker~event:added
-
onClick()
-
Called when the marker has been clicked
- Overrides:
Listens to Events:
- module:WPGMZA.ProMarker~event:click
-
onMouseOver()
-
Called when the user hovers the mouse over this marker
- Overrides:
Listens to Events:
- module:WPGMZA.ProMarker~event:mouseover
-
onSelect()
-
Called when the marker has been selected, either by the icon being clicked, or from a marker listing
- Inherited From:
Listens to Events:
- module:WPGMZA.Marker~event:select
-
openInfoWindow()
-
Placeholder for future use
- Inherited From:
-
panIntoView()
-
Centers the map this marker belongs to on this marker
- Inherited From:
Throws:
Marker hasn't been added to a map -
parseGeometry(string)
-
Scans a string for all floating point numbers and build an array of latitude and longitude literals from the matched numbers
Parameters:
Name Type Description stringstring The string to parse numbers from - Inherited From:
Returns:
An array of LatLng literals parsed from the string- Type
- array
-
removeEventListener(type [, listener] [, thisObject] [, useCapture])
-
Removes event listeners from this object
Parameters:
Name Type Argument Description typestring The event type to remove listeners from listenerfunction <optional>
The function to remove. If omitted, all listeners will be removed thisObjectobject <optional>
Use the parameter to remove listeners bound with the same thisObject useCapturebool <optional>
Remove the capture phase event listener. Otherwise, the bubble phase event listener will be removed. - Inherited From:
-
setAnimation(animation)
-
Sets the animation for this marker (see WPGMZA.Marker ANIMATION_* constants).
Parameters:
Name Type Description animationint The animation to set. - Inherited From:
-
setDraggable(draggable)
-
Sets whether the marker is draggable
Parameters:
Name Type Description draggablebool Set to true to make this marker draggable - Inherited From:
-
setMap(map)
-
Sets the map this marker should be displayed on. If it is already on a map, it will be removed from that map first, before being added to the supplied map.
Parameters:
Name Type Description mapWPGMZA.Map The map to add this markmer to - Inherited From:
-
setOptions(options)
-
Sets options on this marker
Parameters:
Name Type Description optionsobject An object containing the options to be set - Inherited From:
-
setPosition(latLng)
-
Sets the position of the marker.
Parameters:
Name Type Description latLngobject | WPGMZA.LatLng The position either as a LatLng literal or instance of WPGMZA.LatLng. - Inherited From:
-
setVisible(visible)
-
Set the marker visibility. This is used by the store locator etc. and is not a setting. Closes the InfoWindow if the marker is being hidden and the InfoWindow for this marker is open.
Parameters:
Name Type Description visiblebool Whether the marker should be visible or not - Inherited From:
-
toJSON()
-
Overrides MapObject.toJSON, serializes the marker to a JSON object
- Inherited From:
Returns:
A JSON representation of this marker- Type
- object
-
trigger()
-
Alias for removeEventListener
- Inherited From:
- See: