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); } } );
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?
ArcGISLocalFeatureLayer pLocalFeatureLayer = new ArcGISLocalFeatureLayer(mapname2, 0); Envelope env = new Envelope(-180, -90, 180, 90); //4326 refers to WGS84 SpatialReference sp = new SpatialReference(4326); env.SpatialReference = sp; mapControl.Layers.Add(pLocalFeatureLayer); mapControl.Extent = env;
One possible approach is to set 2 layers with disjoint resolution scales: one dynamic layer at small scale in order to be able to see all features as image, and one feature layer at large scale in order to load the features only at these scales. In this case you have to set the Mode of the feature layer to 'OnDemand' in order to reexecute a query after each extent change.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.