title: Mapbox GL js touchend geo-coordinate not coverting to number in ionic
body: <p>I'm trying to display a marker in mapbox GL js when the user touch the screen and the marker display on that coordinate. The marker.setLngLat() method takes a array of coordinate in a number format which i have passed but in console log it give error of NaN. </p>
  
  <p>Here are my codes,</p>
  
  <pre><code>updatelocation(){
      this.map.on('touchend',function(e) {
        console.log(JSON.stringify(e.lngLat));
        this.longitude = parseFloat(e.lngLat.lng);
        this.latitude = parseFloat(e.lngLat.lat);
  
      });
  
      this.marker.setLngLat([this.longitude,this.latitude]).addTo(this.map);
  
    }
  </code></pre>
  
  <p>And here is the error
  <a href="https://i.stack.imgur.com/qETL5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qETL5.png" alt="enter image description here"></a></p>
  
  <p>Can someone help me, i am really stuck.</p>