new cercalia.Feature(options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Feature options
|
Extends
Methods
-
destroy()
src/cercalia/feature.js, line 939 -
Destroy object and related atributes to free up memory
-
Returns:
Returns the feature limits
-
Returns:
Get Class name of object
-
Name Type Description position
cercalia.LonLat Position
Returns:
Closest position
-
Returns:
Objectol.Feature
Openlayers3
-
getFillColor(){string}
src/cercalia/feature.js, line 748 -
Returns:
Fill color
-
getFillOpacity(){number}
src/cercalia/feature.js, line 766 -
Returns:
Fill opacity. Values between 0 and 1.
-
Returns:
Unique Id.
-
Returns:
Map objectcercalia.Map
-
getOutlineColor(){string}
src/cercalia/feature.js, line 713 -
Returns:
Outline color.
-
getOutlineOpacity(){number}
src/cercalia/feature.js, line 695 -
Returns:
Feature object outline opacity.
-
getOutlineWidth(){number}
src/cercalia/feature.js, line 731 -
Returns:
Outline width
-
getRadius(){number}
src/cercalia/feature.js, line 624 -
Returns:
circle Radius (in pixels).
-
Returns:
Returnscercalia.SimpleLabel
if it's created. If not, returnsnull
.
-
getStrokeColor(){string}
src/cercalia/feature.js, line 660 -
Returns:
Outline color.
-
getStrokeOpacity(){number}
src/cercalia/feature.js, line 642 -
Returns:
Feature opacity. Values:[0..1]
.
-
getStrokeWidth(){number}
src/cercalia/feature.js, line 678 -
Returns:
Outline width
-
getWKT(){string|null}
src/cercalia/feature.js, line 340 -
Returns:
Feature WKT (Well-known-text). WKT has not Circle type format.
-
getZIndex(){number}
src/cercalia/feature.js, line 606 -
Returns:
zIndex Feature object
-
hasDirections(){boolean}
src/cercalia/feature.js, line 1181 -
Returns true if the feature has directions created and visibles.
Returns:
true
if the feature has directions created and visibles.
-
hideDirections()
src/cercalia/feature.js, line 1203 -
Hide arrow directions of feature.
-
isDraggable(){boolean}
src/cercalia/feature.js, line 535 -
Returns:
Returns the drag status for feature. Values:true
orfalse
.
-
isDragging(){boolean}
src/cercalia/feature.js, line 785 -
True if feature is dragging, otherwise false.
Returns:
true
if dragging is enabled to this feature.
-
isEditable(){boolean|undefined}
src/cercalia/feature.js, line 543 -
Returns:
Returns the edit status for feature. Values:true
orfalse
.
-
setDraggable(draggable)
src/cercalia/feature.js, line 524 -
Converts the feature object to
draggable
. You can drag the feature.Name Type Description draggable
boolean Draggable.
-
setEditable(edit)
src/cercalia/feature.js, line 552 -
Modify the edit status for feature. Values:
true
orfalse
.Name Type Description edit
boolean Set
true
to edit feature. -
setEditablePointColor(color)
src/cercalia/feature.js, line 1215 -
Change vertices color when is in editing mode.
Name Type Description color
string Hexadecimal color.
-
setFillColor(fillColor)
src/cercalia/feature.js, line 757 -
Assign the fillcolor.
Name Type Description fillColor
string Fill color Hexadecimal color. Ex: '#ff0000'
-
setFillOpacity(fillOpacity)
src/cercalia/feature.js, line 775 -
Assign Fill opacity. Values between 0 and 1.
Name Type Description fillOpacity
number Fill opacity. Values between 0 and 1.
-
setId(id)
src/cercalia/feature.js, line 332 -
Assign an ID to the feature.
Name Type Description id
string Id of feature.
-
setOnDragEnd(fn)
src/cercalia/feature.js, line 443 -
Name Type Description fn
function Callback function.
-
setOnDragMove(fn)
src/cercalia/feature.js, line 435 -
Name Type Description fn
function Callback function.
-
setOnDragStart(fn)
src/cercalia/feature.js, line 427 -
Name Type Description fn
function Callback function.
-
setOnModifyEnd(fn)
src/cercalia/feature.js, line 460 -
Name Type Description fn
function Callback function.
-
setOnModifyStart(fn)
src/cercalia/feature.js, line 452 -
Name Type Description fn
function Callback function.
-
setOutlineColor(outlineColor)
src/cercalia/feature.js, line 722 -
Asign the outline color.
Name Type Description outlineColor
string object color
-
setOutlineOpacity(outlineOpacity)
src/cercalia/feature.js, line 704 -
Assigns the object outline opacity. Feature.
Name Type Description outlineOpacity
number feature outline opacity.
-
setOutlineWidth(outlineWidth)
src/cercalia/feature.js, line 739 -
Name Type Description outlineWidth
number outiline width
-
setRadius(radius)
src/cercalia/feature.js, line 633 -
Assigns the feature object outline opacity.
Name Type Description radius
number Radius in meters.
-
setSimpleLabel(simpleLabel)
src/cercalia/feature.js, line 803 -
SimpleLabel to add/modify related to the feature
Name Type Description simpleLabel
cercalia.SimpleLabel SimpleLabel to add feature.
-
setStrokeColor(strokeColor)
src/cercalia/feature.js, line 669 -
Assign the object outiline color.
Name Type Description strokeColor
string Object Color
-
setStrokeOpacity(strokeOpacity)
src/cercalia/feature.js, line 651 -
Assigns the feature object outline opacity. Feature.
Name Type Description strokeOpacity
number Opacity, values between
[0..1]
-
setStrokeWidth(strokeWidth)
src/cercalia/feature.js, line 686 -
Name Type Description strokeWidth
number Outline width
-
setZIndex(zIndex)
src/cercalia/feature.js, line 615 -
Assigns a zIndex to Feature object
Name Type Description zIndex
number Z Index position.
-
showDirections()
src/cercalia/feature.js, line 1189 -
Show arrow directions of feature
-
tranformCircleToPolygon(opt_sides)
src/cercalia/feature.js, line 1237 -
Converts a circle feature to a circular polygon
Name Type Description sides
number Number of vertexs. Default is
32
.