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

Commit

Permalink
[glfw] No longer necessary to wait for style load to add default marker
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Nov 30, 2015
1 parent 44f56dd commit 2ff3a5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions include/mbgl/platform/default/glfw_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class GLFWView : public mbgl::View {
std::array<uint16_t, 2> getFramebufferSize() const override;

void initialize(mbgl::Map *map) override;
void notifyMapChange(mbgl::MapChange) override;
void activate() override;
void deactivate() override;
void notify() override;
Expand Down Expand Up @@ -62,7 +61,6 @@ class GLFWView : public mbgl::View {
std::vector<std::string> spriteIDs;

private:
bool initializedDefaultMarker = false;
bool fullscreen = false;
const bool benchmark = false;
bool tracking = false;
Expand Down
8 changes: 1 addition & 7 deletions platform/default/glfw_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,7 @@ GLFWView::~GLFWView() {

void GLFWView::initialize(mbgl::Map *map_) {
View::initialize(map_);
}

void GLFWView::notifyMapChange(mbgl::MapChange change) {
if (change == mbgl::MapChange::MapChangeDidFinishLoadingMap && !initializedDefaultMarker) {
initializedDefaultMarker = true;
map->setSprite("default_marker", makeSpriteImage(22, 22, 1));
}
map->setSprite("default_marker", makeSpriteImage(22, 22, 1));
}

void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, int mods) {
Expand Down

0 comments on commit 2ff3a5e

Please sign in to comment.