summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-21 14:52:19 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-24 15:52:28 -0700
commit5dd98df50ba1210b1eef0d8d6655713a725f2995 (patch)
treeb289bb3cbad5d1c3076816f4891a057d6089fc93 /platform/darwin
parent6f708ac5458fe332e25ca398431928b7ff5ba404 (diff)
downloadqtlocation-mapboxgl-5dd98df50ba1210b1eef0d8d6655713a725f2995.tar.gz
[all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers. * Name things appropriately * Use std::unique_ptr
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/src/MGLStyle.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index 0912993825..a4cf8d9cce 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -26,7 +26,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/util/default_styles.hpp>
-#include <mbgl/sprite/sprite_image.hpp>
+#include <mbgl/style/image.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/layers/line_layer.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
@@ -538,7 +538,7 @@ static NSURL *MGLStyleURL_emerald;
format:@"Cannot assign image %@ to a nil name.", image];
}
- self.mapView.mbglMap->addImage([name UTF8String], image.mgl_spriteImage);
+ self.mapView.mbglMap->addImage([name UTF8String], image.mgl_styleImage);
}
- (void)removeImageForName:(NSString *)name
@@ -558,8 +558,8 @@ static NSURL *MGLStyleURL_emerald;
format:@"Cannot get image with nil name."];
}
- auto spriteImage = self.mapView.mbglMap->getImage([name UTF8String]);
- return spriteImage ? [[MGLImage alloc] initWithMGLSpriteImage:spriteImage] : nil;
+ auto styleImage = self.mapView.mbglMap->getImage([name UTF8String]);
+ return styleImage ? [[MGLImage alloc] initWithMGLStyleImage:styleImage] : nil;
}
#pragma mark Style transitions