new cercalia.Feature(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Feature options
|
Members
-
onClick{function}
-
-
onDoubleClick{function}
-
-
onDrop{funtion}
-
-
onMouseOut{function}
-
onMouseOver Function, if specified
-
onMouseOver{function}
-
-
onRightClick{function}
-
Methods
-
addOnClick(onClick)
-
Name Type Description onClick
function | undefined optional -
addOnDragEnd(onDragEnd)
-
Name Type Description onDragEnd
function | undefined optional -
addOnDragMove(onDragMove)
-
Name Type Description onDragMove
function | undefined optional -
addOnDragStart(onDragStart)
-
Name Type Description onDragStart
function | undefined optional -
destroy()
-
Destroy object and related atributes to free up memory
-
getBounds(){cercalia.Bounds}
-
Returns:
Returns the feature limits
-
getClass(){string}
-
Returns the object type.
-
getClosestCoordinate(position){cercalia.LonLat}
-
Name Type Description position
cercalia.LonLat Position
Returns:
Closest position of feature respect parameter position.
-
getFeature(){ol.Feature}
-
Returns:
Objectol.Feature
Openlayers3
-
getFillColor(){string}
-
Returns:
Fill color
-
getFillOpacity(){number}
-
Returns:
Fill opacity. Values between 0 and 1.
-
getId(){string}
-
Returns:
Internal feature ID
-
getLineDash(){Array.<number>}
-
Returns:
Line dash.
-
Returns:
Map objectcercalia.Map
-
getOutlineColor(){string}
-
Returns:
Outline color.
-
getOutlineOpacity(){number}
-
Returns:
Feature object outline opacity.
-
getOutlineWidth(){number}
-
Returns:
Outline width
-
getRadius(){number}
-
Returns:
circle Radius (in pixels).
-
getSimpleLabel(){cercalia.SimpleLabel}
-
Returns:
Returnscercalia.SimpleLabel
if it's created. If not, returnsnull
.
-
getStrokeColor(){string}
-
Returns:
Outline color.
-
getStrokeOpacity(){number}
-
Returns:
Feature opacity. Values:[0..1]
.
-
getStrokeWidth(){number}
-
Returns:
Outline width
-
getWKT(){string}
-
Returns:
Feature WKT (Well-known-text). WKT has not Circle type format.
-
getZIndex(){number}
-
Returns:
zIndex Feature object
-
hasDirections()
-
Returns true if the feature has directions created and visibles.
-
hideDirections()
-
Hide arrow directions of feature.
-
isDraggable(){boolean}
-
Returns:
Returns the drag status for feature. Values:true
orfalse
.
-
isDragging(){boolean}
-
True if feature is dragging, otherwise false.
-
isEditable(){boolean}
-
Returns:
Returns the edit status for feature. Values:true
orfalse
.
-
onDragEnd()
-
-
onDragMove()
-
-
onDragStart()
-
-
setDraggable(draggable)
-
Converts the feature object to
draggable
. You can drag the feature.Name Type Description draggable
boolean -
setEditable()
-
Modify the edit status for feature. Values:
true
orfalse
. -
setEditablePointColor(){string}
-
Returns:
Change vertices color when is in editing mode.
-
setFillColor(Fill)
-
Assign the fillcolor.
Name Type Description Fill
string color Hexadecimal color. Ex: '#ff0000'
-
setFillOpacity(fillOpacity)
-
Assign Fill opacity. Values between 0 and 1.
Name Type Description fillOpacity
number Fill opacity. Values between 0 and 1.
-
setId(id)
-
Assign an ID to the feature.
Name Type Description id
string -
setLineDash(lineDash)
-
Assign Line dash.
Name Type Description lineDash
Array.<number> Line dash.
-
setMap(map)
-
Add or remove map reference. For add a feature, use the class
cercalia.Map
functionaddFeature
oraddFeatures
Name Type Description map
cercalia.Map Cercalia Map.
-
setOutlineColor(outlineColor)
-
Asign the outline color.
Name Type Description outlineColor
string object color
-
setOutlineOpacity(outlineOpacity)
-
Assigns the object outline opacity. Feature.
Name Type Description outlineOpacity
number feature outline opacity.
-
setOutlineWidth(outlineWidth)
-
Name Type Description outlineWidth
number outiline width
-
setRadius(radius)
-
Assigns the feature object outline opacity.
Name Type Description radius
number -
setSimpleLabel(simpleLabel)
-
SimpleLabel to add/modify related to the marker
Name Type Description simpleLabel
cercalia.SimpleLabel -
setStrokeColor(strokeColor)
-
Assign the object outiline color.
Name Type Description strokeColor
string Object Color
-
setStrokeOpacity(strokeOpacity)
-
Assigns the feature object outline opacity. Feature.
Name Type Description strokeOpacity
number Opacity, values between 0 y 1. ->
[0..1]
-
setStrokeWidth(strokeWidth)
-
Name Type Description strokeWidth
number Outline width
-
setZIndex(zIndex)
-
Assigns a zIndex to Feature object
Name Type Description zIndex
number zIndex CSS.
-
showDirections()
-
Show arrow directions of feature