Class Index | File Index

Classes


Class eniro.maps.Marker


Defined in: Marker.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a marker from the given options object.
Method Summary
Method Attributes Method Name and Description
 
equals(other)
Compare this instance with another instance.
 
Returns the icon image in use.
 
Returns the map instance this marker is associated with or null if none set.
 
Returns the position.
 
Tells whether marker is clickable.
 
Tells whether marker is draggable.
 
Tells whether marker is rotatable.
 
Tells whether marker is visible.
 
setClickable(clickable)
Sets whether the marker is clickable.
 
setDraggable(draggable)
Sets whether the marker is draggable.
 
setIcon(icon)
Sets the marker image to use.
 
setMap(map)
Sets the map to add this marker to.
 
setOptions(opts)
Sets using a options object.
 
setPosition(latlng)
Sets the position.
 
setVisible(visible)
Sets whether the marker is visible.
Event Summary
Event Attributes Event Name and Description
 
Marker is clicked.
 
drag()
Marker dragging.
 
Marker drag finished.
 
Marker drag started.
 
Marker is left by mouse pointer.
 
Marker is entered by mouse pointer.
Class Detail
eniro.maps.Marker(opts)
Creates a marker from the given options object.
Parameters:
{MarkerOptions} opts
Options object.
Method Detail
{boolean} equals(other)
Compare this instance with another instance.
Parameters:
{eniro.maps.Marker} other
The instance to compare this instance to.
Returns:
{boolean} True if this instance is equal to the given one. Otherwise false.

{String|eniro.maps.MarkerImage} getIcon()
Returns the icon image in use. Depending on whether the icon was set using a {string} or {eniro.maps.MarkerImage}, the corresponding will be returned.
Returns:
{String|eniro.maps.MarkerImage} The icon image or null.

{eniro.maps.Map} getMap()
Returns the map instance this marker is associated with or null if none set.
Returns:
{eniro.maps.Map} The map instance or null.

{eniro.maps.LatLng} getPosition()
Returns the position.
Returns:
{eniro.maps.LatLng} The position of the marker.

{boolean} isClickable()
Tells whether marker is clickable.
Returns:
{boolean} True if marker is clickable. Otherwise false.

{boolean} isDraggable()
Tells whether marker is draggable.
Returns:
{boolean} True if marker is visible. Otherwise false.

{boolean} isRotatable()
Tells whether marker is rotatable.
Returns:
{boolean} True if marker is rotatable. Otherwise false.

{boolean} isVisible()
Tells whether marker is visible.
Returns:
{boolean} True if marker is visible. Otherwise false.

setClickable(clickable)
Sets whether the marker is clickable.
Parameters:
{boolean} clickable
Set to true if marker should be clickable. Otherwise false.

setDraggable(draggable)
Sets whether the marker is draggable.
Parameters:
{boolean} draggable
Set to true if marker should be draggable. Otherwise false.

setIcon(icon)
Sets the marker image to use. Can either be a string or eniro.maps.MarkerImage object. Set null to use default marker image style.
Parameters:
{String|eniro.maps.MarkerImage} icon
The icon to use.

setMap(map)
Sets the map to add this marker to. Setting the map to null will remove the marker.
Parameters:
{eniro.maps.Map} map
A map instance.

setOptions(opts)
Sets using a options object.
Parameters:
{MarkerOptions} opts
Options object.

setPosition(latlng)
Sets the position. Must be specified to make marker appear.
Parameters:
{eniro.maps.LatLng} latlng
The position to place the marker at.

setVisible(visible)
Sets whether the marker is visible.
Parameters:
{boolean} visible
Set to true if marker should be visible. Otherwise false.
Event Detail
click()
Marker is clicked. Adding a event listener for 'click' will automatically make the marker clickable.
eniro.maps.event(marker, 'click', listener);

drag()
Marker dragging. Adding a event listener for 'drag' will automatically make the marker draggable.
eniro.maps.event(marker, 'drag', listener);

dragend()
Marker drag finished. Adding a event listener for 'dragend' will automatically make the marker draggable.
eniro.maps.event(marker, 'dragend', listener);

dragstart()
Marker drag started. Adding a event listener for 'dragstart' will automatically make the marker draggable.
eniro.maps.event(marker, 'dragstart', listener);

mouseout()
Marker is left by mouse pointer.
eniro.maps.event(marker, 'mouseout', listener);

mouseover()
Marker is entered by mouse pointer.
eniro.maps.event(marker, 'mouseover', listener);

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Mar 30 2020 12:10:03 GMT+0200 (CEST)