Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Joso997 opened this issue Sep 17, 2024 · 0 comments

Comments

@Joso997
Copy link

Joso997 commented Sep 17, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant