Dear All
I’ve design a shape using png image and all is ok (i see on map in defined lat/lng position). Now I like to move mouse over the shape and I like to change color, but no action. Mycode is:
' it's assumed here that the layer we want to edit is the first 1 (with 0 index)
Dim sf As New Shapefile
sf = AxMap.get_Shapefile(m_layerTower)
If sf IsNot Nothing Then
Dim projX = 0.0
Dim projY = 0.0
AxMap.PixelToProj(e.y, e.x, projX, projY)
'AxMap.DegreesToProj(11.9, 44.4, projX, projY)
Dim result As Object = Nothing
Dim ext = New Extents()
ext.SetBounds(projX, projY, 0.0, projX, projY, 0.0)
If sf.SelectShapes(ext, 2000, SelectMode.INTERSECTION, result) Then
Dim shapes As Integer() = TryCast(result, Integer())
If shapes IsNot Nothing AndAlso shapes.Length = 1 Then
Dim ut As New Utils
sf.SelectionAppearance = tkSelectionAppearance.saDrawingOptions
sf.SelectionDrawingOptions.PointSize = sf.DefaultDrawingOptions.PointSize
sf.SelectionDrawingOptions.PointRotation = sf.DefaultDrawingOptions.PointRotation
sf.SelectionDrawingOptions.PointShape = sf.DefaultDrawingOptions.PointShape
sf.SelectionAppearance = tkSelectionAppearance.saSelectionColor
sf.SelectionColor = ut.ColorByName(tkMapColor.Red)
End If
End If
End If
AxMap.Redraw2(tkRedrawType.RedrawSkipDataLayers)
In fact the mouse position close to shape is recognized, but seems no action to change color.
Can someone else help me ?
Thanks , Daniele