Anywhere.ArcGIS 1.0.0-beta.3

Use ArcGIS Server REST resources without an official SDK. Ths is a netstandard 2.0 library, it was ported from ArcGIS.PCL. It is not endorsed, affiliated or supported by Esri.

A typical use case would be the need to call some ArcGIS REST resource from server .NET code or maybe a console app. The features that this returns can be used directly as Esri JSON in JavaScript apps using the Esri JS API.

Works with secure and non-secure ArcGIS Server on premise / in the cloud, Portal for ArcGIS and ArcGIS Online.

This is a prerelease version of Anywhere.ArcGIS.
There is a newer version of this package available.
See the version list below for details.
This package has a SemVer 2.0.0 package version.
This package will only be available to download with SemVer 2.0.0 compatible NuGet clients, such as Visual Studio 2017 (version 15.3) and above or NuGet client 4.3.0 and above. Read more
Install-Package Anywhere.ArcGIS -Version 1.0.0-beta.3
dotnet add package Anywhere.ArcGIS --version 1.0.0-beta.3
<PackageReference Include="Anywhere.ArcGIS" Version="1.0.0-beta.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Anywhere.ArcGIS --version 1.0.0-beta.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

If you are calling a REST operation you will need to create a gateway to manage the request. There are a few different ones but the most basic is called PortalGateway and this can be used for connecting directly to services with ArcGIS Server.

Create an instance of that by specifying the root url of your server. The format of the root url is scheme://host:port/instance so a typical default ArcGIS Server for your local machine would be http://localhost:6080/arcgis, note that you do not need to include rest/services in either the root url or your relative urls as it gets added automatically. One thing to look out for is that the url is case sensitive so make sure you enter it correctly.

var gateway = new PortalGateway("https://sampleserver3.arcgisonline.com/ArcGIS/");

Now you have access to the various operations supported by it. For example to call a query against a service

var query = new Query("Earthquakes/EarthquakesFromLastSevenDays/MapServer/0".AsEndpoint())
{ 
    Where = "magnitude > 4.0" 
};
var result = await gateway.Query<Point>(query);

Capabilities

Supports the following as typed operations:

  • CheckGenerateToken create a token automatically via an ITokenProvider
  • Query query a layer by attribute and / or spatial filters, also possible to do BatchQuery
  • QueryForCount only return the number of results for the query operation
  • QueryForIds only return the ObjectIds for the results of the query operation
  • QueryForExtent return the bounding extent for the result of the query operation
  • Find search across n layers and fields in a service
  • ApplyEdits post adds, updates and deletes to a feature service layer
  • Geocode single line of input to perform a geocode using a custom locator or the Esri world locator
  • Suggest lightweight geocode operation that only returns text results, commonly used for predictive searching
  • ReverseGeocode find location candidates for a input point location
  • Simplify alter geometries to be topologically consistent
  • Project convert geometries to a different spatial reference
  • Buffer buffers geometries by the distance requested
  • DescribeSite returns a url for every service discovered
  • CreateReplica create a replica for a layer
  • UnregisterReplica unregister a replica based on the Id
  • DeleteAttachments delete attachments that are associated with a feature
  • Ping verify that the server can be accessed
  • Info return the server information such as version and token authentication settings
  • DescribeServices return services information (name, sublayers etc.)
  • DescribeService return service information (name, sublayers etc.)
  • DescribeLayer return layer information

REST admin operations:

  • PublicKey - admin operation to get public key used for encryption of token requests
  • ServiceStatus - admin operation to get the configured and actual status of a service
  • ServiceReport - admin operation to get the service report
  • StartService - admin operation to start a service
  • StopService - admin operation to stop a service

There are also methods to add / update and download attachments for a feature and you can extend this library by writing your own operations.

Refer to the integration test project for more examples.

If you are calling a REST operation you will need to create a gateway to manage the request. There are a few different ones but the most basic is called PortalGateway and this can be used for connecting directly to services with ArcGIS Server.

Create an instance of that by specifying the root url of your server. The format of the root url is scheme://host:port/instance so a typical default ArcGIS Server for your local machine would be http://localhost:6080/arcgis, note that you do not need to include rest/services in either the root url or your relative urls as it gets added automatically. One thing to look out for is that the url is case sensitive so make sure you enter it correctly.

var gateway = new PortalGateway("https://sampleserver3.arcgisonline.com/ArcGIS/");

Now you have access to the various operations supported by it. For example to call a query against a service

var query = new Query("Earthquakes/EarthquakesFromLastSevenDays/MapServer/0".AsEndpoint())
{ 
    Where = "magnitude > 4.0" 
};
var result = await gateway.Query<Point>(query);

Capabilities

Supports the following as typed operations:

  • CheckGenerateToken create a token automatically via an ITokenProvider
  • Query query a layer by attribute and / or spatial filters, also possible to do BatchQuery
  • QueryForCount only return the number of results for the query operation
  • QueryForIds only return the ObjectIds for the results of the query operation
  • QueryForExtent return the bounding extent for the result of the query operation
  • Find search across n layers and fields in a service
  • ApplyEdits post adds, updates and deletes to a feature service layer
  • Geocode single line of input to perform a geocode using a custom locator or the Esri world locator
  • Suggest lightweight geocode operation that only returns text results, commonly used for predictive searching
  • ReverseGeocode find location candidates for a input point location
  • Simplify alter geometries to be topologically consistent
  • Project convert geometries to a different spatial reference
  • Buffer buffers geometries by the distance requested
  • DescribeSite returns a url for every service discovered
  • CreateReplica create a replica for a layer
  • UnregisterReplica unregister a replica based on the Id
  • DeleteAttachments delete attachments that are associated with a feature
  • Ping verify that the server can be accessed
  • Info return the server information such as version and token authentication settings
  • DescribeServices return services information (name, sublayers etc.)
  • DescribeService return service information (name, sublayers etc.)
  • DescribeLayer return layer information

REST admin operations:

  • PublicKey - admin operation to get public key used for encryption of token requests
  • ServiceStatus - admin operation to get the configured and actual status of a service
  • ServiceReport - admin operation to get the service report
  • StartService - admin operation to start a service
  • StopService - admin operation to stop a service

There are also methods to add / update and download attachments for a feature and you can extend this library by writing your own operations.

Refer to the integration test project for more examples.

Release Notes

Initial port of ArcGIS.PCL to netstandard

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.10.0 73 7/18/2019
1.9.1 2,042 11/29/2018
1.9.0 259 11/8/2018
1.8.1 164 10/18/2018
1.8.0 218 9/9/2018
1.7.1 172 8/23/2018
1.7.0 284 8/2/2018
1.6.0 263 6/13/2018
1.5.0 206 6/10/2018
1.4.0 360 3/12/2018
1.3.1 312 3/3/2018
1.3.0 600 1/25/2018
1.2.1 327 1/16/2018
1.2.0 411 1/15/2018
1.1.0 350 12/11/2017
1.0.0 272 11/14/2017
1.0.0-beta.4 189 11/13/2017
1.0.0-beta.3 193 10/31/2017
1.0.0-beta.2 189 10/27/2017
1.0.0-beta.1 191 10/26/2017
Show less