Class mxn.Marker
Defined in: mxn.core.js.
Constructor Attributes | Constructor Name and Description |
---|---|
mxn.Marker(point)
Marker create's a new marker pin
|
Method Attributes | Method Name and Description |
---|---|
addData(options)
addData conviniently set a hash of options on a marker
|
|
Closes the marker's info bubble.
|
|
fromProprietary(apiId, marker)
Retrieve the settings from a proprietary marker.
|
|
getAttribute(key)
getAttribute: gets the value of "key"
|
|
hide()
Hide the marker.
|
|
Open the marker's info bubble.
|
|
setAttribute(key, value)
Set an arbitrary key/value pair on a marker
|
|
setChild(some_proprietary_marker)
|
|
setDraggable(draggable)
Sets the draggable state of the marker
|
|
setGroupName(sGrpName)
Markers are grouped up by this name.
|
|
setHover(hover)
Sets that the marker info is displayed on hover
|
|
setHoverIcon(hoverIconUrl)
|
|
setIcon(iconUrl, iconSize, iconAnchor)
Sets the icon for a marker
|
|
setIconAnchor(iconAnchor)
Sets the anchor point for a marker
|
|
setIconSize(iconSize)
Sets the size of the icon for a marker
|
|
setInfoBubble(infoBubble)
Sets the html/text content for a bubble popup for a marker
|
|
setInfoDiv(infoDiv, div)
Sets the text and the id of the div element where to the informationuseful for putting information in a div outside of the map
|
|
setLabel(labelText)
|
|
setShadowIcon(iconUrl, iconShadowSize)
Sets the icon for a marker
|
|
show()
Show the marker.
|
|
toProprietary(apiId)
Converts the current Marker to a proprietary one for the API specified by apiId.
|
|
update()
Updates the Marker with the location of the attached proprietary marker on the map.
|
Class Detail
mxn.Marker(point)
Marker create's a new marker pin
- Parameters:
- {LatLonPoint} point
- the point on the map where the marker should go
Method Detail
addData(options)
addData conviniently set a hash of options on a marker
- Parameters:
- {Object} options
- An object literal hash of key value pairs. Keys are: label, infoBubble, icon, iconShadow, infoDiv, draggable, hover, hoverIcon, openBubble, groupName.
closeBubble()
Closes the marker's info bubble.
fromProprietary(apiId, marker)
Retrieve the settings from a proprietary marker.
- Parameters:
- {String} apiId
- The API ID of the proprietary point.
- {Object} marker
- The proprietary marker.
getAttribute(key)
getAttribute: gets the value of "key"
- Parameters:
- {String} key
- Returns:
- value
hide()
Hide the marker.
openBubble()
Open the marker's info bubble.
setAttribute(key, value)
Set an arbitrary key/value pair on a marker
- Parameters:
- {String} key
- value
setChild(some_proprietary_marker)
- Parameters:
- some_proprietary_marker
setDraggable(draggable)
Sets the draggable state of the marker
- Parameters:
- {Bool} draggable
- set to true if marker should be draggable by the user
setGroupName(sGrpName)
Markers are grouped up by this name. declutterGroup makes use of this.
- Parameters:
- sGrpName
setHover(hover)
Sets that the marker info is displayed on hover
- Parameters:
- {Boolean} hover
- set to true if marker should display info on hover
setHoverIcon(hoverIconUrl)
- Parameters:
- hoverIconUrl
setIcon(iconUrl, iconSize, iconAnchor)
Sets the icon for a marker
- Parameters:
- {String} iconUrl
- The URL of the image you want to be the icon
- iconSize
- iconAnchor
setIconAnchor(iconAnchor)
Sets the anchor point for a marker
- Parameters:
- {String} iconAnchor
- The array offset of the anchor point
setIconSize(iconSize)
Sets the size of the icon for a marker
- Parameters:
- {String} iconSize
- The array size in pixels of the marker image
setInfoBubble(infoBubble)
Sets the html/text content for a bubble popup for a marker
- Parameters:
- {String} infoBubble
- the html/text you want displayed
setInfoDiv(infoDiv, div)
Sets the text and the id of the div element where to the informationuseful for putting information in a div outside of the map
- Parameters:
- {String} infoDiv
- the html/text you want displayed
- {String} div
- the element id to use for displaying the text/html
setLabel(labelText)
- Parameters:
- labelText
setShadowIcon(iconUrl, iconShadowSize)
Sets the icon for a marker
- Parameters:
- {String} iconUrl
- The URL of the image you want to be the icon
- iconShadowSize
show()
Show the marker.
toProprietary(apiId)
Converts the current Marker to a proprietary one for the API specified by apiId.
- Parameters:
- {String} apiId
- The API ID of the proprietary marker.
- Returns:
- A proprietary marker.
update()
Updates the Marker with the location of the attached proprietary marker on the map.