dimanche 1 mars 2015

How to run a python script on the server, returning the results to the client


Here's the end result I'm trying for:



  • the user clicks on a feature on an ArcGIS Server JS map

  • a Python script is triggered on the server

  • the Python script uses an attribute from the feature (eg its OID) to perform some calculations (using arcpy modules)

  • the results are returned to the infoWindow as HTML, for display


I guess I'd need to be able to trigger a Python script (containing arcpy commands) on the server, passing parameters between the client and server.


Assuming this is possible, what is the best approach:



  • via the ArcGIS Server geoprocessing framework

  • directly via an AJAX call to the Python script (and is that even possible)?

  • something else?





Aucun commentaire:

Enregistrer un commentaire