title: Click on markers mapbox
body: <p>I have it so that clicking on the map creates a marker at that point. I am trying to add an event to the markers that will return the lnglat when the marker is clicked. The issue is I can't click the marker, the map just keeps creating new markers. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>map.on('click', function(e){
      let marker = new mapboxgl.Marker().setLngLat(e.lngLat).addTo(map);
      marker.on('click', function(){
          console.log('hello');
      });
  });</code></pre>
  </div>
  </div>
  </p>