Select to view content in your preferred language

How to save the drawing done on the map by user ?

6094
14
Jump to solution
01-10-2012 12:04 AM
nitinsatapara
Emerging Contributor
I am aiming to make an application in which user can do drawing...Its obvious that I will be providing some basic drawing tools like point, line, etc. For this I have used "drawing toolbar" sample code given under ArcGIS API for JavaScript. With this code there is essential functionality of drawing...

Now my question is how can I reflect this drawing made by the particular user when the same user is signing in for next time. In short, there is no code for saving this drawing. Here is what I think:

when a user project any point on the map, I ll store the latitude longitude or geographic info of that point and save it in my database. When that user signs in again, I ll draw that point with the coordinates stored in my database. So apparently user will feel that this is the drawing he/she had done previously.

I don't know I am right or wrong and If I am right then also I don't know how to implement it. So please guide me on this. If possible please provide a brief code. Let it be for implementation of a very brief feature that I am looking for, for ex. Just provide a code for storing the coordinates of a point and then redrawing it at the same location. Please do needful.

Anticipating an early favorable reply,
0 Kudos
14 Replies
MattMoyles
Occasional Contributor
Sorry I should have clarified more. That widget is a slightly updated clone of the esri time slider. Put that code into it's own file in /js/app/widgets/TemplatedTimeSlider.js and then add it to your main html page with a <script src="/js/app/widgets/TemplatedTimeSlider.js"></script>

This is the actual time slider widget itself. So you can use it as a base to start your modifications. Instead of <div data-dojo-type="esri.dijit.TimeSlider"></div> you would do <div data-dojo-type="app.widgets.TemplatedTimeSlider"></div>
0 Kudos
nitinsatapara
Emerging Contributor
Sorry I should have clarified more. That widget is a slightly updated clone of the esri time slider. Put that code into it's own file in /js/app/widgets/TemplatedTimeSlider.js and then add it to your main html page with a <script src="/js/app/widgets/TemplatedTimeSlider.js"></script>

This is the actual time slider widget itself. So you can use it as a base to start your modifications. Instead of <div data-dojo-type="esri.dijit.TimeSlider"></div> you would do <div data-dojo-type="app.widgets.TemplatedTimeSlider"></div>


I am still not able to put it live in my program...I take the basic example of esri.digit.timeslider and then replace it with app.widgets.TemplatedTimeSlider but its not working...the map is not loading..something's wrong...please guide me...
0 Kudos
nitinsatapara
Emerging Contributor
Hello all,

I want to provide editing, drawing functionalities on the webmaps to client and I briefly know how to do it. The point where I am stuck is how to save the user's work...I have got 3-4
solutions cum hints to achieve this. but I am not able to do so as there are certain negatives of each proposed hint.

GIVE ATTENTION to that I am in no position to use ArcGIS web service...I am using JSAPI by ESRI and till that it's fine...I am able to implement various functionality available in samples in ArcGIS API...when it comes to save all the work, I am finding it bit difficult...

Please guide me...
0 Kudos
AdrianMarsden
Honored Contributor
Ah found it - I knew I'd seen this thread - however I found it too late - I posted a new one

http://forums.arcgis.com/threads/79938-Save-load-graphics-to-loacl-storage

In it I show how I am writing and reading from local storage, but need some pointers on editing/deleting

Cheers

ACM
0 Kudos
saurabhgupta2
Emerging Contributor

Hi

I need the same kinda solution but in my case i want to store all the drawing into feature layers which can be rendered when the same user log in . He can make changes to the same and can save it again.

Thanks

0 Kudos