Exemplo n.º 1
0
 public static SaveMapImage GetInstance(AxMap mapControl)
 {
     if (_instance == null)
     {
         _instance = new SaveMapImage(mapControl);
     }
     return(_instance);
 }
Exemplo n.º 2
0
 public static SaveMapImage GetInstance(string filename, double dpi, AxMap mapControl)
 {
     if (_instance == null)
     {
         _instance = new SaveMapImage(filename, dpi, mapControl);
     }
     return(_instance);
 }
Exemplo n.º 3
0
 public static SaveMapImage GetInstance()
 {
     if (_instance == null)
     {
         _instance = new SaveMapImage();
     }
     return(_instance);
 }
Exemplo n.º 4
0
        public string SaveTempMapToImage(double dpi = 96)
        {
            string fileName = string.Empty;

            _saveMapImage = new SaveMapImage(axMap);
            _saveMapImage.MapLayersHandler = _mapLayersHandler;
            if (_saveMapImage.SaveToTempFile(dpi))
            {
                fileName = _saveMapImage.TempMapFileName;
                _saveMapImage.Dispose();
                _saveMapImage = null;
            }
            return(fileName);
        }
Exemplo n.º 5
0
        public bool SaveMapToImage(double dpi, string fileName, bool Preview = true, bool maintainOnePointLineWidth = false)
        {
            var success = false;

            _saveMapImage = new SaveMapImage(fileName, dpi, axMap);
            //_saveMapImage = SaveMapImage.GetInstance(axMap, dpi);
            //_saveMapImage = SaveMapImage.GetInstance();
            //_saveMapImage.MapControl = axMap;
            //_saveMapImage.FileName = fileName;
            _saveMapImage.PreviewImage              = Preview;
            _saveMapImage.MapLayersHandler          = _mapLayersHandler;
            _saveMapImage.MaintainOnePointLineWidth = maintainOnePointLineWidth;
            _saveMapImage.PointSizeExceed100Error  += OnPointSizeRenderError;
            success = _saveMapImage.Save(_grid25MajorGrid != null);
            try
            {
                _saveMapImage.Dispose();
            }
            catch
            {
                //ignore
            }
            return(success);
        }