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

[core] style loaded signal - #6371

Merged
ivovandongen merged 1 commit into
masterfrom
4527-style-loaded-signal
Sep 20, 2016
Merged

ivovandongen merged 1 commit into
masterfrom
4527-style-loaded-signal

Conversation

@ivovandongen

Copy link
Copy Markdown
Contributor

Fixes #4527

Needed to properly time callbacks in #6032

@ivovandongen ivovandongen added the Core The cross-platform C++ core, aka mbgl label Sep 19, 2016
@ivovandongen ivovandongen self-assigned this Sep 19, 2016
@mention-bot

Copy link
Copy Markdown

@ivovandongen, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @1ec5 and @incanus to be potential reviewers.

@tmpsantos tmpsantos changed the title 4527 style loaded signal [core] style loaded signal Sep 19, 2016
Comment thread src/mbgl/map/map.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably need a signal for style loading failures. In case of parsing error, the MapChangeDidFinishLoadingStyle will be emitted here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In that case, does it make more sense to add the signals to the Style itself?

In https://github.com/mapbox/mapbox-gl-native/blob/master/src/mbgl/style/style.cpp#L95 we can best check for parse errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, I think so.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tmpsantos to keep things clean, I've added a method to the observer on Style and kept the signal emitting in Map.

@ivovandongen
ivovandongen force-pushed the 4527-style-loaded-signal branch from ad801d7 to c51baaa Compare September 19, 2016 13:59
Comment thread test/map/map.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to redefine this callback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point...

@ivovandongen
ivovandongen force-pushed the 4527-style-loaded-signal branch from c51baaa to 5688526 Compare September 19, 2016 14:45
@ivovandongen
ivovandongen force-pushed the 4527-style-loaded-signal branch from 5688526 to 2f62f97 Compare September 19, 2016 15:02
@ivovandongen

Copy link
Copy Markdown
Contributor Author

@tmpsantos I've committed the changes you requested. Let me know if there's anything else or that it can be merged.

@tmpsantos

Copy link
Copy Markdown
Contributor

:shipit:

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

Labels

Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants