The following link demonstrates how to get data from wcf service in asynchronous way, please check it for more information. wiki.thinkgeo.com/wiki/Map_S…r_With_WCF
From your description I guess you need to draw these features on an image (Service side) and return this image back to client part, then load the image on the map. If my understanding is correct, I’m afraid this approach will bring too much complexity to your application. Currently I haven’t think out a better solution but I think if you can get these features piece by piece then combine them on client part, it will be helpful to improve the performance.
Currently I’m not sure what’s the exact meaning about “convert features to image”, is it just as my understanding in my previous post, or you just need to serialize the feature collection, I will keep an eye on your feedback.
drawingCanvas = new WriteableBitmapGeoCanvas(); nativeImage = new WriteableBitmap((int)overlayElement.Width, (int)overlayElement.Height);
if (drawingCanvas != null && nativeImage != null) { ((Canvas)overlayElement).Children.Clear(); drawingCanvas.BeginDrawing(nativeImage, map.CurrentExtent, map.MapUnit); LayerOverlay ovl = new LayerOverlay(); InMemoryFeatureLayer layer = new InMemoryFeatureLayer(); layer.InternalFeatures.Add(new Feature(30, 30)); layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1; layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; ovl.Layers.Add(layer); Map1.Overlays.Add(overlay); foreach (Layer lyr in ovl.Layers) { lyr.Open(); lyr.Draw(drawingCanvas, new Collection<SimpleCandidate>()); lyr.Close(); } drawingCanvas.EndDrawing(); }
Image image = new Image(); image.Source = (WriteableBitmap)nativeImage; ((Canvas)overlayElement).Children.Add(image); }
There should be lots of considerations to fully meet your requirement and I think it's out of POST's range, if you need further help, please contact with our professional services.