maplibre / maplibre-gl-directions

A plugin to show routing directions on a MapLibre GL JS map
https://maplibre.org/maplibre-gl-directions/
MIT License
72 stars 16 forks source link

Feature: Allow hover effects and route switching in non-interactive mode #217

Closed Fsss126 closed 8 months ago

Fsss126 commented 8 months ago

This PR adds foolowing changes to the public API:

  1. hoverable flag. Allows hover effects in non-interactive mode. Can be set to true while interactive is false for the features to be highlighted when hovered over by the user. Does nothing when interactive is true.
  2. allowRouteSwitch flag. Allows user to switch to alternative routes while in non-interactive mode. Only takes effect when hoverable is true.