summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-22 13:28:09 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-26 11:21:56 -0700
commitaa216d00254c18f7b5903026ab1a489ae7797dd8 (patch)
tree7decb42cb0f8a8a5ae0e9d3bdcfdf69e76949e15 /src/mbgl/map/map.cpp
parent6cf9d5cfbfe8120121d8d53cbbf8915cea8f4879 (diff)
downloadqtlocation-mapboxgl-aa216d00254c18f7b5903026ab1a489ae7797dd8.tar.gz
[core] Don't use a separate SpriteAtlas for annotation images
Instead, just add them to the Style as needed. Includes changes from #8905 and takes care to avoid regressing #3817.
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r--src/mbgl/map/map.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 14a2401ed5..a24e798fb9 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -278,8 +278,7 @@ void Map::Impl::render(View& view) {
painter->render(*style,
frameData,
- view,
- annotationManager->getSpriteAtlas());
+ view);
painter->cleanup();
@@ -312,8 +311,7 @@ void Map::Impl::render(View& view) {
painter->render(*style,
frameData,
- view,
- annotationManager->getSpriteAtlas());
+ view);
auto request = std::move(stillImageRequest);
request->callback(nullptr);
@@ -790,10 +788,12 @@ LatLng Map::latLngForPixel(const ScreenCoordinate& pixel) const {
void Map::addAnnotationImage(std::unique_ptr<style::Image> image) {
impl->annotationManager->addImage(std::move(image));
+ impl->onUpdate(Update::AnnotationStyle);
}
void Map::removeAnnotationImage(const std::string& id) {
impl->annotationManager->removeImage(id);
+ impl->onUpdate(Update::AnnotationStyle);
}
double Map::getTopOffsetPixelsForAnnotationImage(const std::string& id) {