Keep Center on zooming down
[GB.MAP] * BUG: Now the map not move when zooming down
This commit is contained in:
parent
f71115e89b
commit
0d4d7e5d06
@ -133,7 +133,7 @@ Public Sub View_Draw()
|
||||
End
|
||||
|
||||
Public Sub View_MouseWheel()
|
||||
|
||||
Dim hCenter As MapPoint
|
||||
If $bLock Then Return
|
||||
Draw.Begin($hZoomBuffer)
|
||||
Draw.FillRect(0, 0, Draw.Width, Draw.Height, Color.Transparent)
|
||||
@ -144,8 +144,10 @@ Public Sub View_MouseWheel()
|
||||
_ZoomUp(Mouse.X, Mouse.Y)
|
||||
$hMap.Center = Geo.PixelToMapPoint(Point($hMap.PixelBox.X + Mouse.X, $hMap.PixelBox.Y + Mouse.Y), $hmap.Zoom)
|
||||
Else
|
||||
hCenter = MapPoint($hmap.Center.Lat, $hmap.Center.Lon)
|
||||
'$hMap.Center = Geo.PixelToMapPoint(Point($hMap.PixelBox.X - Mouse.X, $hMap.PixelBox.Y - Mouse.Y), $hmap.Zoom)
|
||||
_ZoomDown(Mouse.X, Mouse.Y)
|
||||
$hmap.Center = hCenter
|
||||
Endif
|
||||
|
||||
$hView.Refresh
|
||||
|
@ -21,11 +21,10 @@ Public Sub Form_Open()
|
||||
End With
|
||||
|
||||
|
||||
With MapView1.Map["Poly"]
|
||||
|
||||
With MapView1.Map["Poly"]
|
||||
.AddCircle("pop", MapPoint(48.457454, -4.638139), 2000)
|
||||
.Opacity = 1
|
||||
End With
|
||||
End With
|
||||
With MapView1.Map["Poly"]["pop"]
|
||||
.FillColor = Color.SetAlpha(Color.Yellow, 50)
|
||||
.Color = Color.Red
|
||||
|
Loading…
x
Reference in New Issue
Block a user