Documentation
Code
GitLab
@geogirafe/lib-geoportal
components/drawing/drawingFeature
DrawingFeature
Class DrawingFeature
Index
Constructors
constructor
Properties
geojson
id
on
Change
Accessors
display
Measure
display
Name
fill
Color
font
measure
Color
measure
Font
Size
name
name
Color
name
Font
Size
selected
stroke
Color
stroke
Width
type
Methods
add
To
State
get
Area
Text
get
Coord
Text
get
Length
Text
get
Vertex
Style
is
Point
Or
Polyline
serialize
circle
To
Polygon
deserialize
Constructors
constructor
new
DrawingFeature
(
tool
:
DrawingShape
,
geojson
?:
object
,
name
?:
null
|
string
,
)
:
DrawingFeature
Parameters
tool
:
DrawingShape
geojson
:
object
= {}
name
:
null
|
string
= null
Returns
DrawingFeature
Properties
geojson
geojson
:
object
id
id
:
string
= ...
on
Change
onChange
:
(
f
:
DrawingFeature
)
=>
void
= ...
Accessors
display
Measure
get
displayMeasure
()
:
boolean
Returns
boolean
set
displayMeasure
(
v
:
boolean
)
:
void
Parameters
v
:
boolean
Returns
void
display
Name
get
displayName
()
:
boolean
Returns
boolean
set
displayName
(
v
:
boolean
)
:
void
Parameters
v
:
boolean
Returns
void
fill
Color
get
fillColor
()
:
string
Returns
string
set
fillColor
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
font
get
font
()
:
string
Returns
string
set
font
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
measure
Color
get
measureColor
()
:
string
Returns
string
set
measureColor
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
measure
Font
Size
get
measureFontSize
()
:
number
Returns
number
set
measureFontSize
(
v
:
number
)
:
void
Parameters
v
:
number
Returns
void
name
get
name
()
:
string
Returns
string
set
name
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
name
Color
get
nameColor
()
:
string
Returns
string
set
nameColor
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
name
Font
Size
get
nameFontSize
()
:
number
Returns
number
set
nameFontSize
(
v
:
number
)
:
void
Parameters
v
:
number
Returns
void
selected
get
selected
()
:
boolean
Returns
boolean
set
selected
(
v
:
boolean
)
:
void
Parameters
v
:
boolean
Returns
void
stroke
Color
get
strokeColor
()
:
string
Returns
string
set
strokeColor
(
v
:
string
)
:
void
Parameters
v
:
string
Returns
void
stroke
Width
get
strokeWidth
()
:
number
Returns
number
set
strokeWidth
(
v
:
number
)
:
void
Parameters
v
:
number
Returns
void
type
get
type
()
:
DrawingShape
Returns
DrawingShape
Methods
add
To
State
addToState
()
:
void
Returns
void
get
Area
Text
getAreaText
(
area
:
number
)
:
string
Parameters
area
:
number
Returns
string
get
Coord
Text
getCoordText
(
coord
:
number
[]
)
:
string
Parameters
coord
:
number
[]
Returns
string
get
Length
Text
getLengthText
(
length
:
number
)
:
string
Parameters
length
:
number
Returns
string
get
Vertex
Style
getVertexStyle
(
activeNode
?:
boolean
)
:
Style
Parameters
activeNode
:
boolean
= false
Returns
Style
is
Point
Or
Polyline
isPointOrPolyline
()
:
boolean
Returns
boolean
serialize
serialize
()
:
SerializedFeature
Returns
SerializedFeature
Static
circle
To
Polygon
circleToPolygon
(
center
:
number
[]
,
radius
:
number
,
nbEdges
?:
number
)
:
number
[]
[]
Parameters
center
:
number
[]
radius
:
number
nbEdges
:
number
= 300
Returns
number
[]
[]
Static
deserialize
deserialize
(
serializedFeature
:
SerializedFeature
)
:
DrawingFeature
Parameters
serializedFeature
:
SerializedFeature
Returns
DrawingFeature
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
geojson
id
on
Change
Accessors
display
Measure
display
Name
fill
Color
font
measure
Color
measure
Font
Size
name
name
Color
name
Font
Size
selected
stroke
Color
stroke
Width
type
Methods
add
To
State
get
Area
Text
get
Coord
Text
get
Length
Text
get
Vertex
Style
is
Point
Or
Polyline
serialize
circle
To
Polygon
deserialize
@geogirafe/lib-geoportal
Loading...