Created
June 27, 2020 20:02
-
-
Save utsmannn/ff2428575d25b6c68e87d0876fbd8294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(map_view as SupportMapFragment).getMapAsync { map -> | |
// move camera ke jakarta | |
map.moveCamera(CameraUpdateFactory.newLatLngZoom(jakartaLatLng, 18f)) | |
// get old position camera | |
val oldPosition = map.cameraPosition.target | |
map.setOnCameraMoveStartedListener { | |
// drag started | |
} | |
map.setOnCameraIdleListener { | |
// get new position setelah di drag | |
val newPosition = map.cameraPosition.target | |
if (newPosition != oldPosition) { | |
// drag ended | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment