If gmap.IsInitialized Then
Dim bounds As NativeObject = gmapEx.GetVisibleBounds
Log(bounds)
Dim ne As NativeObject = bounds.GetField("northEast")
Log(ne.GetField("latitude"))
End If
Public Sub GetBoundsNE_SW (bounds As Object) As LatLng()
Dim ne, sw As LatLng
no.RunMethod("getLatLngFromBounds:::", Array(bounds, ne, sw))
Return Array As LatLng(ne, sw)
End Sub
Call it like this:
B4X:
Sub gmap_Click (Point As LatLng)
Dim bounds As Object = gextra.GetVisibleBounds
Dim ne_sw() As LatLng = gextra.GetBoundsNE_SW(bounds)
Log(ne_sw(0))
Log(ne_sw(1))
End Sub
Public Sub GetBoundsNE_SW (bounds As Object) As LatLng()
Dim ne, sw As LatLng
no.RunMethod("getLatLngFromBounds:::", Array(bounds, ne, sw))
Return Array As LatLng(ne, sw)
End Sub
Call it like this:
B4X:
Sub gmap_Click (Point As LatLng)
Dim bounds As Object = gextra.GetVisibleBounds
Dim ne_sw() As LatLng = gextra.GetBoundsNE_SW(bounds)
Log(ne_sw(0))
Log(ne_sw(1))
End Sub