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

Scale dependent renderer

Topics: WinForms Controls
May 5, 2016 at 7:33 PM
Hi !

Is it possible to make the size of the symbol drawn in my map to be scale dependent. I mean by that suppose you have a square for a XY data. When you zoom in then the square would be bigger and more easy to be seen ??

So far I rendre my data using :
layTheme = New SharpMap.Rendering.Thematics.CustomTheme(AddressOf cRendering.GPSStyle)

In my render class :
Public Shared Function GPSStyle(ByVal _row As SharpMap.Data.FeatureDataRow) As SharpMap.Styles.VectorStyle
            Dim _style As SharpMap.Styles.VectorStyle = New SharpMap.Styles.VectorStyle
            Dim _color As System.Drawing.Color
            Select Case _row("TypeAeroLeg")
                Case "M" : _color = System.Drawing.Color.Green
                Case Else : _color = System.Drawing.Color.Magenta
            End Select
            Dim _pps = SharpMap.Rendering.Symbolizer.PathPointSymbolizer.CreateCircle(New System.Drawing.Pen(_color, 3), New System.Drawing.SolidBrush(_color), 3)
            _style.PointSymbolizer = _pps
            Return _style
        End Function
Once again, your help is always appreciated !
May 6, 2016 at 10:16 AM