Prepare for using Thread<MapContext>
This commit is contained in:
@@ -415,6 +415,10 @@ void MapContext::processTasks() {
|
||||
}
|
||||
}
|
||||
|
||||
void MapContext::setDefaultPointAnnotationSymbol(const std::string& symbol) {
|
||||
data.annotationManager.setDefaultPointAnnotationSymbol(symbol);
|
||||
}
|
||||
|
||||
double MapContext::getTopOffsetPixelsForAnnotationSymbol(const std::string& symbol) {
|
||||
assert(Environment::currentlyOn(ThreadType::Map));
|
||||
assert(sprite);
|
||||
@@ -422,6 +426,25 @@ double MapContext::getTopOffsetPixelsForAnnotationSymbol(const std::string& symb
|
||||
return -pos.height / pos.pixelRatio / 2;
|
||||
}
|
||||
|
||||
std::vector<uint32_t> MapContext::addPointAnnotations(const std::vector<LatLng>& points, const std::vector<std::string>& symbols) {
|
||||
auto result = data.annotationManager.addPointAnnotations(points, symbols, data);
|
||||
updateAnnotationTiles(result.first);
|
||||
return result.second;
|
||||
}
|
||||
|
||||
void MapContext::removeAnnotations(const std::vector<uint32_t>& annotations) {
|
||||
auto result = data.annotationManager.removeAnnotations(annotations, data);
|
||||
updateAnnotationTiles(result);
|
||||
}
|
||||
|
||||
std::vector<uint32_t> MapContext::getAnnotationsInBounds(const LatLngBounds& bounds) {
|
||||
return data.annotationManager.getAnnotationsInBounds(bounds, data);
|
||||
}
|
||||
|
||||
LatLngBounds MapContext::getBoundsForAnnotations(const std::vector<uint32_t>& annotations) {
|
||||
return data.annotationManager.getBoundsForAnnotations(annotations);
|
||||
}
|
||||
|
||||
void MapContext::setSourceTileCacheSize(size_t size) {
|
||||
assert(Environment::currentlyOn(ThreadType::Map));
|
||||
if (size != sourceCacheSize) {
|
||||
|
||||
Reference in New Issue
Block a user