- static rendering now also runs in a separate thread; you have to start it with map.start(Map::Mode::Static) and join the thread with map.stop() before destructing the Map object - map.renderStill() takes a callback with will be invoked on the *map* thread, so you'll have to figure out your own method of dispatching back to the main thread.
31 lines
549 B
C++
31 lines
549 B
C++
#include <mbgl/map/view.hpp>
|
|
#include <mbgl/map/map.hpp>
|
|
#include <mbgl/map/still_image.hpp>
|
|
|
|
namespace mbgl {
|
|
|
|
void View::initialize(Map *map_) {
|
|
assert(map_);
|
|
map = map_;
|
|
}
|
|
|
|
void View::discard() {
|
|
// no-op
|
|
}
|
|
|
|
std::unique_ptr<StillImage> View::readStillImage() {
|
|
return nullptr;
|
|
}
|
|
|
|
void View::resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight) {
|
|
assert(map);
|
|
map->resize(width, height, ratio, fbWidth, fbHeight);
|
|
}
|
|
|
|
void View::notifyMapChange(MapChange, Duration) {
|
|
// no-op
|
|
}
|
|
|
|
|
|
}
|