GEOG 865
Cloud and Server GIS

Publishing feature services for web editing

PrintPrint

In order to get your maps into a web editing app, you need to publish them as services. Specifically, in ArcGIS, you publish your map as a map service, with the Feature Access capability enabled. This creates a feature service that can be used for web editing.

The terminology here can be confusing. Is it a map service or a feature service? The answer is...both. When you look at your GIS server as an administrator, you'll only see one service, a map service with the Feature Access capability enabled. However when you look at the GIS server as a consumer of the service, for example when you are developing a web app with the service, you will see two ways that you can access the service. You'll see the map service URL and the feature service URL. You need to use the feature service URL in order to access web editing functions. The feature service provides methods (or REST "operations") for editing. Take a look at this example feature service. Click the Fire Perimeter link and examine the methods available for that layer, which are listed under Supported Operations. You should see: Add Features, Update Features, Delete Features, and Apply Edits. You have to enable the Feature Access capability and use the feature service URL (notice "FeatureServer" in the URL) in order to get these methods. They don't come with a regular old map service.

In the previous section, you created two maps: BighornHabitat.mxd and BighornReferenceLayers.mxd. You'll publish the BighornHabitat map as a feature service. The reference layers map also needs to be published, but it doesn't need to have the Feature Access capability enabled.

Try these steps:

  1. If necessary, start your ArcGIS Server site and log in to your EC2 instance through Windows Remote Desktop.
  2. On your EC2 instance, start ArcMap and open BighornHabitat.mxd that you saved in the previous lesson.
  3. Click File > Share As > Service.
    You went through this wizard in the previous lesson, but we'll review the steps here once and then give you a chance to publish another service in your own.
  4. Choose Publish a service and click Next.
  5. Choose your ArcGIS Server connection from the dropdown and name the service BighornHabitat. Then click Next.
  6. Leave the folder as the existing [root] folder and click Continue.
  7. Click the Parameters tab and set the Anti-Aliasing level to Normal.
    Now is the moment of truth when you allow the creation of a feature service.
  8. Click the Capabilities tab and check Feature Access. Then click the Feature Access tab that appears in the left menu and take a moment to examine the options that are available for feature services. Don't change any of them, though.
     
    Screen capture to show the feature service options in the Service Editor
    Figure 3.4: Examining the feature services options
    Notice that Create, Delete, Query, and Update (under Operations allowed) are checked. The unchecked Sync operation is for offline editing workflows and was recently introduced in ArcGIS. It is beyond the scope of this lesson but important to note here if you plan on using this feature in your workplace. Also, if you ever want to publish a feature service without editing enabled, you can uncheck Create, Delete, and Update. Non-editable feature services are sometimes used for showing interactive graphics drawn by the browser, or for making queries in web applications.
    Also examine the REST URL and SOAP URL, which application developers can use to connect directly to your service. When you make your web app, you'll use the REST URL, which is formatted as: http://<Elastic Load Balancer address>/ArcGIS/rest/services/BighornHabitat/MapServer/FeatureServer.
  9. Click Publish to create the service. Some warnings and messages might appear in the Prepare window, but those are okay to ignore for this assignment.
  10. Repeat the above steps to publish your other map BighornReferenceLayers.mxd as a service named BighornReferenceLayers; however, do not enable Feature Access on the service. Ignore the warnings and messages that appear in the Prepare window.

Taking into account the service you published in the previous lesson, your Services Directory should now look something like this (the Current Version number may vary):

 Screen capture of the Services Directory after publishing habitat and reference layer services
Figure 3.5: Service Directory example