How to give users capability to add new features as circles,rectangles etc?

545
4
06-14-2011 02:57 AM
SanajyJadhav
Occasional Contributor II
Hi,

We are developing an apps in which we have to give editing functionality to our users. Parcels polygon is the only editable layer in the apps.Now,users should be able to add new features as circles,rectangles,polygons.

I am fairly new to JS API.So, I am not sure if this thing (creating new circles,rectangles) is possible in JS API. I am really confused as where to start from and how should I proceed.

I went through the online API documentation and found that esri.dijit.editing.Editor-all class has a constants for creating arrow,ellipse, triangle etc. However, I donot understand how to use this constants in the code.Our user would click rectangle button and he should be able to draw a new parcel as rectangle.Same is with circle.polygon etc.

So, can anybody help me out here as to what to do and how to do it? Any help is appreciated.

Regards,
Sanjay.
0 Kudos
4 Replies
derekswingley1
Frequent Contributor
The Editor widget with simple toolbar shows how to do this. To use the circle/rectangle create tools, click a polygon template (one of the "Waterbodies" templates) and then select circle or rectangle from the drop-down list in the middle of the toolbar just below the template picker.
0 Kudos
SanajyJadhav
Occasional Contributor II
Thanks Derek for the reply.

The sample you pointed me to, can be a good starting point for me. I appreciate your help.

Regards,
Sanjay.
0 Kudos
derekswingley1
Frequent Contributor
Glad to help!
0 Kudos
nanasyazana
New Contributor
Glad to help!


hi..please help me to code the color picker on client side in javascript for editing purpose..like edit tools in arcgis online..
Currently I only can add point by using feature service that already create in arcmap..but I want to change the colour from the color picker..

Thank you..
0 Kudos