Skip to content

Instantly share code, notes, and snippets.

View iRYO400's full-sized avatar
🎄
Focusing

Akbolat Sadvakassov iRYO400

🎄
Focusing
  • Almaty, Kazakhstan
View GitHub Profile
@iRYO400
iRYO400 / a_snippet1_1.txt
Last active July 17, 2018 07:28
A-snippet #1 - Smoothing Marker rotating in Google Maps
/**
* Smooth rotating my location marker arrow
* @param marker - marker itself
* @param newBearing - new direction to rotate
*/
private fun changeBearingSmoothly(marker: Marker?, newBearing: Float) {
if (marker == null) {
return
}
val animation = ValueAnimator.ofFloat(0f, 100f)
@iRYO400
iRYO400 / a_snippet1.txt
Last active July 17, 2018 07:28
A-snippet #1 - Smoothing Marker moving in Google Maps
/**
* Smooth moving my location marker arrow
* @param marker - marker itself
* @param newLatLng - new location to move
*/
private fun changePositionSmoothly(marker: Marker?, newLatLng: LatLng) {
if (marker == null) {
return
}
val animation = ValueAnimator.ofFloat(0f, 100f)