Map service vs Feature service
There are different kinds of services. Most of these differences are based on the type of resource the service makes available. For example, geoprocessing services enable server-side analysis and print services enable creation of printable files.
Map services and feature services both provide a REST endpoint for accessing feature data. For both types of services, that endpoint can be used to query the data, access the attribute table, and as an input for analysis tools. But these two types of services provide those capabilities in different ways that are useful for different purposes.
Response differences
A map service will have a REST endpoint that ends with MapServer. When a client sends a request to this URL, the service responds by sending a rendered image of the data. A feature service, by contrast, will have a REST endpoint that ends with FeatureServer. When a client sends a request to this URL, the service responds by sending the spatial reference, vertex coordinates, and geometry type of the features. The client then renders the geometry.
An image of the data is typically a smaller file size than the geometries themselves. Compared to a feature service, a map service consumes less network bandwidth and is more easily rendered by low-powered client applications. Sending an image of the data also means map services can include both vector and raster data. The advantage of a feature service, on the other hand, is that access to the geometries enables editing of the features. Client-side rendering of feature services can also reduce CPU usage by the server.
Portal item differences
Because map and feature services are different kinds of services, they are associated with different types of layer items in the portal. A map service is referenced by a map image layer, while a feature service is referenced by feature layer.
Exercise: Add external services to the portal (10 minutes)
- Open this link (opens in new tab)
- From the Supported Operations at the bottom of the page, click Export Map
- For format, select JSON, then click Export Map Image (GET)
- Copy the URL listed in the href property and navigate to that page
- Open this link (opens in new tab)
- From the Supported Operations at the bottom of the page, Click Query
- For Layer Definitions, copy and paste this value:
[{"layerId": 0, "where": "1=1", "outFields": "SiteName"}]
- For format, select JSON, then click Query (GET)
- In the ArcGIS Online Home app, on the Content tab, click the New item button
- Click URL, paste the first URL into the URL box, then click Next
- Type RainGaugeSitesMIL_<your initials> for the title, then click Save
- Repeat the process for the second URL, titling the item RainGaugeSitesFL_<your initials>
- Answer these questions:
- What kind of service is the first REST endpoint?
- How can you be sure of the type of service a REST endpoint provides access for?
- Is Export Map a supported operation for the second REST endpoint?
- How did the Export Map response on the first service differ from the Query response on the second service?
- What kind of layer item was created when you added the first URL?
- What kind of layer item was created when you added the second URL?
Summary
Map Service | Feature Service | |
---|---|---|
Analyzable* | ✔️ | ✔️ |
Queryable* | ✔️ | ✔️ |
Attribute table access* | ✔️ | ✔️ |
Enables editing* | ❌ | ✔️ |
Geometry rendered by | Server | Client |
REST endpoint | MapServer | FeatureServer |
File transfer size | Generally smaller | Generally larger |
Associated portal item | Map image layer | Feature layer |
* If enabled as a capability of the service