eDraw widget

72656
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
Nadia
by
New Contributor

Hi Jeremie,

 The Enhanced Draw widget is incorrect in measuring both distance an area. For example: below the upper line is showing 1.3 km, the lower line, created by using the inbuilt ESRI draw widget shows 1 km. Not sure where to correct the code to fix it.  The enhanced widget is so much better that Esri's in-built one, so I would love to continue to use it! Please update this thread if you found a solution. Thank you!

Nadia_0-1643142630736.png

 

Tags (1)
0 Kudos
Barned01
New Contributor

Hi Nadia, Did you find a solution for this, i have the same issue, the same issue occuers in the demo app as well as the app we implemented and when compared to the esri (and real life) measurements, it is definitely out but i wouldn't have the foggiest to know how to look at the code to rectify it.

0 Kudos
ByronGessel
New Contributor II

This widget is a great tool!  I was wondering if a point could be drawn by entering coordinates in lat/long or map units?

0 Kudos
Mina
by
New Contributor II

Great widget! Any ideas on how to add the drawing graphic as an operational layer to the Layer List?  Thank you!

0 Kudos
MattiasEkström
Occasional Contributor III

Hi!
I've been using a slightly modified version of this widget for along time, one modification I've made is to add the possibility to draw arrows, it has been workig great but since a week ago or something like that, drawing arrows doesn't work anymore.
Drawing arrows in the standrad draw widget works, and I tried to download the latest version of this widget and only changed the html-file by adding "arrow" to the data-dojo-props types for the drawBox. The arrow symbol appears and can be selected but nothing happens when trying to draw... or nothing shows at least, draw end event is triggered and stuff like that but no graphic apperas.

Any ideas whats wrong??

0 Kudos
Gedeon_muhawenayo
New Contributor II

Hi,
Is it possible to visualize drawings drawn with eDraw into 3D?

0 Kudos
JohnMcCain
New Contributor

Hi Jeremie!

We just added the eDraw widget to our WAB site (https://gis.dhec.sc.gov/scdams) and so far, so good!  I'm not very well versed in WAB and JSON/GeoJSON formatting.  I'm wondering why the JSON I export from eDraw is not recognized by QGIS (GDAL Vector Conversion tool) or the various web-based JSON converters.  The JSON is, however, recognized and converted by ArcMap's JSON to SHP conversion tool.  Can you help me understand why ArcMap recognizes the JSON (or GeoJSON I guess) but no other converters will?  And if there's a way to export directly to SHP instead of JSON, that would be awesome!

Thank you!

0 Kudos
AdamGebhart
Occasional Contributor III

@JeremieCornet1 

 

Hi Jeremie.  Can I modify the config or code to show two decimal places for the area measurement?  The regular Draw widget also goes to one decimal place. 

0 Kudos
JenaF
by
New Contributor II

I was still experiencing the inaccurate measurement results using release 2.8.1. I am on Enterprise 10.8.1, was using this through WAB as an added custom widget (not dev edition), and in use in a Launchpad theme app in the anchor bar controller. I am in Alaska where every measurement oddity gets exaggerated; linear measurements in farther north places would be 3x too large, less far north measurement would only be 2x.

The FIX for me (inspired by other comments in the previous 25 pages) was to edit the Widget.js file and on lines 1496, 1498, and 1500 of the Widget.js file, change "3857" to "102100". The "4326" values could stay as they are. Linear and areal measurement are now both correct.

edraw_wkid_fix.PNG

@Nadia @Barned01 

DavidDas__GISP
Occasional Contributor II

Hi Jeremie,

 We love your Enhanced Draw Widget for the Web AppBuilder Developer Edition. You did an amazing job coding this!

It works flawlessly in WAB 2.27.

Your eDraw widget gets used a lot by our customers.

Do you have any plans to port this widget to the Experience Builder Developer Edition?

The Draw widget that comes with the EXB Dev Edition is very basic. It does not even allow you to add Text.

We would like to have the functionality of your eDraw widget in the EXB platform before we complete the migration.

Best regards,

David Das