diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-21 14:52:19 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-24 15:52:28 -0700 |
commit | 5dd98df50ba1210b1eef0d8d6655713a725f2995 (patch) | |
tree | b289bb3cbad5d1c3076816f4891a057d6089fc93 /platform/ios/src/MGLMapView.mm | |
parent | 6f708ac5458fe332e25ca398431928b7ff5ba404 (diff) | |
download | qtlocation-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/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 01611e03f2..42079baf94 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -8,7 +8,6 @@ #include <mbgl/map/map.hpp> #include <mbgl/map/view.hpp> #include <mbgl/annotation/annotation.hpp> -#include <mbgl/sprite/sprite_image.hpp> #include <mbgl/map/camera.hpp> #include <mbgl/map/mode.hpp> #include <mbgl/util/platform.hpp> @@ -16,6 +15,7 @@ #include <mbgl/util/default_thread_pool.hpp> #include <mbgl/storage/default_file_source.hpp> #include <mbgl/storage/network_status.hpp> +#include <mbgl/style/image.hpp> #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/custom_layer.hpp> #include <mbgl/map/backend.hpp> @@ -3451,8 +3451,7 @@ public: annotationImage.delegate = self; // add sprite - std::shared_ptr<mbgl::SpriteImage> sprite(annotationImage.image.mgl_spriteImage); - _mbglMap->addAnnotationIcon(iconIdentifier.UTF8String, sprite); + _mbglMap->addAnnotationImage(iconIdentifier.UTF8String, annotationImage.image.mgl_styleImage); // Create a slop area with a “radius” equal in size to the annotation // image’s alignment rect, allowing the eventual tap to be on any point @@ -4096,7 +4095,7 @@ public: // Remove the old icon from the style. if ( ! [iconIdentifier isEqualToString:fallbackIconIdentifier]) { - _mbglMap->removeAnnotationIcon(iconIdentifier.UTF8String); + _mbglMap->removeAnnotationImage(iconIdentifier.UTF8String); } if (annotationImage.image) |