Select to view content in your preferred language

eDraw widget

81166
250
Jump to solution
02-24-2015 01:17 AM
JeremieCornet1
Frequent Contributor

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
DanNorman
Deactivated User

Hi Jeremie, I kind of jumped in and tested this release as i noticed some measurement discrepancies with a utm zone 10 basemap in the previous release. Just so you know, the measurements are now accurate. Looking forward to the official release!

Great widget by the way!

by Anonymous User
Not applicable

Jeremie Cornet​ ... awesome!  I can confirm, measurement with all methods now works, Geometry Engine is now accurate for me as well for length and area.

So awesome that measurements now update!

by the way, what does "NB" mean, or stand for? In the dialogue when modifying a measurement label.  Also, move has a typo an extra 'o'. Unless we are talking about cow geometry here.

NB : you can modify/moove geometry on map.

NB : snapping is allowed (use CTRL).

Thanks!  This is an incredible widget. Really looking forward to adding Point measurement in the future as well as segments. Point is probably a little more important to us at the moment since Tom Sellsted​ 's Measure does Segments perfectly. (Longterm, it would seem logical to merge these two perhaps)

0 Kudos
JeremieCornet1
Frequent Contributor

NB is nota bene

Nota bene - Wikipedia, the free encyclopedia

For "moove", i thought i have remoooved it

RebeccaStrauch__GISP
MVP Emeritus

Hi Jeremie, testing the latest version you are testing (with Alaska Albers, WKID 3338, WAB 1.2, Firefox)

1) I thought the previous version was showing measurements as we clicked, but might be getting that mixed up with the measure widget.  I'm not sure what it would take to add that to this, but that is a nice feature in the measure.  Both widgets have very nice features, but for now it looks like I will need both in my apps.

2) The drawing list seems to duplicate the entry after I "do something else". That is, if I draw a 1 square mile box and name it, then close the widget and open i (maybe just move to a differe draw tab)t, there are now two entries.  Is this as-designed? And if so, what is the purpose of the second one?  I named mine "oneSqMi" and the other just showed up.

Personal comment on the import/export icons (just my opinion....take it or leave it).  Seems to me the up-arrow should be import, down-arrow should be download/save.  This would make more sense to me on the graphic above.  Also, maybe since you have the download here, you could also have the import and remove a tab? Just a thought (and 1) have no idea how much work it would be, and 2) that seems to work so....)

Thanks for you work on this widget!

0 Kudos
MihkelMänna
Frequent Contributor

Great widget, Jeremie!

Everything is working fine, but I am having issues with exporting my drawing in JSON. The spaces in all of the strings in JSON (names, descriptions, texts) are removed for some reason. Everything seems to be working well up to the bit where the JSON string is written to the file. Do you have any ideas what could cause this?

Mihkel

0 Kudos
JeremieCornet1
Frequent Contributor

Mihkel Männa

Thanks for your bug's detection !

It was the export part in HTML5 browsers (non IE) which make this bug.

The correction will be included in the next release.

0 Kudos
FinbarGillen
Frequent Contributor

Hi Jeremie Cornet​,

Would it be possible to have an option to save the graphic as a shapefile so it could then be added to ArcMap?

Finbar

RebeccaStrauch__GISP
MVP Emeritus

Jeremie Cornet  On this same line of thinking as Finbar, I'm thinking about using this widget as a way for staff to create basically as red-line document that they could then send us for updating our SDE master files. They don't usually have the time to make sure all the detail is to the standards we have to maintain.

I was looking at the json output and wondering what is the best way to use this type of operation (i.e. python snippet anyone?).  I was going to post this to a new thread, and will if needed, but since Finbar mentioned a shapefile output, I decided to do a +1 for that.  Let me know if I should go ahead and fork my question.

-------

EDIT: I did find a Tool and/or python solution for converting the json to a FC or shapefile.  For our internal use, that would probably work.  The help doc for 10.2  ArcGIS Help (10.2, 10.2.1, and 10.2.2) 

python snippets for FC and shapefile

arcpy.JSONToFeatures_conversion(in_json_file="C:/myDrawing.json", out_features="C:/data/jsonTest.gdb/jsonfc")

arcpy.JSONToFeatures_conversion(in_json_file="C:/myDrawing.json", out_features="C:/data/jsonShape.shp")

by default eDraw save the json to folder/file:  C:\Users\<username>\AppData\Local\Temp\<filename>.json

Although a direct save would be nice, this is a pretty easy fix (and much easier than my knowledge of widget development)   

JeremieCornet1
Frequent Contributor

Hi Rebecca Strauch, GISP,

JSON to features is the good tool but it doesn't work if there are multiples geometry types in the same json.

You may have to parse the json and separate it by geometry type before to pass it in JSON to Features.

RebeccaStrauch__GISP
MVP Emeritus

Thanks Jeremie, that's good to know about the multiple geometry type issue.  I'll have to play around with it more, and/or have strict instructions for my users.

0 Kudos