I'm struggling to simulate a click on the map. Here is my code.
map.fire('click', function ()
{
newDropoff({lng: 27.4199870950609,lat: 53.240419723523775});
updateDropoffs(dropoffs);
})
The original code is taken from this guide
map.on('click', function (e) {
// When the map is clicked, add a new drop off point
// and update the `dropoffs-symbol` layer
newDropoff(map.unproject(e.point));
updateDropoffs(dropoffs);
});
Does anyone know what should be corrected in my code? PS I've checked other sources already