npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

drone_view

v3.1.0

Published

**Installation** Clone the project from github and use following command ```sh npm install ``` after all dependencies installation user needs to build the project using following command ```sh npm run build-bundle // Development Mode npm run build

Downloads

96

Readme

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 Parameter | Type | Description | | :-------- | :--------- | :------------------------- | | type | "LineString" | "Polygon" | "Point" | Required | | fillColor | string | Optional. Css hex color code example "#ff0000" Default : White | | lineColor | string | Optional. Css hex color code example "#ff0000" Default: white | | strokeColor | string | Optional. Css hex color code example "#ff0000" Default : Black | | opacity | number | Optional. 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 Parameter | Type | Description | | :-------- | :--------- | :------------------------- | | id | string | Optional Only ise when user specially want to assign ID or when user want to update previously added annotation | | fillColor | string | Optional. font color example "#ff0000" Default : White | | text | string | Required Text | | position | GlobalPosition {latitude: number,longitude: number, altitude: number} | Required | | fillColor | string | Optional. font color example "#ff0000" Default : White | | size | number | Optional. Default : 20 | | isBackground | Boolean | Optional. if user wants background color Default : true | | backgroundColor | string | Optional. Css hex color code example "#ff0000" Default : Black | | opacity | number | Optional. 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;
}