HRCarMarkerAnimation

Additional

Language
Java
Version
N/A
Created
Jul 29, 2019
Updated
Jul 29, 2019
Owner
TecOrb Technologies (TecOrb-Developers)
Contributors
TecOrb Technologies (TecOrb-Developers)
HafijurSaif
2
Activity
Badge
Generate
Download
Source code

Promotion

HRCarMarkerAnimation

Smooth marker animation on google map along with proper turns and camera bearing.




duration refers to the animation time. By default it will take 1000. callback is the interface of Googlemap UpdatedLoation Callback return Old location. It requires when the user wants to animate the next animation after the first has finished.

The isMarkerVisible method return true or false if marker is visible on user device screen then it return false whenever the marker is not visible means outside the screen then it automatically animate to center of the screen

For eg-

privateboolean isMarkerVisible(GoogleMap googleMap, LatLng newLocation) { return googleMap.getProjection().getVisibleRegion().latLngBounds.contains(newLocation); }

Note: If you are animating car onLocationChanged() then, Ideal location request for car animation should be as below. Greater than the interval mentioned will give more good results but less than this may hamper the animation.

 mLocationRequest =newLocationRequest();
 mLocationRequest.setInterval(1000*5);
 mLocationRequest.setFastestInterval(1000*3);
 mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);