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:
- Initialize directions and map in 4.3.1.
- Set destination using
this.directions.setDestination.
- Set origin using
this.directions.setOrigin.
- 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?