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

Add support for runtime styling when snapshotting #9914

Closed

Description

@frederoni

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

Activity

  1. added
    Android
    Core
    iOS
    macOS
    on Sep 5, 2017
  2. 1ec5 commented on Sep 6, 2017

    @1ec5
    Contributor

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

  3. frederoni commented on Sep 6, 2017

    @frederoni
    ContributorAuthor

    @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.

  4. 1ec5 commented on Oct 4, 2017

    @1ec5
    Contributor

    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.

  5. added
    archived
    on Nov 3, 2018
  6. stale commented on Dec 3, 2018

    @stale

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

  7. reopened this on Dec 3, 2018
  8. removed
    archived
    on Dec 3, 2018
  9. modified the milestone: android-v8.0.0 on Mar 25, 2019
  10. added
    archived
    on Mar 7, 2020
  11. stale commented on Mar 7, 2020

    @stale

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

  12. reopened this on Mar 7, 2020
  13. removed
    archived
    on Mar 7, 2020
  14. 1ec5 commented on Mar 7, 2020

    @1ec5
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidCoreiOSmacOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions