AnsweredAssumed Answered

Querying features around a buffer point with geoprocessing

Question asked by Metalyph on Aug 8, 2016
Latest reply on Aug 19, 2016 by bill@poconogis.com

I'm trying to create a map with ArcGIS layers that can be queried using a buffer point. As an end result, I would like all the points in the queried area to have their properties output into an array. To this end I'm using leafletJS for the map itself, esri-leaflet for the ArcGIS integration, and esri-leaflet-gp for the geoprocessing.  Unfortunately I've not been able to find much in the way of documentation or examples for useage regarding esri-leaflet-gp.

 

So far I've come up with this:

http://codepen.io/Metalyph/pen/rLQGEV?editors=1111

 

I think my first problem is the example data / task that I'm using.  They might not be conducive to the result I'm trying to achieve.  Unfortunately since I'm not sure what to look for it's hard to find example data to show what I'm trying to do.

 

My next problem pertains to the parameters.  One of the buffer parameter requires a GPLinearUnit variable. Using this page I determined that the parameter should look like this:

var gpBuffer = {
  "distance" : 700,
  "units" : "meters"
};

However, when I try to use that in the setParam() function I recieve this warning:

"invalid geometry passed as GP input. Should be an L.LatLng, L.LatLngBounds, L.Marker or GeoJSON Point Line or Polygon object"

Another parameter is a GPFeatureRecordSetLayer data type, which I'm having trouble understanding in and of itself.  The parameter seems to be asking for an address, and has a number of fields, like OBJECTID, CUSTOMER_NAME, CITY, etc.  Do I need to provide a JSON variable with all these fields filled out?  Or is it asking for something else entirely?  The buffer task can be found here.

 

And lastly, how do I associate a map layer to this task? (in this case, layer_03)

 

Also, a little bit off-topic, but is there potentially a better way to go about doing this?

 

I hope my issue comes across clearly, I'm still fairly new to the GIS side of web development.  Please feel free to ask me for clarification on any of these points.

Outcomes