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

Zoom Free Polygon

Topics: SharpMap Project, WinForms Controls
Aug 22, 2014 at 4:04 PM

I am using Vector Layer for show polygon on map, my project require on zoom change polygon size should not be changed or scale.

Please give me any suggestion for this.
Aug 25, 2014 at 9:17 AM
Sorry, I have no clue what you want to achieve.
Aug 25, 2014 at 11:49 AM
Edited Aug 25, 2014 at 11:56 AM
Thanks for your reply, I have achieve desired finicality using custom font and CharacterPointSymbolizer.
  private SharpMap.Styles.VectorStyle GetCustomStyle(SharpMap.Data.FeatureDataRow row)
            SharpMap.Styles.VectorStyle style = new SharpMap.Styles.VectorStyle();
            var ps = new CharacterPointSymbolizer();
            ps.CharacterIndex = 0x63;
            //ps.Font = new Font(pfc.Families[0], 42, FontStyle.Regular);

            ps.Font = new Font(pfc.Families[0], 42, FontStyle.Regular, GraphicsUnit.Pixel, 0x63, false);
            //ps.Foreground = new LinearGradientBrush(
            //                                           new Rectangle(0,0,32,32),
            //                                           Color.FromArgb(255, 255, 0, 0),   // Opaque red
            //                                           Color.FromArgb(255, 0, 0, 0), (float)(Convert.ToDecimal(row.ItemArray[5])), true);        
            ps.Offset = new Point(0, 10);
            ps.Rotation =(float)(Convert.ToDecimal(row.ItemArray[5]));
            ps.Halo = 100;            
            style.PointSymbolizer = ps;            
            return style;
But issue is how to set background with gradient color for each point

Aug 26, 2014 at 7:30 AM
Still I don't get what you want. You are talking about points and show us a polygons.
Aug 26, 2014 at 4:47 PM
What exactly are you trying to achieve?

if you want a polygon that remains the same size on the screen, you could use a decoration instead?