new cercalia.Feature(options)
| Name | Type | Description |
|---|---|---|
options |
cercaliax.FeatureOptions |
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 onClickfunction | undefined optional -
addOnDragEnd(onDragEnd)
-
Name Type Description onDragEndfunction | undefined optional -
addOnDragMove(onDragMove)
-
Name Type Description onDragMovefunction | undefined optional -
addOnDragStart(onDragStart)
-
Name Type Description onDragStartfunction | 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 positioncercalia.LonLat Position
Returns:
Closest position of feature respect parameter position.
-
getFeature(){ol.Feature}
-
Returns:
Objectol.FeatureOpenlayers3
-
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.
-
getMap(){cercalia.Map}
-
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.SimpleLabelif 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:trueorfalse.
-
isDragging(){boolean}
-
True if feature is dragging, otherwise false.
-
isEditable(){boolean}
-
Returns:
Returns the edit status for feature. Values:trueorfalse.
-
onDragEnd()
-
-
onDragMove()
-
-
onDragStart()
-
-
setDraggable(draggable)
-
Converts the feature object to
draggable. You can drag the feature.Name Type Description draggableboolean -
setEditable()
-
Modify the edit status for feature. Values:
trueorfalse. -
setEditablePointColor(){string}
-
Returns:
Change vertices color when is in editing mode.
-
setFillColor(Fill)
-
Assign the fillcolor.
Name Type Description Fillstring color Hexadecimal color. Ex: '#ff0000'
-
setFillOpacity(fillOpacity)
-
Assign Fill opacity. Values between 0 and 1.
Name Type Description fillOpacitynumber Fill opacity. Values between 0 and 1.
-
setId(id)
-
Assign an ID to the feature.
Name Type Description idstring -
setLineDash(lineDash)
-
Assign Line dash.
Name Type Description lineDashArray.<number> Line dash.
-
setMap(map)
-
Add or remove map reference. For add a feature, use the class
cercalia.MapfunctionaddFeatureoraddFeaturesName Type Description mapcercalia.Map Cercalia Map.
-
setOutlineColor(outlineColor)
-
Asign the outline color.
Name Type Description outlineColorstring object color
-
setOutlineOpacity(outlineOpacity)
-
Assigns the object outline opacity. Feature.
Name Type Description outlineOpacitynumber feature outline opacity.
-
setOutlineWidth(outlineWidth)
-
Name Type Description outlineWidthnumber outiline width
-
setRadius(radius)
-
Assigns the feature object outline opacity.
Name Type Description radiusnumber -
setSimpleLabel(simpleLabel)
-
SimpleLabel to add/modify related to the marker
Name Type Description simpleLabelcercalia.SimpleLabel -
setStrokeColor(strokeColor)
-
Assign the object outiline color.
Name Type Description strokeColorstring Object Color
-
setStrokeOpacity(strokeOpacity)
-
Assigns the feature object outline opacity. Feature.
Name Type Description strokeOpacitynumber Opacity, values between 0 y 1. ->
[0..1] -
setStrokeWidth(strokeWidth)
-
Name Type Description strokeWidthnumber Outline width
-
setZIndex(zIndex)
-
Assigns a zIndex to Feature object
Name Type Description zIndexnumber zIndex CSS.
-
showDirections()
-
Show arrow directions of feature