Layer Group and Coordinate Transformation...

Topics: SharpMap v0.9 / v1.x
May 11, 2010 at 3:38 PM

Ciao,

adding this few line of code will be handled correctly the Coordinate Trasnformation even on the Layer Group..

 

                foreach (var layer in _Layers)
                {
                    layer.CoordinateTransformation = this.CoordinateTransformation;
                }


Into Layers accessor:

        /// <summary>
        /// Sublayers in the group
        /// </summary>
        public Collection<Layer> Layers
        {
            get 
            {
                foreach (var layer in _Layers)
                {
                    layer.CoordinateTransformation = this.CoordinateTransformation;
                }
    
                return _Layers; 
            }
            set { _Layers = value; }
        }