Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: Point features with border

$
0
0
As I searched a little for it, here is how I was able to draw a point with a different color border and change the border according to a field value. The following example draws a default green line around an orange square point, line going to red if field value= 'NO'

Hope it'll help.

'-------------------------------------------
                With .shp

                    Dim options As New MapWinGIS.ShapeDrawingOptions
                    Dim utils As New MapWinGIS.Utils
                    options = .DefaultDrawingOptions
                    options.Visible = True
                    options.FillVisible = True
                    options.SetDefaultPointSymbol(MapWinGIS.tkDefaultPointSymbol.dpsSquare)
                    options.FillColor = utils.ColorByName(MapWinGIS.tkMapColor.Orange)
                    options.PointSize = 12
                    options.LineColor = utils.ColorByName(MapWinGIS.tkMapColor.Green)
                    options.LineWidth = 2
change border according to field value :
                 Dim ct As MapWinGIS.ShapefileCategory

                    ct = .Categories.Add("YourCatName")
                    ct.Expression = "[shpFieldName] = " & squote & "NO" & squote
                    ct.DrawingOptions.LineColor = utils.ColorByName(MapWinGIS.tkMapColor.Red)

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>