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

setStyle's transformStyle: handle a possibility of map being initialized without a style #1824

Conversation

ambientlight
Copy link
Sponsor Contributor

@ambientlight ambientlight commented Nov 7, 2022

Fixes the exception that would be thrown in

if (options.transformStyle && !this.style._loaded) {

when map.setStyle is passed with transformStyle option and map is initialized without an initial style.

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Write tests for all new functionality.
  • Manually test the debug page.
  • Add an entry to CHANGELOG.md under the ## main section.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

Bundle size report:

Size Change: -4 B
Total Size Before: 206 kB
Total Size After: 206 kB

Output file Before After Change
maplibre-gl.js 197 kB 197 kB -4 B
maplibre-gl.css 9.09 kB 9.09 kB 0 B
ℹ️ View Details No major changes

@HarelM
Copy link
Member

HarelM commented Nov 7, 2022

Please add changelog and a test for the map load event.

@ambientlight ambientlight force-pushed the fix/transformStyle-handle-mapInitWithoutStyle branch from 792ead4 to a6cb28b Compare November 8, 2022 04:46
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

Successfully merging this pull request may close these issues.

None yet

2 participants