Class: Digitizing

Digitizing.Digitizing(map, lizmap3)

new Digitizing(map, lizmap3)

Build the lizmap Digitizing instance

Parameters:
Name Type Description
map map

OpenLayers map

lizmap3 object

The old lizmap object

Source:
Fires:

Members

angleConstraint :number

Get the angle constraint

Type:
  • number
Source:

angleConstraint :number

Set the angle constraint

Type:
  • number
Source:

context :string

Get the context

Type:
  • string
Source:

context :string

Set the context

Type:
  • string
Source:

distanceConstraint :number

Get the distance constraint

Type:
  • number
Source:

distanceConstraint :number

Set the distance constraint

Type:
  • number
Source:

drawColor :string

Get the drawing color

Type:
  • string
Source:

drawColor :string

Set the drawing color

Type:
  • string
Source:
Fires:

(readonly) drawLayer :VectorLayer

Get the draw layer

Type:
  • VectorLayer
Source:

editedFeatureText :string

Get the edited feature text

Type:
  • string
Source:

editedFeatureText :string

Set the edited feature text

Type:
  • string
Source:
Fires:

editedFeatureTextRotation :string

Get the edited feature text rotation

Type:
  • string
Source:

editedFeatureTextRotation :string

Set the edited feature text rotation

Type:
  • string
Source:
Fires:

editedFeatureTextScale :number

Get the edited feature text scale

Type:
  • number
Source:

editedFeatureTextScale :number

Set the edited feature text scale

Type:
  • number
Source:
Fires:

(readonly) editedFeatures :Array.<Feature>

Get the edited features

Type:
  • Array.<Feature>
Source:

featureDrawn :Array.<Feature>|null

Get the features drawn

Type:
  • Array.<Feature> | null
Source:

hasConstraintsPanelVisible :boolean

Is the digitizing constraints panel visible or not

Type:
  • boolean
Source:

hasMeasureVisible :boolean

Is the digitizing measure tool visible or not

Type:
  • boolean
Source:

hasMeasureVisible :boolean

Set the digitizing measure tool is active or not

Type:
  • boolean
Source:
Fires:

isEdited :boolean

Is digitizing edit tool active or not?

Type:
  • boolean
Source:

isEdited :boolean

Set the digitizing edit tool is active or not

Type:
  • boolean
Source:
Fires:

isErasing :boolean

Is the digitizing erase tool active or not?

Type:
  • boolean
Source:

isErasing :boolean

Set the digitizing erase tool is active or not

Type:
  • boolean
Source:
Fires:

isRotate :boolean

Is the digitizing rotation tool active or not?

Type:
  • boolean
Source:

isRotate :boolean

Set the digitizing rotation tool is active or not

Type:
  • boolean
Source:
Fires:

isSaved :boolean

Is the digitizing save tool active or not?

Type:
  • boolean
Source:

isScaling :boolean

Is the digitizing scale tool active or not?

Type:
  • boolean
Source:

isScaling :boolean

Set the digitizing scale tool is active or not

Type:
  • boolean
Source:
Fires:

isSplitting :boolean

Is the digitizing split tool active or not?

Type:
  • boolean
Source:

isSplitting :boolean

Set the digitizing split tool is active or not

Type:
  • boolean
Source:
Fires:

singlePartGeometry :boolean

Is digitizing single part geometry ?

Type:
  • boolean
Source:

singlePartGeometry

Update is digitizing single part geometry ?

Source:

toolSelected :string

Get the selected tool

Type:
  • string
Source:

toolSelected :string

Set the selected too

Type:
  • string
Source:
Fires:

visibility

Get the drawing layer visibility

Source:

Methods

_initMeasureTooltipOnLoadedFeatures(geom)

Initializes measure tooltip and change event on a feature loaded from local storage.

Parameters:
Name Type Description
geom Geometry

The geometry.

Source:

_setTooltipContentByGeom(geom)

Calculates measuements for a specific geometry.

Parameters:
Name Type Description
geom Geometry

The geometry.

Source:

createMeasureTooltips()

Creates measure tooltips

Source:

download(format) → {void}

Download the drawn features

Parameters:
Name Type Description
format *

the format to download the drawn features

Source:
Returns:
Type
void

eraseAll() → {void}

Erase all drawn features

Source:
Fires:
Returns:
Type
void

formatArea(polygon) → {string}

Format area output.

Parameters:
Name Type Description
polygon Polygon

The polygon.

Source:
Returns:

Formatted area.

Type
string

formatLength(geom) → {string}

Format length output.

Parameters:
Name Type Description
geom Geometry

The geom.

Source:
Returns:

The formatted length.

Type
string

getFeatureDrawnSLD(index) → {null|string}

Get the SLD for the drawn feature at the index

Parameters:
Name Type Description
index number

The index of the drawn feature

Source:
Returns:

The SLD for the drawn feature or null if the feature does not exist at the index

Type
null | string

getProjectedLength(geom, projection) → {number}

Get spherical length of a geometry based on provided projection

Parameters:
Name Type Default Description
geom Geometry

The geom.

projection null | string null

The projection.

Source:
Returns:

The calculated spherical length.

Type
number

import(file) → {void}

Import file to draw features stored in it

Parameters:
Name Type Description
file *

the file to draw

Source:
Returns:
Type
void

loadFeatureDrawnToMap() → {void}

Load all drawn features from local storage

Source:
Returns:
Type
void

saveFeatureDrawn() → {void}

Save all drawn features in local storage

Source:
Returns:
Type
void

toggleEdit()

Toggle edit mode

Source:

toggleErasing()

Toggle erase mode

Source:

toggleMeasure()

Toggle measure mode

Source:

toggleRotate()

Toggle rotate mode

Source:

toggleSave() → {void}

Toggle save mode

Source:
Fires:
Returns:
Type
void

toggleScaling()

Toggle scaling mode

Source:

toggleSplit()

Toggle split mode

Source:

toggleVisibility(visible)

Set visibility or toggle if not defined

Parameters:
Name Type Description
visible boolean

true to show, false to hide

Source: