Me gustaria dar color al mapa con nueva categoria. para hacer debo hacer expresion previa. Lo he intentado pero sigo sin conseguirlo. ¿Qué es lo que falla? Ayudame por favor.
Dim category As MapWinGIS.ShapefileCategory = sf.Categories.Add("Manual")
Dim ad As String = "Alaska"
Dim UniqueShape As New MapWinGIS.Shapefile
UniqueShape = FormMain.AxMapMain.get_GetObject(idx)
Dim af As String = UniqueShape.Table.Field(1).Name
Const cote As String = """"
'failed
' category.Expression = "[STATE_NAME] = """ + ad + """"
'failed
' category.Expression = "[STATE_NAME] <> """""
'failed
category.Expression = "[" + af + "] = " + ad
'failed
category.Expression = "[STATE_NAME] = " & cote & "Alaska" & cote
'failed
'category.Expression = "[STATE_NAME] = ""Alaska"""
Dim utils As New MapWinGIS.Utils
category.DrawingOptions.FillColor = utils.ColorByName(MapWinGIS.tkMapColor.Magenta)
sf.Categories.ApplyExpression(0)
sf.DefaultDrawingOptions.Visible = False
' FormMain.AxMapMain.AddLayer(sf, True)
FormMain.AxMapMain.Redraw()
FormMain.AxMapMain.Refresh()