I have an ArcGIS layer published to my local server at:
https://baseURL/myMapServer/0
I want to dynamically construct the query where clause for this layer based on the URL. For example:
https://baseURL/myMapServer/0?category=cat1
would effectively translate into the following where clause:
category='cat1'
How can I accomplish this?
The arcgsis documentation touches on the topic:
https://developers.arcgis.com/labs/arcgisonline/query-a-feature-layer/
And I've tried:
https://baseURL/myMapServer/0/?query=category=cat1
and then,in definition query: category=::category
But it doesn't work, ArcMap throws an SQL syntax error.
Update: this question is specifically on how defining ArcGIS layers. This is not a question on how to retrieve GET query parameters in PHP, JavaScript or any common programming langauge.