Hello,
I try to do the "Image with worldfile" demo from Web Edition in the new Silverlight Edition.
As far as I know, we need to do the GdiPlusRasterOverlay on the server and then give it to the silverlight MapSuite component. The silverlight will call a webservice (seems to be geotiles.axd) to get the tiles needed.
I use that code in the Default.aspx.cs web page :
GdiPlusRasterLayer gdipluslayer = new GdiPlusRasterLayer("~/app_data/World.tif");
gdipluslayer.UpperThreshold = double.MaxValue;
gdipluslayer.LowerThreshold = 0;
ServerLayerOverlay overlayworldfile = new ServerLayerOverlay("NativeServerWithPictureWorldfile");
overlayworldfile.Layers.Add(gdipluslayer);
SilverlightMapConnector1.ServerLayerOverlays.Add(overlayworldfile);
and this code in the Silverlight code behind (xaml.cs) :
Map1.MapUnit = GeographyUnit.DecimalDegree; Map1.Background = new SolidColorBrush(Color.FromArgb(255, 156, 187, 216)); Map1.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91); ServerLayerOverlay overlay = new ServerLayerOverlay("NativeServerWithPictureWorldfile", "SilverlightMapConnector1"); overlay.Name = "ImageWorldfile" Map1.Overlays.Add(overlay); Map1.Refresh();
I don't know if I forget something or I don't understand MapSuite logic for "image with worldfile" demo, but the image is not visible on the screen.
Thanks you in advance for your help.