eDraw widget

73572
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
by Anonymous User
Not applicable

hm, the plot thickens.

0 Kudos
JeremieCornet1
Occasional Contributor II

Do you have a public agol or portal map with this error so i can reproduce it ?

NB : if geometryEngine is checked, the widget use it instead of geometry service so you can just test once with geometryEngine checked and once by geometryService you want to test (with geometryEngine unchecked).

NB 2 : if geometryEngine not checked and no geometry Service specified the widget use the esriConfig.defaults.geometryService which is your portal or AGOL one.

by Anonymous User
Not applicable

Hi Jeremie... I put your tool here - ArcGIS Web Application

I set it up with Geometry Engine checked. Using the default (ESRI) geometryservice.  It is giving the error of overmeasuring. Compare it with the standard ESRI Measure tool which I also included. I also checked against known measurements of parcel boundaries. I used Chrome. I threw a random layer in the map.

The tool works fine without GeometryEngine checked though, so I'll just use it that way for now. I hope this helps. I will be happy to work more with you on this project and test anything you need, this is a very important widget for us.

0 Kudos
JeremieCornet1
Occasional Contributor II

Kevin MacLeod With the use of the same AGOL map as you, thes measures seems correct.

Could you send me an export with incorrect measures ?

0 Kudos
by Anonymous User
Not applicable

We have one mission-critical request for this widget. It could be a replacement in fact for all measuring widgets, if only we could display measurements for a Point. Can you add ability to display lat/long coordinates for Points? It would be nice to choose decimal degrees or DMS too. And one final request, if we your widget could also display segment lengths, it could replace Tom's 'Measurement' which does this. Then your widget would be a one-stop shop for all measuring and drawing. Because of its powerful layer ordering and saving I think it makes sense actually to combine measurement into Drawing.

I also concur with Adam's request #2 for adding the labels "area" and "perimeter" before the measurement label text. Multi line would be neat but not too essential. Adam-- our sites are in state Plane too so I'll check up on its measurements down here as well.

This is a high-quality piece of work Jeremie Cornet thank you.  It will empower many of our departments.

FinbarGillen
Occasional Contributor

One thing that I think would be beneficial for this widget would be the ability to allow the user to save a graphic to a local file of their choice.

Currently the widget automatically saves graphics layers to the downloads folder instead of giving them an option.

0 Kudos
JeremieCornet1
Occasional Contributor II

Hi Finbar Gillen​,

This is not possible. This comportement comes from your browser's settings and not from the widget.

For example on chrome :

Change download locations - Chrome Help

JeremieCornet1
Occasional Contributor II

Robert Scheitlin, GISPKevin MacLeodAdam Gebhart​ and others.

You will find attached a widget version with some measure's improvments:

- a measure's label is now linked to its polygon or polyline :

     - delete the polygon or the polyline will delete the measure's label

     - you can't modify name and description of measure's label but

            - if you modifiy symbology, it will be kepted

            - if you move the label, it will be kepted until you change it's polygon or polyline

     - update the polygon or polyline will update (recalculate) its mesaure's label

     - on polygon or polyline update, you can activate or deactivate measure

     - the link is kepted in local storage and in exported/imported file

- on config:

     - you can specify if on polygon or polyline add, the measure checkbox is checked or not by default

     - you can enable geometryEngine (client side) or specify a custom geometry service (server side). Please not that if the map is in webmercator or WGS84, the "old" methods will be used (esri.geometry.webMercatorUtils and esri.geometry.geodesicUtils).

     - you can specify patterns for measure's label  (one for polyline and one for polygon).

For now, i don't add capabilities for segment's measure or point coordinates.

Could you test this version before i release it ?

PS : if the map is in webmercator or WGS84, the measures are geodetic else planar.

AdamGebhart
Occasional Contributor III

Jeremie Cornet

This is looking great!  I've tested this weekend's release with //tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer and my geometry service, as well as with or without "Use Geometry Engine" checked and the measurements are accurate. 

The only issue I see at the moment is the labels don't delete upon deletion of the polyline or polygon object.  Did I read correctly that a label should automatically delete in that instance?  Either way, it's easy to manually delete a label that doesn't correspond to another object.

I like that you can create a polyline or polygon without the label, then edit the feature and check on "show measurements", save the changes and the label appears.  And, it's great to have the label update as you edit the size/shape of the feature.  Our users will really like that.

Thank you very much.

0 Kudos
JeremieCornet1
Occasional Contributor II

The only issue I see at the moment is the labels don't delete upon deletion of the polyline or polygon object.  Did I read correctly that a label should automatically delete in that instance?  Either way, it's easy to manually delete a label that doesn't correspond to another object.

You read correctly !

But i hadn't code it... until now.

0 Kudos