A scriptcs script pack for ArcGIS.PCL
###Quick Start
var arcgis = Require<ArcGISPack>();
var gateway = arcgis.CreateGateway("http://services.arcgisonline.com/arcgis");
// Now do whatever you want!
###Going further
The returned gateway
supports the following as typed operations:
Query<T>
- query a layer by attribute and / or spatial filtersQueryForCount
- only return the number of results for the query operationQueryForIds
- only return the ObjectIds for the results of the query operationFind
- search across n layers and fields in a serviceApplyEdits<T>
- post adds, updates and deletes to a feature service layerGeocode
- single line of input to perform a geocode using a custom locator or the Esri world locatorSuggest
- lightweight geocode operation that only returns text results, commonly used for predictive searchingReverseGeocode
- find location candidates for a input point locationSimplify<T>
- alter geometries to be topologically consistentProject<T>
- convert geometries to a different spatial referenceBuffer<T>
- buffers geometries by the distance requestedDescribeSite
- returns a url for every service discoveredPing
- verify that the server can be accessedPublicKey
- admin operation to get public key used for encryption of token requestsServiceStatus
- admin operation to get the configured and actual status of a service
In all cases above T
is a geometry type of Point
, MultiPoint
, Polyline
, Polygon
or Extent
If you need to call secure resources and your ArcGIS Server supports token based authentication then specify a TokenProvider
in your call to CreateGateway
or if the token service is at the same root url then you can just pass in the username and password
var arcgis = Require<ArcGISPack>();
var gateway = arcgis.CreateGateway("http://localhost/arcgis", new TokenProvider("http://otherhost/arcgis", "username", "password"));
var gateway2 = arcgis.CreateGateway("http://localhost/arcgis", "username", "password");
Refer to the ArcGIS.PCL project for more information on what you can call.