var areaTool = new AreaTool({
'once' : true,
'symbol': {
'lineColor' : '#34495e',
'lineWidth' : 2
},
'vertexSymbol' : {
'markerType' : 'ellipse',
'markerFill' : '#1bbc9b',
'markerLineColor' : '#000',
'markerLineWidth' : 3,
'markerWidth' : 10,
'markerHeight' : 10
},
'language' : 'en-US'
}).addTo(map);
Parameter |
Type |
Default |
Description |
options
opt
|
options
|
null
|
construct options
Properties
Parameter |
Type |
Default |
Description |
language
opt
|
String
|
zh-CN
|
language of the distance tool, zh-CN or en-US |
metric
opt
|
Boolean
|
true
|
display result in metric system |
imperial
opt
|
Boolean
|
false
|
display result in imperial system. |
symbol
opt
|
Object
|
null
|
symbol of the line |
vertexSymbol
opt
|
Object
|
null
|
symbol of the vertice |
labelOptions
opt
|
Object
|
null
|
construct options of the vertice labels. |
|
Extends:
Members
(constant) options
Properties:
Name |
Type |
Description |
options
|
options
|
Properties
Name |
Type |
Default |
Description |
language
|
String
|
|
language of the distance tool, zh-CN or en-US |
metric
|
Boolean
|
|
display result in metric system |
imperial
|
Boolean
|
|
display result in imperial system. |
symbol
|
Object
|
|
symbol of the line |
vertexSymbol
|
Object
|
|
symbol of the vertice |
labelOptions
|
Object
|
|
construct options of the vertice labels. |
mode
opt
|
String
|
null
|
mode of the draw tool |
once
opt
|
Boolean
|
null
|
whether disable immediately once drawn a geometry. |
|
- Overrides:
- Source:
Methods
Clear the measurements
Inherited From:
Returns:
DistanceTool:
this
Get the VectorLayers with the geometries drawn on the map during measuring.
Inherited From:
Returns:
Array.<Layer>:
Get last measuring result
Inherited From:
Returns:
Number: