mapbox / mapbox-gl-directions

Directions plugin for mapbox-gl-js using Mapbox Directions API.
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/
ISC License
235 stars 124 forks source link

setOrigin and setDestination on click #275

Open imnotabr opened 3 years ago

imnotabr commented 3 years ago

The default behavior for the directions feature is that it sets an origin and a destination for the directions where you click when you click on the map layer. I want to disable this feature.

How do you turn it off?

imnotabr commented 3 years ago

If you comment out function _onSingleClick(e) {} in mapbox-gl-directions.js it disables the feature.

But is there another approach to disable it without modifying the JS file?