[glfw] No longer necessary to wait for style load to add default marker

This commit is contained in:
John Firebaugh
2015-11-19 16:44:19 -08:00
parent e1091db45e
commit 622f6691b7
2 changed files with 1 additions and 9 deletions

View File

@@ -20,7 +20,6 @@ public:
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;
@@ -62,7 +61,6 @@ private:
std::vector<std::string> spriteIDs;
private:
bool initializedDefaultMarker = false;
bool fullscreen = false;
const bool benchmark = false;
bool tracking = false;

View File

@@ -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) {