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 iconcercalia.Icon Icon
-
addPopup(popup)
src/cercalia/marker.js, line 616 -
Name Type Description popupcercalia.Popup Popup to add to marker.
-
closePopup(opt_fade)
src/cercalia/marker.js, line 741 -
Close popup
Name Type Description fadeboolean 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 keystring 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.SimpleLabelif 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:
trueif marker is dragging, otherwisefalse.
-
isVisible(){boolean}
src/cercalia/marker.js, line 903 -
Returns:
trueif 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 positioncercalia.LonLat Coordinate.
durationnumber Movement duration, in milliseconds (default value 2000ms)
callbackFnfunction Callback function, when movement ends
centerMapDuringMovementboolean Center map during movement. Default
false.numStepsnumber Number of steps to animate. Default
100. -
openPopup(opt_fade)
src/cercalia/marker.js, line 724 -
Open popup
Name Type Description fadeboolean 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 keystring Key name.
value* Value.
-
setDraggable(draggable)
src/cercalia/marker.js, line 478 -
Name Type Description draggableboolean Change marker to draggable state.
-
setIcon(icon)
src/cercalia/marker.js, line 574 -
Change the marker icon
Name Type Description iconcercalia.Icon Icon
-
setId(id)
src/cercalia/marker.js, line 297 -
Assign ID to marker
Name Type Description idstring Id.
-
setLabel(label)
src/cercalia/marker.js, line 812 -
Assign/change marker label text
Name Type Description labelcercalia.Label Label content
-
setOnDragEnd(fn)
src/cercalia/marker.js, line 224 -
Name Type Description fnfunction Callback function
-
setOnDragMove(fn)
src/cercalia/marker.js, line 216 -
Name Type Description fnfunction Callback function
-
setOnDragStart(fn)
src/cercalia/marker.js, line 208 -
Name Type Description fnfunction Callback function
-
setPosition(position)
src/cercalia/marker.js, line 337 -
Move the marker position to the specified via parameter
Name Type Description positioncercalia.LonLat Position
-
setSimpleLabel(simpleLabel)
src/cercalia/marker.js, line 595 -
SimpleLabel to add/modify related with the marker
Name Type Description simpleLabelcercalia.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 visibleboolean Visible. (
trueorfalse). -
setZIndex(zIndex)
src/cercalia/marker.js, line 460 -
Change the zIndex value
Name Type Description zIndexnumber Z-Index of marker.
-
showInfoMap()
src/cercalia/marker.js, line 664 -
-
showLabel()
src/cercalia/marker.js, line 830 -
Show marker label