Отображение путевых точек в Mapbox, как они есть на картах Google - PullRequest
0 голосов
/ 30 октября 2019

enter image description here

Я задаю путевую точку, но она не отображается так, как на карте Google (точка B). Поддерживает ли mapbox отображение путевых точек? И если это так, то как это возможно?

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]);
    if (this.wayPoints && this.wayPoints.length) {
      directions.removeWaypoint(0);
      this.wayPoints.forEach((w, i) => {
        directions.addWaypoint(i, [w.lon, w.lat]);
      });
    }
    directions.setDestination([this.endLng, this.endLat]);
    this.map.addControl(directions);
});
...