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

Fix onStyleImageMissing not fired in Snapshotter #317

Merged
merged 5 commits into from
Apr 14, 2020
Merged

Conversation

Chaoba
Copy link
Contributor

@Chaoba Chaoba commented Apr 10, 2020

<changelog>Enable adding missing style images on-demand on the map snapshotter.</changelog>

cc: @chloekraw

@@ -111,6 +111,13 @@
* Called when snapshotter finishes loading it's style.
*/
void onDidFinishLoadingStyle();

/**
* Called when shnashotter finds image missing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: snapshotter

Copy link
Contributor

@chloekraw chloekraw Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also recommend expanding on this functionality for folks who aren't familiar with this feature, e.g.:

Called when snapshotter finds that a style image requested is not present on the spritesheet.
This callback provides an opportunity for the developer to add a style image on-demand to the snapshotter.

Perhaps the implementations in JS and iOS would provide an even better reference for us though.

Whatever we document here should also have parity with the documentation for this callback on Map#Observer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced with MapView#OnStyleImageMissingListener

/**
* Called when shnashotter finds image missing.
*
* @param imageName the missing image name
Copy link
Contributor

@chloekraw chloekraw Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we call images "style images" on Android like we do on iOS? that's where the callback name onStyleImageMissing comes from.

cc/ @mapbox/maps-android

@Chaoba Chaoba merged commit 7ca1bcf into master Apr 14, 2020
@Chaoba Chaoba deleted the kl-snapshotter-miss branch April 14, 2020 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants