Fix bug in BasicMapDemo

This commit is contained in:
Bella Mangunsong 2018-02-14 16:41:53 +11:00 committed by GitHub
parent e041f1827b
commit bc62c4209d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,8 @@ class BasicMapDemoActivity :
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just move the camera to Sydney and add a marker in Sydney.
*/
override fun onMapReady(googleMap: GoogleMap) {
override fun onMapReady(googleMap: GoogleMap?) {
googleMap ?: return
with(googleMap) {
moveCamera(CameraUpdateFactory.newLatLngZoom(SYDNEY, ZOOM_LEVEL))
addMarker(MarkerOptions().position(SYDNEY))