- URL:
- https://<root>/<serviceName>/MapServer/exts/MaritimeChartService/MapServer/find
- Methods:
GET
POST
- Required Capability:
- Maritime Chart Service
- Version Introduced:
- 10.9
Description
The use of this resource requires an ArcGIS GIS Server Standard or Advanced license and an ArcGIS Maritime server extension license.
The find operation is performed on a map service resource used to discover features based on their OBJNAM and NOBJNM attribute values as well as searching for datasets in your map service.
Each result includes its layer ID, layer name, cell name, compilation scale, geometry and geometry type, and other attributes of that result as name-value pairs.
Request parameters
Parameter | Details |
---|---|
(Optional) |
This is a required parameter when Entitlements is enabled. Syntax
Example
|
(Required) | A literal search text. If the layer has a search field associated with it, the server searches for this text in this field. This parameter is shorthand for a Syntax
Example
|
(Optional) | If true, the result set will include the geometries associated with each result. The default is Values: |
(Optional) | The screen image display parameters (width, height, and DPI) of the active map. By default the Syntax
Example
|
(Optional) | The spatial reference of the returned geometry. The spatial reference can be specified as a well-known ID or as a spatial reference JSON object. If Syntax
Example
All values in the |
Response properties
Property | Details |
---|---|
| Specifies the response format. The default response format is Values: Syntax:
|
Example usage
The following examples describe various ways to use the find
operation. All responses are in PJSON format.
Example 1
The following is an example of the find
operation searching for a dataset containing GB4X in the name. An output spatial reference of 4326 was used and the rest are using default values.
https://nsdemo.esri.com/arcgis/rest/services/SampleWorldCities/MapServer/exts/MaritimeChartService/MapServer/find?userid=&searchtext=GB4X&searchfields=DSNM&sr=4326&f=pjson
Example 2
The following is an example of the find
operation searching for features containing Rosset Island in either the OBJNAM or NOBJNM attribute. An output spatial reference of 4326 was used and 'returnGeometry' was set to 'false'. Default values are used for the rest of the parameters.
https://nsdemo.esri.com/arcgis/rest/services/SampleWorldCities/MapServer/exts/MaritimeChartService/MapServer/find?searchtext=Rossett+Island&returngeometry=false&searchfields=&sr=4326&f=pjson
JSON Response syntax
Example 1
The following is the syntax of a response for example 1, searching for a dataset with GB4X in the name.
{
"results": [
{
"layerId": <value>,
"layerName": "<layerNameValue>",
"value": "<datasetName>",
"displayFieldName": "<fieldName>",
"foundFieldName": "<fieldName>",
"value": "<datasetName>",
"attributes": {
"DSNM": "<subFieldValue>",
"EDTN": "<subFieldValue>",
"UPDN": "<subFieldValue>",
"CSCL": "<subFieldValue>"
},
"geometryType": "esriGeometryPolygon", //only returns esriGeomteryPolygon for DSNM
"geometry": {<geometry>} //only when returnGeometry=true (default)
"spatialReference": {
"wkid": <srValue>
},
}
]
}
Example 2
The following is the syntax of a response for example 2, searching for Rosset Island in either OBJNAM or NOBJNM attributes.
{
"results": [
{
"layerId": <value>,
"layerName": "<layerNameValue>",
"value": "<recordID>",
"displayFieldName": "rcid",
"foundFieldName": "<searchFieldValue>",
"value": "<RecordID>",
"attributes": {
"rcid": "<subFieldValue>",
"LNAM": "<subFieldValue>",
"objectType": "<subFieldValue>",
"objectTypeDescription": "<subFieldValue>",
"OBJNAM": "<subFieldValue>",
"cellName": "<subFieldValue>",
"compilationScale": "<subFieldValue>"
}
}
]
}
JSON Response examples
The following sections describe JSON response examples corresponding to the usage examples listed above.
Example 1
{
"results": [
{
"layerId": 0,
"layerName": "S57 Cells",
"value": "GB4X0000.000",
"displayFieldName": "DSNM",
"foundFieldName": "DSNM",
"value": "GB4X0000.000",
"attributes": {
"DSNM": "GB4X0000.000",
"EDTN": "4",
"UPDN": "0",
"CSCL": "45000"
},
"geometryType": "esriGeometryPolygon",
"geometry": {
"spatialReference": {
"wkid": 4326
},
"rings": [
[
[
60.7749955000,
-32.6250103000
],
[
60.7749955000,
-32.3294577000
],
[
61.3172987000,
-32.3294577000
],
[
61.3172987000,
-32.6250103000
],
[
60.7749955000,
-32.6250103000
]
]
]
}
}
]
}
Example 2
The following is an example of a response for example 2, searching for Rosset Island in either OBJNAM or NOBJNM attributes.
{
"layerId": 0,
"layerName": "S57 Cells",
"value": "439",
"displayFieldName": "rcid",
"foundFieldName": "OBJNAM",
"value": "439",
"attributes": {
"rcid": "439",
"LNAM": "GB120871051300174",
"objectType": "LNDARE",
"objectTypeDescription": "Land area",
"OBJNAM": "Rossett Island",
"NOBJNM": "Rössett Inseln",
"cellName": "GB5X01NE.000",
"compilationScale": "22000"
}
}
JSON error response syntax
This example shows the syntax of an error response.
{
"error": {
"code": <value>,
"message": "<errorMessage>",
"details": [
"<detailedMessage>"
]
}
}
JSON error response example
{
"error": {
"code": 400,
"message": "Bad Request",
"details": [
"searchText must be specified"
]
}
}