mapbox / mapbox/mapbox-gl-directions
Displaying waypoints as they are in google maps
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 255
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description

I am setting the waypoints. They are applied but not displayed as it is on the google map (point B). Does mapbox support displaying waypoints? And if it does, then how is it possible?
I also tried changing style objects: `directions-waypoint-point` and `directions-waypoint-point-casing`, but useless.
Implementation:
```
this.map = new mapboxgl.Map({container: 'map'});
this.map.on('load', () => {
const directions = new MapboxDirections({
accessToken: this.accessToken,
unit: 'metric',
profile: 'mapbox/driving',
flyTo: false,
controls: {
inputs: false,
instructions: false,
profileSwitcher: false
}
});
directions.setOrigin([this.startLng, this.startLat]);
directions.removeWaypoint(0);
if (this.wayPoints && this.wayPoints.length) {
this.wayPoints.forEach((w, i) => {
directions.addWaypoint(i, [w.lon, w.lat]);
});
}
directions.setDestination([this.endLng, this.endLat]);
this.map.addControl(directions);
});
```
Request:
```https://api.mapbox.com/directions/v5/mapbox/driving/44.827095%2C41.715137%3B44.108409882%2C41.985412598%3B41.636745%2C41.616756.json?steps=true&overview=full&geometries=polyline&access_token=```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported route with MapboxDirections using the shown setOrigin, addWaypoint, and setDestination calls, then inspect the directions-waypoint-point and directions-waypoint-point-casing styles. Compare the rendered waypoints with the supplied Google Maps image and the Directions API request. Done means documenting or implementing a supported way to display the waypoints as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100