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

New Post: how to create new category with Expression

$
0
0
hi
i want to create a new symbol to create a new category. I've tried to create but fail, there is no map that changes color. please help me, I've been looking but have not found the solution

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    sf.Categories.Clear()
    idx = FormMain.Legend.SelectedLayer
    sf = FormMain.AxMapMain.get_Shapefile(idx)

    Dim cat As MapWinGIS.ShapefileCategory = sf.Categories.Add("1")
    cat.Expression = "[PERIMETER] >=0 AND [PERIMETER]<=2 "
    Dim utils As New MapWinGIS.Utils
    cat.DrawingOptions.FillColor = utils.ColorByName(MapWinGIS.tkMapColor.Magenta)

    sf.Categories.ApplyExpression(0)


    sf.DefaultDrawingOptions.Visible = False

    FormMain.AxMapMain.Redraw()
    FormMain.AxMapMain.Refresh()

End Sub

Viewing all articles
Browse latest Browse all 2341

Trending Articles



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