Select to view content in your preferred language

eDraw widget

81203
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
JeremieCornet1
Frequent Contributor

Mihkel Männa

Could you describe me the errors ?

Indeed, I should (and would !) remove the last uses of this syntax !

EDIT : i have updated the release

0 Kudos
MihkelMänna
Frequent Contributor

Jeremie Cornet

I see you have already updated the release but here's my answer anyway.

I' not sure why these errors occured. I was testing the widget on the latest release of WAB on Firefox with latest updates. Importantly, the errors occured only after using other widgets in my app, so maybe the problem lies in my other widgets. Before the for-loop, the array is defined, but in the loop it gives the undefined error for the array element.

0 Kudos
JeremieCornet1
Frequent Contributor

Mihkel Männa

The for(var i in my_array) syntax is convenient but very "dangerous" in JavaScript, especially if the array has been "manipulated" (removes, slice...). I don't know why but sometimes this syntax does an extra loop (so the array bugs in this loop).

I try to avoid it but sometimes my php's and python's habits are too strong .

The bug may start with your others widgets but if the eDraw widget can avoid it, it's a eDraw's bug !

AdamGebhart
Frequent Contributor

Jeremie Cornet

What version number is the release from 10/21 or 10/22?  Manifest.json says 1.3.3, as does manifest.json from a couple releases in the last two weeks of September.  I've been keeping copies of the older widgets, in the event something new has problems, with titles that reflect the release number.  Thanks.

Adam

0 Kudos
JeremieCornet1
Frequent Contributor

Adam Gebhart,

The version is 1.3.3 :

- WAB 1.2 (1.3 on internal WAB numerotation)

- my third version under WAB 1.3 (internal numerotation)

It's a release from 10/22 because i live in your future (in New Caledonia).

by Anonymous User
Not applicable

I looked up New Caledonia. All I can say is, cool. Très bien!  Another place on ny bucket list...

0 Kudos
AdamGebhart
Frequent Contributor

Jeremie Cornet

Regarding snapping, is that limited to snapping to features drawn with the eDraw widget?  Or should one be able to snap to a line or polygon feature in one or more of our services?

Thanks again for doing all of this.  Your widget has received a lot of praise from our staff.

0 Kudos
JeremieCornet1
Frequent Contributor

Adam Gebhart​ Yes, Snapping is limited to eDraw's layer.

Although it's simple to configure snapping in code, the configuration's UI may be very complicated.

You can easily modify the snapping options in the code (and, why not, use a parameter in the config to do this) :

esri-webappbuilder-widget-eDraw/Widget.js at master · magis-nc/esri-webappbuilder-widget-eDraw · Git...

Esri js documentation :

Map | API Reference | ArcGIS API for JavaScript

0 Kudos
AdamGebhart
Frequent Contributor

Jeremie Cornet

Thanks for the tip on snapping.  I haven't had time to look into it yet but hopefully will soon.

0 Kudos
by Anonymous User
Not applicable

Hi Jeremie,  the bug where Point stops working after using Text is there still. I know you are probably aware but I just wanted to report I see it.

Regarding the interface refinement, I like it. I love the Copy!  I like the integrated import/export, too. Great work.  For our site I'm actually going to switch the up/down arrow icons. (to me it made more sense with them reversed but I know that's more of just a personal thing)

0 Kudos