eDraw widget

71888
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
JeremieCornet1
Occasional Contributor II

Hi Bob Wheeler‌, could you add an example (json exported by the widget) ?

My first tests seems correct but i'm not familiar with the non-metric system

0 Kudos
BobWheeler
Occasional Contributor

Hello Jeremie - I never saw your reply until today - attached is a json file of my drawing.  

Update: downloaded the latest proj4.js librabry and pushed into \\stemaps\libs and was testing - appeared to be working great.  Cleared cache (Chrome) to test again and back to acres being calculated incorrectly.  The only thing I've been able to note is that when the tool does NOT autocalc as I am drawing then it produces the correct area.  I know the new widget is supposed to autocalc, but I've experienced this several times in troubleshooting.  If the tool doesn't autocalc the measurements, but only renders at the end of drawing - then the acres populate correctly.

When I use your demo site ArcGIS Web Application  - the acres are reported incorrectly for me as well.  

0 Kudos
BobWheeler
Occasional Contributor

Hello Jeremie,

Wondering if I'm the only one still having issues with the measurements being off similar to issues back in 2015 based on the threads.  All of our stuff is using the Web Mercator projection.  Any suggestions greatly appreciated.

Bob

0 Kudos
MarkCooper5
Occasional Contributor II

Hi

Firstly, thanks for the fab widget!

Is there a way to get the widget to show the measurements of each segment rather like the enhance measure widget (https://community.esri.com/docs/DOC-3209-measure-widget-21-for-web-app-builder )? That way we wouldn't need to have separate measure and draw widgets in our apps.

Many thnaks

LindaM
by
New Contributor II

Thank you for the great work! 

My question is about how to send the drawings to another widget: e.g., I would like to send the drawings from this eDraw widget to the layer list widget as operational layer(s). I use the following post information, but can not figure out. 

Adding Custom Graphic As Operational Layer 

Is there any suggestion to do this? Thanks a lot!

L.M

0 Kudos
sitsit
by
New Contributor III

Hi,

thank you for this wonderful widget!

I have noticed that, when I try to export a map using the Print Widget, in the resulting PDF the lines are missing the arrow marker. Is it a bug of the Print Widget?

Thanks,

Marco

0 Kudos
RyanCoodey
Occasional Contributor III

Have been running version 2.1.2 on Portal for ArcGIS 10.6. Several users have asked about the live measuring so was excited to see it support that now, thank you! Problem is Portal 10.6 runs on WAB 2.6 with JSAPI 3.22. Went ahead and tried it anyway but see it is missing projection.js. Can I just copy that file over to the Portal server? Or will it need much more than that?

Thanks!

0 Kudos
RyanCoodey
Occasional Contributor III

Anyone have any luck running the latest 2.8.1 on Portal 10.6?

I first tried copying "projection.js" and its dependencies "pe.js",  "GeographicTransformation.js" and "GeographicTransformationStep.js" to the local widget folder. Changed all the define references to that local folder. But that errored in widget.js at the line "projection.load()" saying load was not a function and the debugger just said the projection object was a value of "3", odd. So then reset the references and copied the files to the Portal server. This got a step farther as the projection object seemed meaningful, but somewhat similar it gave an error that "g.load" is not a function. That was in "projection.js" this time.

Any thoughts? Is trying to mash up JSAPI 3.22 with a few 3.24 bits a bad idea?

JamesKo
New Contributor III

Hi Jeremie,

Thanks for the fantastic widget! One thing I noticed from your demo site was that the 'live measuring' isn't working for the extent and polygon tools. 

Also, I have an enhancement request. I think it would be useful to add the 'live measuring' during edit mode.

Brian_Beyeler
New Contributor III

I downloaded the latest version I am having trouble with this tool overestimating measurements. Is there a fix? I saw a discussion about it in the past but it wasn't clear to me how to fix it. Changing the geometry engine?

0 Kudos