I want zoomin and zoomout map using trackbar, But its keep zooming with random scale.
Can you guys help me with this?
thankyou very much.
I set trackbar value 0 to 10
Here is my code :
Dim newScale As Double = TrackBar1.Value
Dim defz As Integer
If newScale = zoomScale Then
Can you guys help me with this?
thankyou very much.
I set trackbar value 0 to 10
Here is my code :
Dim newScale As Double = TrackBar1.Value
Dim defz As Integer
If newScale = zoomScale Then
MainMap.ZoomToMaxExtents()
defz = MainMap.ZoomPercent
' MsgBox(defz)
ScaleCombobox.Text = "1 : " & SetMapScale() & " Km"
scaleLabel.Text = "1 : " & SetMapScale() & " Km"
ElseIf newScale < zoomScale Then
'MainMap.ZoomOut(TrackBar1.Value * 0.05)
MainMap.ZoomOut((TrackBar1.Value / 10) * 0.3)
zoomScale = 5
ScaleCombobox.Text = "1 : " & SetMapScale() & " Km"
scaleLabel.Text = "1 : " & SetMapScale() & " Km"
ElseIf newScale > zoomScale Then
'MainMap.ZoomIn(TrackBar1.Value * 0.05)
MainMap.ZoomIn((TrackBar1.Value / 10) * 0.3)
zoomScale = 5
ScaleCombobox.Text = "1 : " & SetMapScale() & " Km"
scaleLabel.Text = "1 : " & SetMapScale() & " Km"
End If