I am trying to access the fields which I can see in this particular layer. I am able to see that it has fields but fetching the values in those fields is something that I am unable to do. Is there someway to do that?
|
Just use the REST interface 'Query', scroll to bottom of page that you gave, here is a query for OBJECTID > 0, shows 98 records. Where field: OBJECTID > 0 http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/MapServer/jobs/jef3fd04155ce410386cc7f64ebad694d/0/query?where=OBJECTID+%3E+0&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=html In javascript, do something like this...
|
|||||||||||||
|
|
Scoll to the bottom of the page you gave and click "Query". To return all features in the layer, enter "0=0" in the top text box (labeled "Where:"). "0=0" is a true condition for all features. Leave all the other text boxes blank and press the "Query (GET)" button at the bottom of the form. I recommend the JavaScript answer from awesomo, but if you want to only get certain fields, replace the "*" in
with the field headings you want to work with. If you only want to return CALL_TYPE, CITY, and Date, the JavaScript would be
|
|||
|
|
|
Did you try to get objects from this particular layer? Your layer has /query endpoint, where you can query for objects on your layer Layer 0: Query On this layer there is 98 objects. One sample object is OBJECTID:6 |
|||
|
|
