Giter VIP home page Giter VIP logo

arcgis-javascript-api-4.2-3d-draw-extension's Introduction

ArcGIS JavaScript API 4.2 Draw extension

Demo

中文说明 ##Introduction Customized a drawing utility class which supports graphic drawing in the sceneview. Supported geometry types includes: point, line, polygon, circle, circle segments, bezier polygon, bezier line, arrow and multi-head arrow. It also supports turn a polygon geometry type into a cubic. The support for drawing dashed line is experimental (it is implemented using three.js) it does not support customize of the line width.

##Introduction You can reference the Draw class using relative path(the other scripts all needed to be included in the script/ folder, which draw class referenced using relative path in ths internal implementation)

require(["./script/Draw"], function(Draw) { /* code goes here */ });	

###Constructor:

new Draw({view: viewInstance, gl: graphicsLayerInstance})

The Draw class's constructor accept a object which contains a view property and gl property. The view property needs to point to the SceneView instance, the gl property need to point to a GraphicsLayer instance.

###Static Properties

Static Properties Meaning
Draw.POINT point
Draw.LINE line
Draw.POLYGON polygon
Draw.CIRCLE circle
Draw.CURVE circle segment
Draw.FREELINE freehand line
Draw.BEZIER_CURVE bezier line
Draw.BEZIER_POLYGON bezier polygon
Draw.FREEHAND_ARROW arrow
Draw.MULTIHEAD multi-head arrow
Draw.DASHLINE dash line
Draw.CUBE turn a polygon to a cubic
###Instance properties and methods
Properties Meaning
------------- :-------------:
view SceneView instance
gl GraphicsLayer instance
map Map instance
pointSymbol the point symbol for point geometry
lineSymbol the line symbol for line geometry
fillSymbol the fill symbol for polygon geometry and cubic

###Drawing method draw.activate(Draw.CURVE) calling the corresponding method can active the drawing of the specified geometry.

draw.activate(Draw.CUBE) after calling this method, the next click on the polygon will turn the polygon into a cubic (move the mouse up and down to adjust the height of the cubic).

draw.deactivate() End drawing.

##System Requirements:

Browser:Latest version of Chrome,FireFox,IE and Edge

arcgis-javascript-api-4.2-3d-draw-extension's People

Contributors

crazyxhz avatar serverteamcn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.