[glfw] Support mbgl::MapObserver

This commit is contained in:
Bruno de Oliveira Abinader
2017-03-13 14:58:40 +02:00
parent 2a25b026af
commit 2aa20ff471
4 changed files with 0 additions and 26 deletions

View File

@@ -50,10 +50,4 @@ void HeadlessBackend::invalidate() {
assert(false);
}
void HeadlessBackend::notifyMapChange(MapChange change) {
if (mapChangeCallback) {
mapChangeCallback(change);
}
}
} // namespace mbgl

View File

@@ -18,9 +18,6 @@ public:
~HeadlessBackend() override;
void invalidate() override;
void notifyMapChange(MapChange) override;
void setMapChangeCallback(std::function<void(MapChange)>&& cb) { mapChangeCallback = std::move(cb); }
struct Impl {
virtual ~Impl() {}
@@ -45,8 +42,6 @@ private:
bool extensionsLoaded = false;
bool active = false;
std::function<void(MapChange)> mapChangeCallback;
};
} // namespace mbgl

View File

@@ -538,16 +538,6 @@ void GLFWView::setWindowTitle(const std::string& title) {
glfwSetWindowTitle(window, (std::string { "Mapbox GL: " } + title).c_str());
}
void GLFWView::setMapChangeCallback(std::function<void(mbgl::MapChange)> callback) {
this->mapChangeCallback = callback;
}
void GLFWView::notifyMapChange(mbgl::MapChange change) {
if (mapChangeCallback) {
mapChangeCallback(change);
}
}
namespace mbgl {
namespace platform {

View File

@@ -60,9 +60,6 @@ private:
// Internal
void report(float duration);
void setMapChangeCallback(std::function<void(mbgl::MapChange)> callback);
void notifyMapChange(mbgl::MapChange change) override;
mbgl::Color makeRandomColor() const;
mbgl::Point<double> makeRandomPoint() const;
static std::shared_ptr<const mbgl::SpriteImage>
@@ -81,8 +78,6 @@ private:
mbgl::AnnotationIDs annotationIDs;
std::vector<std::string> spriteIDs;
std::function<void(mbgl::MapChange)> mapChangeCallback;
private:
mbgl::Map* map = nullptr;