eDraw widget

70292
250
Jump to solution
02-24-2015 01:17 AM
JeremieCornet1
Occasional Contributor II

Ehanced draw widget for WebApp Builder for Arcgis

UPDATE 2018/05/09 (new Release v2.8.1) :

  • refactoring
  • use esri/geometry/projection (available since esri js api 3.24) instead of proj4js (external libs)
  • systematic use of geometry engine (no more mercator utils, geometry server...)
  • for polyline, the user can now add an arrow (available since esri js api 3.23)
  • live measure while drawing
  • WARNING : this release needs Esri API >= 3.24

Release 2.8.1 on Github 

(Direct zip link : https://github.com/magis-nc/esri-webappbuilder-widget-eDraw/releases/download/v2.8.1/eDraw.zip )

Demo : https://apps.magis.nc/demo/eDraw/ 

Github  :

https://github.com/magis-nc/esri-webappbuilder-widget-eDraw

Wigdet's Features (improvments of standard Draw widget) :

  • add name and description fields on drawings
  • enable infowindow on drawings (selection)
  • on text drawing, no insert if no name.
  • on modification : enable geometry update (with snapping if wanted : CTRL) and preview symbology changes on the fly
  • list
    • add list of all drawings
    • actions on each drawing : modify / delete / [up / down] / zoom
    • all drawings : zoom, copy, delete, export
    • on drawing infowindow -> select drawing in list
    • on zoom on a drawing -> select drawing on map (and show infoWindow)
    • re-order graphics with drag&drop
  • import/export : allow users to export or import drawings (json format)
    • import can be done with file drag&drop in import popup
  • localStorage
    • dynamic saving on each drawing add/delete/update
    • on widget load : load drawings saved in local Storage
  • draws plus (initially from Larry Stout https://geonet.esri.com/people/Larry_Stout)
    • preview under mouse when adding text or point
    • for text, add font choice, font angle, bold, italic, placement and underline options.
    • add arrow menu for polyline
  • checkbox to hide drawing's layer (and therefore widget UI)
  • add of Nautical unit
  • measure's for points/polylines/polygons with automatic update on element's update (or delete). Measure's can be indidualy disabled/enabled on any graphic.
  • "On the fly" measure when drawing
  • defaults symbols can be specified in config's file
  • use of builtin projection engine (available since esri js api 3.24) instead of proj4js library

This message was updated by Jeremie Cornet (New Release)

250 Replies
FinbarGillen
Occasional Contributor

Hi Jeremie Cornet‌!

Thanks for the quick response!

That worked code piece of code seemed to work as it expanded the box, but when i go to edit the polygon the polygon outline and text disappear. Even when I go to create a new polygon the outline does not appear.

I added the code to the eDraw CSS in the following place

0 Kudos
haThach
New Contributor III

How can I  config the text placement to offset from a line by default?

0 Kudos
JohnWolynec
New Contributor

Jeremie, this is a wonderful widget. One thing that I know would be very useful, and I have been trying to figure out how to add it, is user defined parameters for the shapes. For example if a user wants to use the 'CIRCLE' measureType, but would like to specify that the radius of the circle is 30 feet, how could this be accomplished? I started setting it up with an input that only accepts numbers, then added an enter button that could be used to change the event from the _measureDrag function to a new function that would use an onClick event if the input is not empty. I also thought the best way to add an attach point would be to use the centre of the shape being drawn. Any ideas on this?

Thanks 

0 Kudos
EricMcPhee
New Contributor III

Would there be a way to add the measurement results to the widget panel? Similar to the out of the box Measurement Widget? For instance if I am drawing a polyline, I would like to see the cumulative length of the segments that have been draw plus the last segment before I double click to end the drawing. Same thing with polygons. In the Measurement widget, I am able to see the area of the polygon that I am drawing before I finish the sketch.

BabatopeAdebajo
New Contributor III

Eric,

Have you seen the Measure Widget?

https://community.esri.com/docs/DOC-3209-measure-widget-21-for-web-app-builder

Does what you need.

Baba

0 Kudos
EricMcPhee
New Contributor III

I have seen that widget and it does some of what I like...but it is missing the Import/Export drawings and the saved drawing list that I like from the eDraw widget.

0 Kudos
deleted-user-Sh7q9fbKLpEv
New Contributor III

cornet.magis‌, I was wondering this exact same thing as Eric McPhee. This widget is perfect, but the only request we've had from our users is to be able to view measurements dynamically as their drawing (similar to the out of the box draw tool and the eMeasure tool)... 

EricMcAvoy
New Contributor III

Is there a way to keep text from scaling when zooming in/out?

0 Kudos
JeremieCornet1
Occasional Contributor II

Hi Eric McAvoy‌,

It is'nt supported in TextSymbol (TextSymbol | API Reference | ArcGIS API for JavaScript 3.21 ) so it's not possible.

0 Kudos
by Anonymous User
Not applicable

hi Jeremie Cornet & all eDraw fans -  did Download stop working for anyone? Chrome's evergreen updating appears to have killed it for me. Same for Firefox. It does continue to work for me fine in old IE 11. Both old eDraw and the newest (2.1.2) work in IE 11.  But not Chrome, either eDraw vers.  (Chrome killed it for both WAB 2.4 new eDraw and old eDraw/WAB 1.2). I guess because....security?  Anyone else seeing it?    Perhaps you could make it download a file from a file:// link to trigger download prompt or file download lib from my Screenshot widget, and not a data stream?  

0 Kudos