Hi,
I am having some issue using GdiPlusRasterLayer. I try to render a JPG file using GdiPlusRasterLayer. But, the problem is image getting cuts off. I am using the following code to add a GdiPlusRasterLayer
wpfMap.MapUnit = GeographyUnit.DecimalDegree;
wpfMap.Background = new SolidColorBrush(Colors.Gray);
wpfMap.MapTools.Logo.IsEnabled = false;
LayerOverlay rootOverlay = new LayerOverlay();
RectangleShape rect = new RectangleShape(-122, 74, 106, -62);
wpfMap.CurrentExtent = rect;
GdiPlusRasterLayer rootImageLayer = new GdiPlusRasterLayer(@"Images\Milpitas.jpg", rect);
rootImageLayer.UpperThreshold = double.MaxValue;
rootImageLayer.LowerThreshold = 0;
rootImageLayer.IsGrayscale = false;
//rootImageLayer.
rootOverlay.TransitionEffect = TransitionEffect.None;
rootOverlay.Layers.Add("rooot",rootImageLayer);
wpfMap.Overlays.Add("rootOverlay",rootOverlay);
wpfMap.Refresh();
Please see the attached images for more information. You will notice that image is cutoff (top and right )
001_GdiRasterLayer.JPG (49 KB)
f.JPG (89.2 KB)