3.0.0 • Published 5 days ago

drone_view v3.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 days ago

API

Installation Clone the project from github and use following command

npm install

after all dependencies installation user needs to build the project using following command

npm run build-bundle        // Development Mode
npm run build-bundle-prod   // Production Mode

this will create a dist folder where user will get the droneView.js file

Documentation Build documentation using following commands

npm run build-doc

Usage Using Script

<script src="dist/droneView.js"></script>
<script>
const viewer = DroneView.default;
</script>

Load Viewer To load viewer you need token, Which you can get from Cesium Ion. You can simply sign in and create new token.

new viewer({mapOptions})

2D Mode Uer can use this API for switch to 2D mode

switch2DMode()

3D Mode User can use this API for switch to 3D Mode

switch3DMode()

Add 2D data Imaginary data

addImaginary(url: string)
  • User can use this API to render 2D imaginary data
  • User should call API with Url ( endpoint of WMS Server that server image data)
  • API will return ImageryLayer

Remove 2D data Imaginary data

removeImaginaryLayer(imageLayer: ImageryLayer)
  • User can use this API to remove Imagery layer by call with ImageryLayer received when added that ImageryLayer

Draw

To enable draw mode

enableDrawing(config: MeasurementConfig)

To disable draw mode

disableDrawing()

To enable edit mode

editDrawing()
  • After enabling edit mode user can click on geometry which user want to edit.
  • Once geometry is selected point on vertices will be added
  • User can select these point to move or to delete using DELETE button
  • When user will move the vertices two point will be added between neighbor points
  • User can use these points to edit the the shape also
  • User can hit ENTER to finish editing

To enable delete mode

deleteDrawing()
  • After enabling delete mode user can click on geometry Once geometry selected points on vertices will be added
  • User can select multiple points and can delete using DELETE button

To get added geometry details

onDraw(callback)
  • User can use this call back function to get data when a drawing of geometry complete User will get the id, positions array & type of drawing
  • If user want to add some data to geometry for future, Use this function
DrawingConfig ParameterTypeDescription
type"LineString" | "Polygon" | "Point"Required
fillColorstringOptional. Css hex color code example "#ff0000" Default : White
lineColorstringOptional. Css hex color code example "#ff0000" Default: white
strokeColorstringOptional. Css hex color code example "#ff0000" Default : Black
opacitynumberOptional. Float Number between 0-1 Deafult : 1

DrawingConfig Example

DrawingConfig = {
       type:"Polygon",
       fillColor:"#ff0000", 
       opacity: 0.5, 
       lineWidth:6,
       strokeColor:"#aaaa00",
       lineColor:"#00ffaa"
}

Annotation/Label

addLabel(config: LabelConfigByLatLng)
  • User can add annotation using this API
  • To automate user can user mouse event API and can use the result like position to add label
  • API will return an ID
LabelConfigByLatLng ParameterTypeDescription
idstringOptional Only ise when user specially want to assign ID or when user want to update previously added annotation
fillColorstringOptional. font color example "#ff0000" Default : White
textstringRequired Text
positionGlobalPosition {latitude: number,longitude: number, altitude: number}Required
fillColorstringOptional. font color example "#ff0000" Default : White
sizenumberOptional. Default : 20
isBackgroundBooleanOptional. if user wants background color Default : true
backgroundColorstringOptional. Css hex color code example "#ff0000" Default : Black
opacitynumberOptional. Float Number between 0-1 Deafult : 1

DrawingConfig Example

LabelConfigByLatLng = {
   id: string // User can pass previous Id if he want to update
   name: string
   fillColor: "#ff0000"
   size?: 40
   isBackground?: true
   backgroundColor?: "#00ff00" // If user set isBackground true
   opacity?: 0.8
   text: "TEXT-OF-ANNOTATION";
   position: GlobalPosition;
}
2.3.8

5 days ago

2.3.9

5 days ago

3.0.0

5 days ago

2.3.7

10 days ago

2.3.6

16 days ago

2.3.5

17 days ago

2.3.4

24 days ago

2.3.3

1 month ago

2.3.2

1 month ago

2.3.1

1 month ago

2.3.0

1 month ago

2.2.7

3 months ago

2.2.9

3 months ago

2.2.8

3 months ago

2.2.6

3 months ago

2.2.5

4 months ago

2.2.4

4 months ago

2.2.3

4 months ago

2.2.2

4 months ago

2.2.1

4 months ago

2.2.0

5 months ago

2.1.9

5 months ago

2.1.8

5 months ago

2.1.6

5 months ago

2.1.7

5 months ago

2.1.5

5 months ago

2.0.9

6 months ago

2.1.2

5 months ago

2.0.15

6 months ago

2.1.1

5 months ago

2.0.16

6 months ago

2.1.4

5 months ago

2.0.13

6 months ago

2.1.3

5 months ago

2.0.14

6 months ago

2.0.11

6 months ago

2.0.12

6 months ago

2.0.10

6 months ago

2.1.0

6 months ago

2.0.19

6 months ago

2.0.17

6 months ago

2.0.18

6 months ago

2.0.8

8 months ago

2.0.3

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

1.2.0

10 months ago

1.1.9

10 months ago

1.9.0

10 months ago

1.8.0

10 months ago

1.7.0

10 months ago

1.6.0

10 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.3.0

10 months ago

2.0.2

9 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.1.8

11 months ago

1.1.7

11 months ago

1.1.6

11 months ago

1.1.1

12 months ago

1.0.2

1 year ago

1.1.0

12 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.1.5

11 months ago

1.0.6

1 year ago

1.1.4

11 months ago

1.0.5

1 year ago

1.1.3

12 months ago

1.0.4

1 year ago

1.1.2

12 months ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago