Пример #1
0
        /// <summary>Use a white background as map
        /// </summary>
        /// <param name="topLeft">Top left corner coordinates</param>
        /// <param name="bottomRight">Bottom right corner coordinates</param>
        public void LoadBlank(Point topLeft, Point bottomRight)
        {
            //load blank map
            Clear();
            geoImage = new GeoreferencedImage(topLeft, bottomRight);
            mapCanvas.Children.Add(geoImage.RawImage);
            ComputeMapConstants();
            IsMapLoaded = true;

            ResetZoom();
        }
Пример #2
0
        //bitmaps

        /// <summary>Load a calibrated image file as map</summary>
        /// <param name="bitmapFileName">
        /// Bitmap file name. An ESRI world file following the standard naming conventions must exist.
        /// http://en.wikipedia.org/wiki/World_file
        /// </param>
        public void LoadBitmap(string bitmapFileName)
        {
            try
            {
                Clear();
                geoImage = new GeoreferencedImage(bitmapFileName);
                mapCanvas.Children.Add(geoImage.RawImage);
                ComputeMapConstants();
                IsMapLoaded = true;

                ResetZoom();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }