Select to view content in your preferred language

Retrieve graphics from third party vendor ESRI JS API app

729
6
10-26-2017 10:30 AM
by Anonymous User
Not applicable

Hi all,

Is there a way for me to retrieve all the graphics (polygons) that my client drew and stored in his app (codered) to a local database or shapefile? Using the debugging tool in chrome I can get the path in the CSS but I cannot get the graphics layer itself. Any tips?

path: path('M 1004 156 L 100...‍d="M 323 194 323...)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Alex,

  I am not sure why you can not get the graphics from the clients map. If they drew the paths on the map then normally this would be done using the Draw and it creates graphics that you can convert into json and then use a web service or something to send to the database.

0 Kudos
by Anonymous User
Not applicable

Ok, How would I access the JSON of the graphics layers?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

   You loop through the graphics in the GL and use the Graphics.toJson method:

https://developers.arcgis.com/javascript/3/jsapi/graphic-amd.html#tojson 

0 Kudos
by Anonymous User
Not applicable

Sorry Robert, that does make sense if I had the app code source and could modify the script to convert objects to JSON but here the web map is hosted on a platform somewhere else. How should loop through the GL on a client web site? Using Google Chrome? 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

I am not aware of anyway to do that.

0 Kudos
by Anonymous User
Not applicable

OK. Thank you anyway. I would like those graphics to become a feature service eventually. But I dont think that can happen unfortunately. Or, I may have to work with the vendor for that.