Ejemplo n.º 1
0
        /// <summary>
        /// Removes proxy for specified image layer (must render grid directly)
        /// </summary>
        public static void RemoveGridProxyForLayer()
        {
            var img = axMap1.GetActiveLayer();

            if (img == null)
            {
                return;
            }

            var grid = img.OpenAsGrid();

            if (grid != null)
            {
                if (img.IsGridProxy)
                {
                    int handle = axMap1.get_LayerHandle(LAYER_POSITION);
                    axMap1.RemoveLayer(handle);
                    img.Close();
                }

                if (!grid.RemoveImageProxy())
                {
                    MessageBox.Show("Failed to remove image proxy");
                }
            }
        }
Ejemplo n.º 2
0
 public static int GetLayerHandle(this AxMapWinGIS.AxMap map)
 {
     return(map.get_LayerHandle(LAYER_POSITION));
 }