Select to view content in your preferred language

Scratch ArcServer data on web app?

488
3
11-10-2018 08:35 AM
GrantHaynes
Occasional Contributor

Hi everyone,

I've got a project where I am working on creating a web app using Leaflet to extract and view raster data. The first part is to generate a point layer based on where the user clicks on the map. The coordinates of those mouse clicks get sent back to a short python toolbox to be converted into a feature layer that will then need to be sent back to the web app so the user knows where they have clicked. Once that is done that input point layer is used to extract values from the rasters containing the data and the resulting data displayed on a graph. I have the first part mostly done, my question is can I dump the resulting point layer onto Arc servers "scratch work space" and then expose it to the web? If so how do I access it? If that won't work I can create a point feature layer and publish it to the web but how do I point my toolbox to write geometries to a feature layer hosted on the server?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Grant,

   My suggestion is that you have the client click on the map to create the points so just create a graphic in the map and that is all that is needed to show the user where the point is located. Then you keep what you already have as far as sending that geometry back to the python to create the Feature Layer. Is there some reason that you have to send the point feature layer back since you already would have the graphics displayed on the map?

0 Kudos
GrantHaynes
Occasional Contributor

Hi Robert,

Thanks for your help, the reason I was going to do it that way is I'm not much of a web developer, but I will give your suggestion a try as then there are fewer moving parts. Would the best way to do this be to hold the coordinates in a list and then submit them to the geoprocessing service and loop through them?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Grant,

  You could do that. But the GraphicsLayer you add the user click graphics to is basically an array (list) that you could loop through already.

0 Kudos