arlas-web-components / Exports / MapboxAoiDrawService
Class: MapboxAoiDrawService
Table of contents
Constructors
Properties
Methods
- addFeatures
- calculateArea
- calculateEnvelopeDimension
- deleteAll
- disableBboxEdition
- drawBbox
- emitDimensions
- emitStartBBox
- enableBboxEdition
- endDimensionsEmission
- isCircle
- isPolygon
- isValidCircle
- isValidPolygon
- setMap
- setMapboxDraw
- startBboxDrawing
- stopBboxDrawing
Constructors
constructor
• new MapboxAoiDrawService()
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:48
Properties
bboxEditionState
• bboxEditionState: EditionState
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:45
drawBbox$
• drawBbox$: Observable
<BboxDrawCommand
>
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:43
editAoi$
• editAoi$: Observable
<AoiEdition
>
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:40
polygonEditionState
• polygonEditionState: EditionState
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:46
Methods
addFeatures
▸ addFeatures(fc
, deleteOld?
): void
Add new features to the mapboxdraw object.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
fc |
FeatureCollection <Geometry , { [name: string] : any ; }> |
undefined |
Featurecollection to be added to mapboxdraw object. |
deleteOld |
boolean |
false |
if true, the mapboxdraw object is purged first, before adding the new given feature collection. |
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:118
calculateArea
▸ calculateArea(feature
): number
Returns the area of the given feature
Parameters
Name | Type |
---|---|
feature |
Feature <Geometry | GeometryCollection , { [name: string] : any ; }> |
Returns
number
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:133
calculateEnvelopeDimension
▸ calculateEnvelopeDimension(feature
): [number
, number
]
Returns the width x height of the given feature's envelope
Parameters
Name | Type |
---|---|
feature |
Feature <Geometry | GeometryCollection , { [name: string] : any ; }> |
Returns
[number
, number
]
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:141
deleteAll
▸ deleteAll(): void
Deletes all the features from Mapboxdraw object
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:127
disableBboxEdition
▸ disableBboxEdition(): void
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:95
drawBbox
▸ drawBbox(fCorner
, sCorner
): void
Parameters
Name | Type |
---|---|
fCorner |
Corner |
sCorner |
Corner |
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:61
emitDimensions
▸ emitDimensions(feature
): void
Emits dimension info of the given feature.
Parameters
Name | Type |
---|---|
feature |
Feature <Geometry | GeometryCollection , { [name: string] : any ; }> |
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:226
emitStartBBox
▸ emitStartBBox(): void
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:213
enableBboxEdition
▸ enableBboxEdition(): void
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:74
endDimensionsEmission
▸ endDimensionsEmission(): void
Stops emitting Aoi dimension info
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:241
isCircle
▸ isCircle(feature
): boolean
Parameters
Name | Type |
---|---|
feature |
any |
Returns
boolean
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:328
isPolygon
▸ isPolygon(feature
): boolean
Parameters
Name | Type |
---|---|
feature |
any |
Returns
boolean
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:324
isValidCircle
▸ isValidCircle(feature
): boolean
Chck if its a valid circle
Parameters
Name | Type |
---|---|
feature |
any |
Returns
boolean
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:314
isValidPolygon
▸ isValidPolygon(feature
): boolean
Parameters
Name | Type |
---|---|
feature |
any |
Returns
boolean
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:319
setMap
▸ setMap(map
): void
Parameters
Name | Type |
---|---|
map |
Map |
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:101
setMapboxDraw
▸ setMapboxDraw(mapboxDraw
): void
Parameters
Name | Type |
---|---|
mapboxDraw |
Map |
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:109
startBboxDrawing
▸ startBboxDrawing(): void
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:81
stopBboxDrawing
▸ stopBboxDrawing(): void
Returns
void
Defined in
projects/arlas-components/src/lib/components/mapgl/draw/draw.service.ts:88