Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add support for runtime styling when snapshotting #9914

Closed
frederoni opened this issue Sep 5, 2017 · 6 comments
Closed

Add support for runtime styling when snapshotting #9914

frederoni opened this issue Sep 5, 2017 · 6 comments
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS

Comments

@frederoni
Copy link
Contributor

frederoni commented Sep 5, 2017

Now that snapshots landed in Android/Core #9748 & iOS/macOS #9891, let's take it one step further by exposing runtime styling to the snapshotters:

On the iOS/macOS side, I'd propose something along these lines:

[snapshotter startWithStyleHandler:^(MGLStyle *style) {
    [style addLayer:polyline];
    [style addSource:source];
} completionHandler:^(UIImage *snapshot, NSError *error) {
    
}];

@ivovandongen @fabian-guerra @tobrun

@frederoni frederoni added Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS labels Sep 5, 2017
@1ec5
Copy link
Contributor

1ec5 commented Sep 6, 2017

On iOS/macOS, would chaining operations to the snapshot’s start require something along the lines of #6386?

@frederoni
Copy link
Contributor Author

frederoni commented Sep 6, 2017

@1ec5 #6386 would probably come in handy. I figured modifying the style later would make more sense when being used in a scroll view instead of allocating a map view and style upon initialization but I don't have any strong opinion about that at this point.

This was referenced Sep 12, 2017
@1ec5
Copy link
Contributor

1ec5 commented Oct 4, 2017

If this feature is implemented, we’d be able to conditionally enable transparency in snapshots (#10118) based on whether the background style layer is transparent.

@stale
Copy link

stale bot commented Dec 3, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Dec 3, 2018
@tobrun tobrun reopened this Dec 3, 2018
@stale stale bot removed the archived Archived because of inactivity label Dec 3, 2018
@tobrun tobrun modified the milestone: android-v8.0.0 Mar 25, 2019
@stale stale bot added the archived Archived because of inactivity label Mar 7, 2020
@stale
Copy link

stale bot commented Mar 7, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Mar 7, 2020
@1ec5 1ec5 reopened this Mar 7, 2020
@stale stale bot removed the archived Archived because of inactivity label Mar 7, 2020
@1ec5
Copy link
Contributor

1ec5 commented Mar 7, 2020

Fixed in #16268. mapbox/mapbox-gl-native-android#220 tracks hooking the feature up on Android. mapbox/mapbox-gl-native-ios#200 tracks hooking the feature up on iOS and macOS.

@1ec5 1ec5 closed this as completed Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

No branches or pull requests

3 participants