Skip to content

Regression in 4.3.1: this.directions.setDestination and this.directions.setOrigin no longer populate sources.directions #321

Description

@Joso997

In version 4.2.0, calling the following:

this.directions.setDestination(this.destinationLocation);
this.directions.setOrigin([e.coords.longitude, e.coords.latitude]);

console.log(this.directions);
console.log(this.map.getStyle().sources.directions.data);

Correctly populates sources.directions with two features.

However, after upgrading to 4.3.1, this behavior has changed. The same calls no longer populate sources.directions as expected.

Expected Behavior:

  • After setting the destination and origin, the sources.directions should contain two features.

Actual Behavior:

  • In 4.3.1, sources.directions remains empty or does not populate as it did in 4.2.0.

Steps to Reproduce:

  1. Initialize directions and map in 4.3.1.
  2. Set destination using this.directions.setDestination.
  3. Set origin using this.directions.setOrigin.
  4. Check the contents of sources.directions using console.log(this.map.getStyle().sources.directions.data).

Workaround:

Provide any workaround you've found, or indicate none if not available.

Environment:

  • Version: 4.3.1
  • Browser/Device: [Add details]

Could you investigate the change between versions and provide guidance on the correct way to populate sources.directions in 4.3.1?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions