Wish MoveToBounds === GoogleMapsExtras

Roger Daley

Well-Known Member
Licensed User
Longtime User
As an addittion to AnimateToBounds it would be handy to have a MoveToBounds event, or possibly a time control added to AnimateToBounds.

IE:
B4X:
Dim MarkerBounds As LatLngBounds=LatLngBoundsBuilder1.Build
    GoogleMapsExtras1.AnimateToBounds(gmap, MarkerBounds, padding, time As Float)

Regards Roger
 

warwound

Expert
Licensed User
Longtime User
Can't you use a combination of GoogleMapsExtras:

AnimateCamera3 (GoogleMap1 As GoogleMap, CameraUpdate1 As CameraUpdate, DurationMs As Int, CancelableCallback1 As CancelableCallback)
Animates the movement of the camera from the current position to the position defined in the CameraUpdate1 over the specified duration.
Raising the CancelableCallback Cancel or Finish event on termination or completion.
Pass Null as the CancelableCallback if not required.


And CameraUpdateFactory:
  • NewLatLngBounds (LatLngBounds1 As LatLngBounds, Padding As Int) As CameraUpdate
  • OR
  • NewLatLngBounds2 (LatLngBounds1 As LatLngBounds, Width As Int, Height As Int, Padding As Int) As CameraUpdate
So you'd create a CameraUpdate using one of those 2 CameraUpdateFactory methods and then use the GoogleMapsExtras AnimateCamera3 method to perform the animation.
 
Top