Skip to content

Working with ArcGIS Feature Service

Loayeh Jumbam edited this page Sep 7, 2016 · 2 revisions

Add a Feature Service to a Map

Can be done in two ways:

  1. Using ArcGISFeatureLayer : Light weight, supports generalization, no editing
      ArcGISFeatureLayer {
          url: "http://services.arcgis.com/ue9rwulIoeLEI9bj/arcgis/rest/services/Tectonic_Plate_Boundaries/FeatureServer/0"
          maxAllowableOffset: map.resolution
      }
  1. Using FeatureLayer + GeodatabaseFeatureServiceLayer: More code, more options, no generalization, can be used for editing.
FeatureLayer {
          id: featureLayer
          featureTable: gdb.valid ? gdb : null
}
GeodatabaseFeatureServiceTable {
          id: gdb
          url: "http://services.arcgis.com/6DIQcwlPy8knb6sg/ArcGIS/rest/services/SlateGunDeaths/FeatureServer/0"
}

Note: If you add these layers to map, the layer will get initialized automatically else call layer.initialize() explicitly.