Exemple #1
0
        public CustomLayerOverlay(GeoImage backgroundImage = null)
        {
            BackgroundImage = backgroundImage;
            if (BackgroundImage != null)
            {
                // set the background image as a control of this overlay
                var wpfBitmap = new BitmapImage();
                wpfBitmap.BeginInit();
                wpfBitmap.StreamSource = BackgroundImage.GetImageStream();
                wpfBitmap.EndInit();

                var imageControl = new Image()
                {
                    Source = wpfBitmap
                };
                imageControl.SetValue(Panel.ZIndexProperty, -100);
                OverlayCanvas.Children.Add(imageControl);
            }
        }
 public static Stream GetImageStream(this GeoImage image, GeoCanvas geoCanvas)
 {
     return(image.GetImageStream());
 }