new cercalia.Marker(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Marker options
|
Extends
Methods
-
addExtraIcon(icon)
src/cercalia/marker.js, line 912 -
Add extra icon with a plus zIndex. You can add multiple icons to a marker.
Name Type Description icon
cercalia.Icon Icon
-
addPopup(popup)
src/cercalia/marker.js, line 616 -
Name Type Description popup
cercalia.Popup Popup to add to marker.
-
closePopup(opt_fade)
src/cercalia/marker.js, line 741 -
Close popup
Name Type Description fade
boolean Indicates whether to apply 'fadeOut' animation effect
-
destroy()
src/cercalia/marker.js, line 793 -
Destroy popup
-
get(key){*}
src/cercalia/marker.js, line 895 -
Gets a value.
Name Type Description key
string Key name.
Returns:
Value.
-
Returns:
Get Class name of object
-
getExtraIcons(){}
src/cercalia/marker.js, line 938 -
Returns:
Return extra icons
-
Returns:
Objectol.Feature
-
Returns:
Icon.
-
Returns:
Unique Id.
-
Returns:
label Label assigned to th marker.
-
Returns:
The map where it's painted, if not returnsnull
.
-
Returns:
Popup, if don't have returnsnull
.
-
Returns:
position The marker Array position[lat, lon]
.
-
Returns:
Returnscercalia.SimpleLabel
if created. If not, returnsnull
.
-
getZIndex(){number}
src/cercalia/marker.js, line 470 -
Returns:
CSS marker zIndex
-
hideLabel()
src/cercalia/marker.js, line 840 -
Hide marker label
-
isDraggable(){boolean}
src/cercalia/marker.js, line 530 -
Returns:
Boolean showing if marker it's draggable.
-
isDragging(){boolean}
src/cercalia/marker.js, line 875 -
Returns:
true
if marker is dragging, otherwisefalse
.
-
isVisible(){boolean}
src/cercalia/marker.js, line 903 -
Returns:
true
if visible, elsefalse
.
-
movePosition(position, duration, callbackFn, centerMapDuringMovement, numSteps)
src/cercalia/marker.js, line 367 -
Move the parker position with an animation movement from a starting to ending position, in a specified time (duration). Optionally it's possible to call a function specified via parameter.
Name Type Description position
cercalia.LonLat Coordinate.
duration
number Movement duration, in milliseconds (default value 2000ms)
callbackFn
function Callback function, when movement ends
centerMapDuringMovement
boolean Center map during movement. Default
false
.numSteps
number Number of steps to animate. Default
100
. -
openPopup(opt_fade)
src/cercalia/marker.js, line 724 -
Open popup
Name Type Description fade
boolean Indicates whether to apply 'fadeIn' animation effect
-
removeLabel()
src/cercalia/marker.js, line 859 -
Destroy the label object
-
set(key, value)
src/cercalia/marker.js, line 885 -
Sets a value
Name Type Description key
string Key name.
value
* Value.
-
setDraggable(draggable)
src/cercalia/marker.js, line 478 -
Name Type Description draggable
boolean Change marker to draggable state.
-
setIcon(icon)
src/cercalia/marker.js, line 574 -
Change the marker icon
Name Type Description icon
cercalia.Icon Icon
-
setId(id)
src/cercalia/marker.js, line 297 -
Assign ID to marker
Name Type Description id
string Id.
-
setLabel(label)
src/cercalia/marker.js, line 812 -
Assign/change marker label text
Name Type Description label
cercalia.Label Label content
-
setOnDragEnd(fn)
src/cercalia/marker.js, line 224 -
Name Type Description fn
function Callback function
-
setOnDragMove(fn)
src/cercalia/marker.js, line 216 -
Name Type Description fn
function Callback function
-
setOnDragStart(fn)
src/cercalia/marker.js, line 208 -
Name Type Description fn
function Callback function
-
setPosition(position)
src/cercalia/marker.js, line 337 -
Move the marker position to the specified via parameter
Name Type Description position
cercalia.LonLat Position
-
setSimpleLabel(simpleLabel)
src/cercalia/marker.js, line 595 -
SimpleLabel to add/modify related with the marker
Name Type Description simpleLabel
cercalia.SimpleLabel Simple Label.
-
setVisible(visible)
src/cercalia/marker.js, line 540 -
Show or hide the marker, including its SimpleLabel, Label or Popup.
Name Type Description visible
boolean Visible. (
true
orfalse
). -
setZIndex(zIndex)
src/cercalia/marker.js, line 460 -
Change the zIndex value
Name Type Description zIndex
number Z-Index of marker.
-
showInfoMap()
src/cercalia/marker.js, line 664 -
-
showLabel()
src/cercalia/marker.js, line 830 -
Show marker label