Class: drawController

nsVmap.nsToolsManager.Draw#drawController

Draw controller

Methods

addFeatures(oFeatures)

modules/Dessin/draw.js, line 505

Add the features in the oOpenLayersDrawOverlay_

Name Type Description
oFeatures object

Features to add

addInteraction(type)

modules/Dessin/draw.js, line 457

Add a openLayers interaction

Name Type Description
type ol.geom.GeometryType

Type of interaction

calcDistance(coordinates){number}

modules/Dessin/draw.js, line 953

Calculate the distance between points with the haversine method

Name Type Description
coordinates array.<ol.Coordinate>

Coordinates

Returns:
Distance between the two points

calcelEditFeature(olFeature)

modules/Dessin/draw.js, line 689

Cancel the editFeature : if the feature already exists, the function just close the modal but if the feature is being created, the function remove the created points

Name Type Description
olFeature ol.Feature

feature to cancel

createDrawTooltip()

modules/Dessin/draw.js, line 338

Creates a new draw draw-tooltip

createHelpTooltip()

modules/Dessin/draw.js, line 439

Creates a new help draw-tooltip

deleteAllFeatures()

modules/Dessin/draw.js, line 1513

remove all the draw features

deleteFeature(isActive)

modules/Dessin/draw.js, line 1497

Start delete feature interaction

Name Type Description
isActive boolean

true if the action is already active

displayFeatureInfos()

modules/Dessin/draw.js, line 1131

Display the feature infos in a modal with the bootrap-table plugin avaliable on (http://bootstrap-table.wenzhixin.net.cn/examples)

displayFeaturesList()

modules/Dessin/draw.js, line 1251

Display the sketches in a list with the bootrap-table plugin avaliable on (http://bootstrap-table.wenzhixin.net.cn/examples)

drawCircle(isActive)

modules/Dessin/draw.js, line 1432

Start draw circle interaction

Name Type Description
isActive boolean

true if the action is already active

drawLine(isActive)

modules/Dessin/draw.js, line 1402

Start draw line interaction

Name Type Description
isActive boolean

true if the action is already active

drawPoint(isActive)

modules/Dessin/draw.js, line 1387

Start draw point interaction

Name Type Description
isActive boolean

true if the action is already active

drawPolygon(isActive)

modules/Dessin/draw.js, line 1417

Start draw polygon interaction

Name Type Description
isActive boolean

true if the action is already active

editFeatureInfos()

modules/Dessin/draw.js, line 1182

Edit the features infos in a modal

editInfosClick(isActive)

modules/Dessin/draw.js, line 1463

Start update feature infos interaction

Name Type Description
isActive boolean

true if the action is already active

formatArea(polygon){string}

modules/Dessin/draw.js, line 1023

Calculate the area

Name Type Description
polygon ol.geom.Polygon

formatCoordinate(point){string}

modules/Dessin/draw.js, line 970

Calculate the coordinates

Name Type Description
point ol.geom.Point

formatLength(line){string}

modules/Dessin/draw.js, line 927

format length output

Name Type Description
line ol.geom.LineString

formatPerimeter(polygon){string}

modules/Dessin/draw.js, line 1006

Calculate the perimeter

Name Type Description
polygon ol.geom.Polygon

formatRadius(circle){string}

modules/Dessin/draw.js, line 980

Calculate the radius

Name Type Description
circle ol.geom.Circle

getTooltipPosition(geom)

modules/Dessin/draw.js, line 405

Set the tooltip position

Name Type Description
geom ol.geom.Geometry

The feature to place the tooltip in return {ol.Coordinate} The coordinates where place the tooltip

initExportFeatureButtons()

modules/Dessin/draw.js, line 1076

Put the href on the export buttons

modifyFeature(isActive)

modules/Dessin/draw.js, line 1447

Start modify feature interaction

Name Type Description
isActive boolean

true if the action is already active

removeDrawsInteractions()

modules/Dessin/draw.js, line 1540

remove all the draw interactions

removeFeatures(aFeatures)

modules/Dessin/draw.js, line 575

Remove the features in the array

Name Type Description
aFeatures array.<ol.Feature>

Features to delete

removeFeaturesWithControl()

modules/Dessin/draw.js, line 607

Remove the features in the array with a control modal

removeSelectedFeatures()

modules/Dessin/draw.js, line 664

Remove the selected by the checkbox draw feature

setFeatureStyle(olFeature)

modules/Dessin/draw.js, line 701

Set to the Feature a style

Name Type Description
olFeature ol.Feature

Feature to set stuff

setFeatureTooltip(olFeature)

modules/Dessin/draw.js, line 361

Set to the Feature a tooltip

Name Type Description
olFeature ol.Feature

Feature to set stuff

setInfosToFeature(olFeature)

modules/Dessin/draw.js, line 756

Put the infos in to the feature

Name Type Description
olFeature ol.Feature

Feature to put the infos in

showHideAnotations()

modules/Dessin/draw.js, line 1373

show/hide anotations

showInfosClick(isActive)

modules/Dessin/draw.js, line 1480

Start show feature infos interaction

Name Type Description
isActive boolean

true if the action is already active

updateFeatureInfos(olFeature, aInfos)

modules/Dessin/draw.js, line 812

Update the feature infos after creating or editing

Name Type Description
olFeature ol.Feature

feature to update

aInfos object

to update

zoomToFeature()

modules/Dessin/draw.js, line 1052

zoom to the selected feature