mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
245 stars 93 forks source link

Snapshotter #512

Closed evil159 closed 2 weeks ago

evil159 commented 3 weeks ago

What does this pull request do?

This PR exposes Snapshotter and introduces refactored event handing for MapWidget that is also reused for Snapshotter. Event listeners(map loaded, style loaded, map idle etc.) are no longer being ignored after MapWidget state initialization, they can be updated dynamically.

Based https://github.com/mapbox/mapbox-maps-flutter/pull/386. Addresses https://github.com/mapbox/mapbox-maps-flutter/issues/210, https://github.com/mapbox/mapbox-maps-flutter/issues/279, https://mapbox.atlassian.net/browse/MAPSFLT-159

What is the motivation and context behind this change?

Snapshotter provides a way to get an image snapshot of a map without instantiating a MapWidget

Pull request checklist:

pjleonard37 commented 2 weeks ago

Looks great, @evil159! 📸