arcGisLocalDynamicMapServiceLayer.GetDetails(dynamicLayerInfo.ID, (featureLayerInfo, exception) => { switch (featureLayerInfo.GeometryType) { case ESRI.ArcGIS.Client.Tasks.GeometryType.Envelope: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleFillSymbol() { Fill = new SolidColorBrush(GetRandomColor()), BorderBrush = new SolidColorBrush(GetRandomColor()) } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.MultiPoint: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleMarkerSymbol() { Color = new SolidColorBrush(GetRandomColor()), Size = 8 } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Point: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleMarkerSymbol() { Color = new SolidColorBrush(GetRandomColor()), Size = 8 } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Polygon: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleFillSymbol() { Fill = new SolidColorBrush(GetRandomColor()), BorderBrush = new SolidColorBrush(GetRandomColor()) } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Polyline: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleLineSymbol() { Color = new SolidColorBrush(GetRandomColor()) } }; break; default: break; } // Set the LayerDrawingOptions property on the local dynamic map service layer (the LayerID property ties this to the DynamicLayerInfo object). layerDrawingOptionsCollection.Add(layerDrawOpt); // Refresh the dynamic map service layer to render the result of the datasource/layer change. arcGisLocalDynamicMapServiceLayer.Refresh(); });
Solved! Go to Solution.
Hi,
Please can you confirm the product and version you are using? (e.g. ArcGIS Runtime SDK for WPF 10.2.2)
Also - if you can attach your application to the thread that would greatly help the forum folk support you.
Cheers
Mike
{"currentVersion":10.21,"name":"18BANSAM","type":"Feature Layer","description":"","geometryType":"esriGeometryPoint","copyrightText":"","subLayers":[],"minScale":0,"maxScale":0,"defaultVisibility":true,"extent":{"xmin":-72.225719444444451,"ymin":6.9261805555555558,"xmax":-71.813094444444445,"ymax":7.0953861111111109,"spatialReference":{"wkid":4326,"latestWkid":4326}},"hasAttachments":false,"htmlPopupType":"esriServerHTMLPopupTypeNone","displayField":"X","typeIdField":null,"fields":[{"name":"FID","type":"esriFieldTypeOID","alias":"FID","domain":null},{"name":"Shape","type":"esriFieldTypeGeometry","alias":"Shape","domain":null},{"name":"X","type":"esriFieldTypeDouble","alias":"X","domain":null},{"name":"Y","type":"esriFieldTypeDouble","alias":"Y","domain":null},{"name":"Z","type":"esriFieldTypeDouble","alias":"Z","domain":null}],"relationships":[],"canModifyLayer":true,"canScaleSymbols":false,"hasLabels":false,"capabilities":"Map,Query,Data","maxRecordCount":1000,"supportsStatistics":false,"supportsAdvancedQueries":false,"hasZ":true,"hasM":true,"supportedQueryFormats":"JSON, AMF","ownershipBasedAccessControlForFeatures":{"allowOthersToQuery":true},"useStandardizedQueries":true,"id":0}
{"error":{"code":400,"message":"Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': 0.","details":[]}}
{"error":{"code":400,"message":"Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': 0.","details":[]}}
http://localhost.:50001/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer=%7b%22id%22%3a0%2c%22source%22%3a%7b%22type%22%3a%22dataLayer%22%2c%22dataSource%22%3a%7b%22type%22%3a%22table%22%2c%22workspaceId%22%3a%22b1125da0-abba-4ea5-af43-c89369524b3f%22%2c%22dataSourceName%22%3a%2218BANSAM%22%7d%7d%7d HTTP/1.1
http://localhost.:50000/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer=%7b%22id%22%3a0%2c%22source%22%3a%7b%22type%22%3a%22dataLayer%22%2c%22dataSource%22%3a%7b%22type%22%3a%22table%22%2c%22workspaceId%22%3a%22d49fab1c-b4a8-43dc-9f0b-57aa9ee2f053%22%2c%22dataSourceName%22%3a%2218BANSAM%22%7d%7d%7d HTTP/1.1
http://localhost.:50001/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer={"id":0,"source":{"type":"dataLayer","dataSource":{"type":"table","workspaceId":"b1125da0-abba-4ea5-af43-c89369524b3f","dataSourceName":"18BANSAM"}}} HTTP/1.1
http://localhost.:50000/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer={"id":0,"source":{"type":"dataLayer","dataSource":{"type":"table","workspaceId":"d49fab1c-b4a8-43dc-9f0b-57aa9ee2f053","dataSourceName":"18BANSAM"}}} HTTP/1.1
http://localhost.:50000/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer={"id":0,"source":{"type":"dataLayer","dataSource":{"type":"table","workspaceId":"6c4696a4-fb40-41b9-9a3b-76639a2cb5c6","dataSourceName":"Points"}}}