title: Allowing user to place 1 marker on google map only
body: <p>I'm stuck on limiting the number of marker that user can tapped on the Google Map's map</p>
  <p>The problem: Whenever the user tap on google map the marker keeps creating new ones and the old ones does not clear away.</p>
  <p>Update: I think that it does not fall into the else if statement. Because every time the function is called it restart the process. Thus allowing the marker to be create constantly.</p>
  <pre><code>override fun onMapClick(point: LatLng){
  
  val tappedLocation = LatLng(latitude,longitude)
          var mapMarkerCount: Int =0
  
          if(mapMarkerCount == 0) {
              map.addMarker(
                      MarkerOptions()
                              .position(tappedLocation)
                              .title(&quot;You have Clicked&quot;)
  
              )
              
              mapMarkerCount++
  
          }//check Marker Count
          else if(mapMarkerCount == 1){
  
              map.clear()
              mapMarkerCount--
          }
  }
  </code></pre>
  <p>What I have tried is assigning a variable to sort of check the whether the marker has been created.
  and if the marker exists, upon the next tap on the map it is supposed to clear the map and the new marker is at the new location that the user has tapped.</p>