Feature Service or Map Service for Web AppBuilder?

225
2
07-14-2020 04:00 PM
MichaelThornton
New Contributor II

When using Web AppBuilder to design Web Maps, you can use a Feature Service or a Map Service URL as the embedded map within the application, which is best practices and what are the pros and cons for each? Thank you

0 Kudos
2 Replies
BenTurrell
Occasional Contributor III

Hey Michael Thornton‌,

There is a really good overview of feature layer vs hosted feature layers here:

https://community.esri.com/thread/241755-difference-between-feature-service-and-hosted-feature-layer 

Thanks,

Ben

TanuHoque
Esri Regular Contributor

Thanks Ben Turrell‌.

Michael Thornton‌,

I'd like to mention few quick notes on map service here as a lot of good info regarding feature service/layer found in the other thread:

  • There are two ways you can consume a map service in a web map/app
    1. as map image layer:
      When you add a layer with a url that ends with /MapServer, a map image layer (aka map service layer) gets added.
      • Unlike feature layer, this type of layer makes export calls to its map service.
      • At high level, the map service in turn draws all features for the given extent on the server side,
        • converts that to an image, and
        • sends that image back to the client app
        • The app simply draws the image.
    2. as feature layer:
      You can also add a sub layer (off feature layer type) off a map service as a feature layer on the web map. To do that you need use the url (ends with a number i.e. /MapServer/0) of that layer e.g. https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/0
      • In this case, as mentioned in the other thread, client app downloads features (geometries and attributes) from the service and draws them on the client side.

As per pros and cons, in an enterprise environment:

  • feature and map services try to be on par - unfortunately there are few gaps you might run into when in comes to some capabilities.
  • other than those, editing capability the biggest difference - when you want editing capability you have to go with feature service.

But when it comes to choose between a map image layer and a feature layer (regardless of whether is it off a feature service or map service), I can think of few that you need keep in your mind:

  • performance:
    • draw thousands of features (or highly dense features) on the client side or on the server side
    • on the other hand, with smaller number of features, drawing them on the client side takes loads off your server.
  • symbology:
    • there are differences in what is supported on the client side vs what on the server side
  • interactivity:
    • since features are drawn on the client side, feature layer offers rich interactivity that you won't see with a map image layer.
0 Kudos