title: How to add marker on google map with Kotlin?
body: <p>I am a beginner in Android programming. I want to add a marker at the point by tapping the Map screen. So I have tried coding below. But it doesn't work.</p>
  
  <pre><code>override fun onMapReady(googleMap: GoogleMap) {
      mMap = googleMap
  
      mMap.setOnMapClickListener(object :GoogleMap.OnMapClickListener {
          override fun onMapClick(latlng :LatLng) {
              val location = LatLng(latlng.latitude,latlng.longitude)
              mMap.addMarker(MarkerOptions().position(location))
          }
      })
  }
  </code></pre>