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.

iOS/macOS reusable snapshotter #10038

Closed
Closed

Description

@fabian-guerra

The current status of MBGLSnapshotter does not allow full reuse.

In a chat with @frederoni he confirmed:

It can be reused but the associated MGLMapCamera is transformed to mbgl::CameraOptions upon initializing so pretty much every case you want to reuse it won’t work.

Imagine using a snapshotter when you scroll through a table view.

  • cellWillDisappear/prepareForReuse should cancel the snapshotter
  • but you can’t reuse because the camera is already set. (you can reuse but the region will most likely not be the same)

In order to make it reusable it will require move MGLMapSnapshotOptions to a setter which is an easy task.
The questions would be if it's valuable for developers have a reusable snapshotter and which would be the uses cases for it.

/cc @1ec5 @frederoni @boundsj

Activity

  1. added
    iOS
    on Sep 21, 2017
  2. added
    macOS
    on Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureiOSmacOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions