LocalFeatureService.GetServiceAsync(@"\\dtdev7240w7\Terminated\GIS Data\clark gis\clark2layers.mpk", featureService => { foreach (var layerDetails in featureService.MapLayers) { var featureLayer = new ArcGISLocalFeatureLayer(featureService, layerDetails.Name); featureLayer.ID = layerDetails.Name; MyMap.Layers.Add(featureLayer); } } );
Solved! Go to Solution.
Can you see the expected layers and the access UrlFeatureService if you debug the featureservice?
LocalMapService localMapService = new LocalMapService() { Path = @"\\dtdev7240w7\Terminated\GIS Data\clark gis\clark2layers.mpk", EnableDynamicLayers = true, }; localMapService.StartAsync(localService => { if (localService.Error != null) return; var layer = new ArcGISLocalDynamicMapServiceLayer(localMapService); layer.EnableDynamicLayers = true; MyMap.Layers.Add(layer); });
Hi Kerrie, can you be more specific about the above?
clark2layers-label (FeatureServer) Description: Layers: majorrds (0) parcels (1) Supported Operations: Query Apply Edits
Feature Layer: parcels (1) Supported Operations: Query Display Field: AREA Type: Feature Layer Geometry Type: esriGeometryPolygon Description: Copyright Text: Min. Scale: 0 Max. Scale: 0 Extent: XMin: 1052541.625 YMin: 77508.4375 XMax: 1197424.875 YMax: 273556.5 Spatial Reference: 102749 Drawing Info: Renderer: Simple Renderer: Label: Description: Symbol: Simple Fill Symbol. Transparency: 0 Labeling Info: [object Object] Has Attachments: false HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText Object ID Field: FID Global ID Field: Type ID Field: Fields: FID (Type: esriFieldTypeOID, Alias: FID, Editable: false) AREA (Type: esriFieldTypeSingle, Alias: AREA, Editable: true) PERIMETER (Type: esriFieldTypeSingle, Alias: PERIMETER, Editable: true) PARCELS_ (Type: esriFieldTypeDouble, Alias: PARCELS_, Editable: true) PARCELS_ID (Type: esriFieldTypeDouble, Alias: PARCELS_ID, Editable: true) PROP_ID (Type: esriFieldTypeDouble, Alias: PROP_ID, Editable: true) PARCELS_C (Type: esriFieldTypeInteger, Alias: PARCELS_C, Editable: true) CREATEDATE (Type: esriFieldTypeDate, Alias: CREATEDATE, Editable: true, Length: 8) MODDATE (Type: esriFieldTypeDate, Alias: MODDATE, Editable: true, Length: 8) Types:
What should I use as a WKID value in the sample you provided?