This project has moved and is read-only. For the latest updates, please go here.

SharpMap_v0.9 LabelLayer

Topics: SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Jun 27, 2011 at 5:11 PM
Edited Jun 27, 2011 at 5:34 PM

My LabelLayer with CoordinateTransformation not display anything until I changed the property Envelope, as it is implemented in VectorLayer: added check for CoordinateTransformation:


   public override BoundingBox Envelope
                if (DataSource == null)
                    throw (new ApplicationException("DataSource property not set on layer '" + LayerName + "'"));

                bool wasOpen = DataSource.IsOpen;
                if (!wasOpen)
                BoundingBox box = DataSource.GetExtents();
                if (!wasOpen) //Restore state
                if (CoordinateTransformation != null)
#if !DotSpatialProjections
                    return GeometryTransform.TransformBox(box, CoordinateTransformation.MathTransform);
                    return GeometryTransform.TransformBox(box, CoordinateTransformation.Source, CoordinateTransformation.Target);
                return box;
or it is wrong?

Another problem - even with little movement on the map (Pan tool), some labels disappear, the next move - come again (something like this were  when SharpMap2 layer.Features.IsSpatiallyIndexed was true)
Jun 27, 2011 at 9:50 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.