There are a variety of ArcGIS clients that you can use to edit or view the features in a feature service, such as web clients or ArcGIS Pro.
Out-of-the-box ArcGIS web clients
Map Viewer and templates in ArcGIS Online and ArcGIS Enterprise provide basic out-of-the-box functionality for editing feature services. Without programming, you can quickly create a web editing application that allows users to add, update, and delete geographic features from a database.
For example, when using the out-of-the-box applications, you can do the following:
- Edit layers.
- Track edits.
- Control access to features using ownership-based access control.
- Prevent users from editing feature geometry.
You can add feature services to Map Viewer using the service's ArcGIS Server Services Directory URL. After you create and save a map containing a feature service, you can share the map with others in your organization, embed it in a website, or paste a link (URL) to the application into an email, blog, or website. Maps you create can also be deployed using application templates available in your organization. These templates are fully customizable.
You can also add feature services as items in an ArcGIS Enterprise or ArcGIS Online organization and share the items with other members of that organization.
ArcGIS Maps SDK for JavaScript clients
The ArcGIS Maps SDK for JavaScript provides the most advanced web editing capabilities and customization options. If you're comfortable programming using this API, you can tailor the editing experience to a specific purpose, goal, or organizational strategy. For example, with the ArcGIS Maps SDK for JavaScript, you can do the following:
- Edit selection-only layers.
- Track edits.
- Control access to features using ownership-based access control.
- Prevent users from editing feature geometry.
- Create, delete, and change referenced geodatabase versions on the fly.
- Edit cartographic representations.
Obtaining the REST endpoint of a feature service
You can obtain the REST endpoint, or URL, of a feature service by browsing to the service in the ArcGIS Server Services Directory. For example, the default URL to a feature service in the Services Directory is https://gisserver.example.com:6443/arcgis/rest/services/folder_name/service_name/FeatureServer.
To access a specific layer in the feature service, append a zero-based integer to the URL. For example, appending /0 to the URL provides access to the first layer in the service; appending /1 to the URL provides access to the second layer in the service.
Using feature services in ArcGIS Pro
You can add feature services to ArcGIS Pro to view and edit the data in them.
The workflow for editing in ArcGIS Pro is fundamentally different than editing a feature service through a web application. To learn more, see Edit feature services in the ArcGIS Pro help.
Using sync with feature services
Feature services include operations that support disconnected editing workflows. In a disconnected environment, the client (for example, a runtime or mobile device) can make edits locally and synchronize the changes with the ArcGIS Server site when the client is reconnected to the feature service. This functionality, called sync, is available through the ArcGIS REST API.
For more information about using sync with feature services, see the sync section of the ArcGIS REST API help.
Improving the display performance of feature services
When clients send requests to ArcGIS Server to query a feature service, the response from the server is typically cached by the browser and reused for a certain period of time. However, depending on how your feature service and its associated data are used in applications, you may consider adjusting the length of time the browser will use a response in its cache. This can be achieved by adding a property named cacheControlMaxAge to the JavaScript Object Notation (JSON) of the service.
How the cacheControlMaxAge property is used
ArcGIS Server feature service responses include an entity tag (ETag) and Cache-Control header. The ETag header value is a unique identifier of the response. The Cache-Control header has a max-age value that provides information to the browser regarding the maximum time period for which it can reuse a response from the browser's cache. This value is controlled by the cacheControlMaxAge property.
When a prior request is repeated and the maximum age of the cache has not expired, the browser uses the cached response without sending the request to the server. If the maximum age has expired, the browser must send the request to the server and set an IF-NONE-MATCH header with an associated ETag value corresponding to the response in its cache. ArcGIS Server evaluates the request and uses the ETag value to determine whether the response has changed. If the response from the server is different from the copy on the browser, the server sends a new response to the browser. If the response is identical to the copy on the browser, the server alerts the browser to continue to use the response in its cache.
Define the value of the cacheControlMaxAge property
To specify how long a browser is allowed to use a cached response, define the cacheControlMaxAge property. This property can be set for individual service caches. By mitigating the need for ArcGIS Server to send a full response, you allow the web browser caches to be more efficient, help optimize your applications, and save network bandwidth.
For feature services, the default is zero seconds. This means the browser always resends a request, and ArcGIS Server processes the request and sends a full response to the browser if the content has changed. This value works well for most applications.
For feature services in which the data does not change frequently, it is recommended that you increase the default to 30 days (2,592,000 seconds) or longer to minimize network traffic.
To add the cacheControlMaxAge property to a feature service and specify its default value, follow these steps:
- In a web browser, open the ArcGIS Server Administrator Directory and sign in as a user who has administrator privileges.
The URL is formatted https://gisserver.example.com:6443/arcgis/admin.
- Click services and choose the feature service you want to modify from the Services list.
If you don't see your service listed, it may be in a directory under the Root folder.
- Scroll to the bottom of the target feature service's page and click edit.
The Service Properties dialog box appears.
- Insert the cacheControlMaxAge property to the JSON file.
Where you insert the property depends on whether the feature service references registered data or is a hosted feature service.
- For a feature service that references a registered data source, locate the "extensions" section of the JSON. Find the subsection that contains the text "typeName": "FeatureServer", and insert the cacheControlMaxAge property in the properties parameter of this subsection.
- For a hosted feature service, locate the "jsonProperties" section of the Service Properties JSON. Add the cacheControlMaxAge property to this section.
- Set the cacheControlMaxAge property to the desired value (in seconds).
The following example shows setting the cacheControlMaxAge property to 30 days (2592000 seconds) for a feature service that references a registered data store:
{ "typeName": "FeatureServer", "capabilities": "Query,Create,Update,Delete,Uploads,Editing", "enabled": "true", "maxUploadFileSize": 0, "allowedUploadFileTypes": "", "properties": { "cacheControlMaxAge": "2592000",} }
The next example shows setting the cacheControlMaxAge property to 30 days (2592000 seconds) for a hosted feature service.
"jsonProperties": {** "currentVersion": 11.5, "serviceDescription": "", "maxRecordCount": 2000, "cacheControlMaxAge": "2592000", }
- Click Save Edits.
On the feature service's page in the ArcGIS Server Administrator Directory, verify that the cacheControlMaxAge property and the value you specified for it appear in the Properties section.
Providing HTML in text fields
When editing a feature service in a client application, you can use HTML entities and attributes in text fields. For example, when editing a feature in a web client, you can type styled HTML in a comments field.
Note:
By default, only the HTML entities and attributes listed in the table below can be used in feature service text fields. If you attempt to add an unsupported entity or attribute, an error is returned.
If your workflow requires unsupported HTML entities and attributes, you must disable the Filter web content property on the feature service. This property can be accessed through the feature service Advanced Options dialog box in ArcGIS Server Manager. For more information, see Edit service properties in Server Manager.
HTML entity | HTML attribute (if applicable) |
---|---|
<a> | href, target, style |
<b> | |
<br> | |
<div> | style, align |
<em> | |
<font> | size, color, style, face |
http, https protocol | src, href |
<i> | |
<img> | src, width, height, alt, border, style |
<li> | |
mailto: protocol | src, href |
<ol> | |
<span> | style |
<strong> | |
<table> | width, height, cellpadding, cellspacing, border, style |
<tbody> | |
<td> | height, width, valign, align, colspan, rowspan, nowrap, style |
<tr> | height, valign, align, style |
<u> | |
<ul> |