ThinkGeo.com    |     Documentation    |     Premium Support

Layers.Selects()

I have another problem with the new version.


In the last version i can "select" a feature with this code:




Dim Pinteres As New Layer(Module1.getRuta & "\Mapas\espes2________pi.shp")


Dim color As GeoColor = GeoColor.FromArgb(200, 255, 69, 0)

Dim brush As New GeoSolidBrush(color)

Dim symbol As New PointSymbol(PointStyleEnum.Circle, brush, 8)


Pinteres.SelectSymbols.Clear()

Pinteres.SelectSymbols.Add(symbol)


---------


Sql = "select * from espes2________pi where ID = 3"

Dim selects As Integer() = map1.Layers("espes2________pi").SQLQuery(Sql, "RecID")

map1.Layers("espes2________pi").Selects(selects)




But now I can't do it with the class ShapeFileFeatureLayer. Any ideas?

Thanks!!




Carlos

 



Carlos,


In 3.0, you can get the same function by using InMemoryLayer. Here attached is the sample code as well as a snapshot. In the sample, you can “select” the result and highlight them on the map


Ben



151-VBDesktop.zip (12.3 KB)