diff options
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/mbgl/storage/reachability.h | 95 | ||||
-rw-r--r-- | platform/darwin/mbgl/storage/reachability.m (renamed from platform/darwin/src/reachability.m) | 2 | ||||
-rw-r--r-- | platform/darwin/scripts/generate-style-code.js | 21 | ||||
-rw-r--r-- | platform/darwin/src/MGLSource_Private.h | 1 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyle.mm | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyle_Private.h | 1 | ||||
-rw-r--r-- | platform/darwin/src/NSDate+MGLAdditions.h | 1 | ||||
-rw-r--r-- | platform/darwin/src/NSExpression+MGLAdditions.mm | 2 | ||||
-rw-r--r-- | platform/darwin/src/headless_backend_cgl.cpp | 64 | ||||
-rw-r--r-- | platform/darwin/src/headless_backend_eagl.mm | 44 | ||||
-rw-r--r-- | platform/darwin/src/headless_display_cgl.cpp | 52 | ||||
-rw-r--r-- | platform/darwin/src/image.mm | 22 | ||||
-rw-r--r-- | platform/darwin/src/logging_nslog.mm (renamed from platform/darwin/src/log_nslog.mm) | 2 | ||||
-rw-r--r-- | platform/darwin/src/nsthread.mm | 2 | ||||
-rw-r--r-- | platform/darwin/src/string_nsstring.mm | 2 | ||||
-rw-r--r-- | platform/darwin/test/MGLFeatureTests.mm | 2 | ||||
-rw-r--r-- | platform/darwin/test/MGLStyleLayerTests.xib | 4 |
17 files changed, 249 insertions, 75 deletions
diff --git a/platform/darwin/mbgl/storage/reachability.h b/platform/darwin/mbgl/storage/reachability.h new file mode 100644 index 0000000000..78e302eafc --- /dev/null +++ b/platform/darwin/mbgl/storage/reachability.h @@ -0,0 +1,95 @@ +/* + Copyright (c) 2011, Tony Million. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Foundation/Foundation.h> +#import <SystemConfiguration/SystemConfiguration.h> + + +/** + * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. + * + * @see http://nshipster.com/ns_enum-ns_options/ + **/ +#ifndef NS_ENUM +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +extern NSString *const kMGLReachabilityChangedNotification; + +typedef NS_ENUM(NSInteger, NetworkStatus) { + // Apple NetworkStatus Compatible Names. + NotReachable = 0, + ReachableViaWiFi = 2, + ReachableViaWWAN = 1 +}; + +@class MGLReachability; + +typedef void (^NetworkReachable)(MGLReachability * reachability); +typedef void (^NetworkUnreachable)(MGLReachability * reachability); + + +@interface MGLReachability : NSObject + +@property (nonatomic, copy) NetworkReachable reachableBlock; +@property (nonatomic, copy) NetworkUnreachable unreachableBlock; + +@property (nonatomic, assign) BOOL reachableOnWWAN; + + ++(instancetype)reachabilityWithHostname:(NSString*)hostname; +// This is identical to the function above, but is here to maintain +//compatibility with Apples original code. (see .m) ++(instancetype)reachabilityWithHostName:(NSString*)hostname; ++(instancetype)reachabilityForInternetConnection; ++(instancetype)reachabilityWithAddress:(void *)hostAddress; ++(instancetype)reachabilityForLocalWiFi; + +-(instancetype)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; + +-(BOOL)startNotifier; +-(void)stopNotifier; + +-(BOOL)isReachable; +-(BOOL)isReachableViaWWAN; +-(BOOL)isReachableViaWiFi; + +// WWAN may be available, but not active until a connection has been established. +// WiFi may require a connection for VPN on Demand. +-(BOOL)isConnectionRequired; // Identical DDG variant. +-(BOOL)connectionRequired; // Apple's routine. +// Dynamic, on demand connection? +-(BOOL)isConnectionOnDemand; +// Is user intervention required? +-(BOOL)isInterventionRequired; + +-(NetworkStatus)currentReachabilityStatus; +-(SCNetworkReachabilityFlags)reachabilityFlags; +-(NSString*)currentReachabilityString; +-(NSString*)currentReachabilityFlags; + +@end diff --git a/platform/darwin/src/reachability.m b/platform/darwin/mbgl/storage/reachability.m index 8abcf5ae6d..aa6746a2a9 100644 --- a/platform/darwin/src/reachability.m +++ b/platform/darwin/mbgl/storage/reachability.m @@ -25,7 +25,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -#import <mbgl/platform/darwin/reachability.h> +#import <mbgl/storage/reachability.h> #import <sys/socket.h> #import <netinet/in.h> diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index b5689dca3a..6b54b5219b 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -4,6 +4,9 @@ const fs = require('fs'); const ejs = require('ejs'); const _ = require('lodash'); const colorParser = require('csscolorparser'); + +require('../../../scripts/style-code'); + const cocoaConventions = require('./style-spec-cocoa-conventions-v8.json'); let spec = _.merge(require('mapbox-gl-style-spec').latest, require('./style-spec-overrides-v8.json')); const prefix = 'MGL'; @@ -18,18 +21,6 @@ _.forOwn(cocoaConventions, function (properties, kind) { }) }); -global.camelize = function (str) { - return str.replace(/(?:^|-)(.)/g, function (_, x) { - return x.toUpperCase(); - }); -}; - -global.camelizeWithLeadingLowercase = function (str) { - return str.replace(/-(.)/g, function (_, x) { - return x.toUpperCase(); - }); -}; - global.objCName = function (property) { return camelizeWithLeadingLowercase(property.name); } @@ -371,9 +362,9 @@ for (var layer of layers) { const containsEnumerationProperties = _.filter(layer.layoutProperties, function(property){ return property["type"] === "enum"; }).length || _.filter(layer.paintProperties, function(property){ return property["type"] === "enum"; }).length; layer.containsEnumerationProperties = containsEnumerationProperties; - fs.writeFileSync(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.h`, duplicatePlatformDecls(layerH(layer))); - fs.writeFileSync(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.mm`, layerM(layer)); - fs.writeFileSync(`platform/darwin/test/${prefix}${camelize(layer.type)}${suffix}Tests.m`, testLayers(layer)); + writeIfModified(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.h`, duplicatePlatformDecls(layerH(layer))); + writeIfModified(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.mm`, layerM(layer)); + writeIfModified(`platform/darwin/test/${prefix}${camelize(layer.type)}${suffix}Tests.m`, testLayers(layer)); } fs.writeFileSync(`platform/darwin/src/NSValue+MGLStyleEnumAttributeAdditions.h`, categoryH({ diff --git a/platform/darwin/src/MGLSource_Private.h b/platform/darwin/src/MGLSource_Private.h index d360e71f3c..5f63f1fb1d 100644 --- a/platform/darwin/src/MGLSource_Private.h +++ b/platform/darwin/src/MGLSource_Private.h @@ -1,6 +1,5 @@ #import "MGLSource.h" -#include <mbgl/mbgl.hpp> #include <mbgl/style/source.hpp> @class MGLMapView; diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm index 56dc4ad8f7..6116f4df28 100644 --- a/platform/darwin/src/MGLStyle.mm +++ b/platform/darwin/src/MGLStyle.mm @@ -31,7 +31,6 @@ #include <mbgl/style/sources/geojson_source.hpp> #include <mbgl/style/sources/vector_source.hpp> #include <mbgl/style/sources/raster_source.hpp> -#include <mbgl/mbgl.hpp> #if TARGET_OS_IPHONE #import "UIImage+MGLAdditions.h" @@ -65,7 +64,11 @@ static_assert(mbgl::util::default_styles::currentVersion == MGLStyleDefaultVersi } \ \ + (NSURL *)name##StyleURL##WithVersion:(NSInteger)version { \ - return [NSURL URLWithString:[@"mapbox://styles/mapbox/" #fileName "-v" stringByAppendingFormat:@"%li", (long)version]]; \ + if (mbgl::util::default_styles::currentVersion == version) { \ + return [NSURL URLWithString:@(mbgl::util::default_styles::name.url)]; \ + } else { \ + return [NSURL URLWithString:[@"mapbox://styles/mapbox/" #fileName "-v" stringByAppendingFormat:@"%li", (long)version]]; \ + } \ } MGL_DEFINE_STYLE(streets, streets) diff --git a/platform/darwin/src/MGLStyle_Private.h b/platform/darwin/src/MGLStyle_Private.h index b7c2fa4cdb..002be884e4 100644 --- a/platform/darwin/src/MGLStyle_Private.h +++ b/platform/darwin/src/MGLStyle_Private.h @@ -3,7 +3,6 @@ #import "MGLStyleLayer.h" #import "MGLFillStyleLayer.h" #import <mbgl/util/default_styles.hpp> -#include <mbgl/mbgl.hpp> @interface MGLStyle (Private) diff --git a/platform/darwin/src/NSDate+MGLAdditions.h b/platform/darwin/src/NSDate+MGLAdditions.h index a116ef32de..918aae233f 100644 --- a/platform/darwin/src/NSDate+MGLAdditions.h +++ b/platform/darwin/src/NSDate+MGLAdditions.h @@ -1,6 +1,5 @@ #import <Foundation/Foundation.h> -#include <mbgl/mbgl.hpp> #include <mbgl/util/chrono.hpp> @interface NSDate (MGLAdditions) diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index 392a6d7f5b..25a2945cfb 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -72,7 +72,7 @@ NSNumber *number = (NSNumber *)value; if ((strcmp([number objCType], @encode(char)) == 0) || (strcmp([number objCType], @encode(BOOL)) == 0)) { - return mbglValue.get<bool>(); + return uint64_t(mbglValue.get<bool>()); } else if ( strcmp([number objCType], @encode(double)) == 0 || strcmp([number objCType], @encode(float)) == 0) { return mbglValue.get<double>(); diff --git a/platform/darwin/src/headless_backend_cgl.cpp b/platform/darwin/src/headless_backend_cgl.cpp index 4ca567f55c..7069738fb1 100644 --- a/platform/darwin/src/headless_backend_cgl.cpp +++ b/platform/darwin/src/headless_backend_cgl.cpp @@ -1,6 +1,7 @@ -#include <mbgl/platform/default/headless_backend.hpp> -#include <mbgl/platform/default/headless_display.hpp> +#include <mbgl/gl/headless_backend.hpp> +#include <mbgl/gl/headless_display.hpp> +#include <OpenGL/OpenGL.h> #include <CoreFoundation/CoreFoundation.h> #include <string> @@ -8,6 +9,33 @@ namespace mbgl { +struct CGLImpl : public HeadlessBackend::Impl { + CGLImpl(CGLContextObj glContext_) : glContext(glContext_) { + } + + ~CGLImpl() { + CGLDestroyContext(glContext); + } + + void activateContext() final { + CGLError error = CGLSetCurrentContext(glContext); + if (error != kCGLNoError) { + throw std::runtime_error(std::string("Switching OpenGL context failed:") + + CGLErrorString(error) + "\n"); + } + } + + void deactivateContext() final { + CGLError error = CGLSetCurrentContext(nullptr); + if (error != kCGLNoError) { + throw std::runtime_error(std::string("Removing OpenGL context failed:") + + CGLErrorString(error) + "\n"); + } + } + + CGLContextObj glContext = nullptr; +}; + gl::glProc HeadlessBackend::initializeExtension(const char* name) { static CFBundleRef framework = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); if (!framework) { @@ -21,8 +49,18 @@ gl::glProc HeadlessBackend::initializeExtension(const char* name) { return reinterpret_cast<gl::glProc>(symbol); } +bool HeadlessBackend::hasDisplay() { + if (!display) { + display.reset(new HeadlessDisplay); + } + return bool(display); +} + void HeadlessBackend::createContext() { - CGLError error = CGLCreateContext(display->pixelFormat, nullptr, &glContext); + assert(!hasContext()); + + CGLContextObj glContext = nullptr; + CGLError error = CGLCreateContext(display->attribute<CGLPixelFormatObj>(), nullptr, &glContext); if (error != kCGLNoError) { throw std::runtime_error(std::string("Error creating GL context object:") + CGLErrorString(error) + "\n"); @@ -33,26 +71,8 @@ void HeadlessBackend::createContext() { throw std::runtime_error(std::string("Error enabling OpenGL multithreading:") + CGLErrorString(error) + "\n"); } -} - -void HeadlessBackend::destroyContext() { - CGLDestroyContext(glContext); -} - -void HeadlessBackend::activateContext() { - CGLError error = CGLSetCurrentContext(glContext); - if (error != kCGLNoError) { - throw std::runtime_error(std::string("Switching OpenGL context failed:") + - CGLErrorString(error) + "\n"); - } -} -void HeadlessBackend::deactivateContext() { - CGLError error = CGLSetCurrentContext(nullptr); - if (error != kCGLNoError) { - throw std::runtime_error(std::string("Removing OpenGL context failed:") + - CGLErrorString(error) + "\n"); - } + impl.reset(new CGLImpl(glContext)); } } // namespace mbgl diff --git a/platform/darwin/src/headless_backend_eagl.mm b/platform/darwin/src/headless_backend_eagl.mm index 0a1ae706b8..bd4a202ec5 100644 --- a/platform/darwin/src/headless_backend_eagl.mm +++ b/platform/darwin/src/headless_backend_eagl.mm @@ -1,4 +1,4 @@ -#include <mbgl/platform/default/headless_backend.hpp> +#include <mbgl/gl/headless_backend.hpp> #include <mbgl/gl/extension.hpp> @@ -8,6 +8,27 @@ namespace mbgl { +struct EAGLImpl : public HeadlessBackend::Impl { + EAGLImpl(EAGLContext* glContext_) : glContext(glContext_) { + [reinterpret_cast<EAGLContext*>(glContext) retain]; + reinterpret_cast<EAGLContext*>(glContext).multiThreaded = YES; + } + + ~EAGLImpl() { + [glContext release]; + } + + void activateContext() { + [EAGLContext setCurrentContext:glContext]; + } + + void deactivateContext() { + [EAGLContext setCurrentContext:nil]; + } + + EAGLContext* glContext = nullptr; +}; + gl::glProc HeadlessBackend::initializeExtension(const char* name) { static CFBundleRef framework = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengles")); if (!framework) { @@ -21,26 +42,17 @@ gl::glProc HeadlessBackend::initializeExtension(const char* name) { return reinterpret_cast<gl::glProc>(symbol); } +bool HeadlessBackend::hasDisplay() { + return true; +} + void HeadlessBackend::createContext() { - glContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + EAGLContext* glContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (glContext == nil) { throw std::runtime_error("Error creating GL context object"); } - [reinterpret_cast<EAGLContext*>(glContext) retain]; - reinterpret_cast<EAGLContext*>(glContext).multiThreaded = YES; -} - -void HeadlessBackend::destroyContext() { - [reinterpret_cast<EAGLContext*>(glContext) release]; - glContext = nil; -} - -void HeadlessBackend::activateContext() { - [EAGLContext setCurrentContext:reinterpret_cast<EAGLContext*>(glContext)]; -} -void HeadlessBackend::deactivateContext() { - [EAGLContext setCurrentContext:nil]; + impl.reset(new EAGLImpl(glContext)); } } // namespace mbgl diff --git a/platform/darwin/src/headless_display_cgl.cpp b/platform/darwin/src/headless_display_cgl.cpp new file mode 100644 index 0000000000..90d187d3db --- /dev/null +++ b/platform/darwin/src/headless_display_cgl.cpp @@ -0,0 +1,52 @@ +#include <mbgl/gl/headless_display.hpp> + +#include <OpenGL/OpenGL.h> + +#include <stdexcept> +#include <string> + +namespace mbgl { + +class HeadlessDisplay::Impl { +public: + Impl(); + ~Impl(); + CGLPixelFormatObj pixelFormat = nullptr; +}; + +HeadlessDisplay::Impl::Impl() { + // TODO: test if OpenGL 4.1 with GL_ARB_ES2_compatibility is supported + // If it is, use kCGLOGLPVersion_3_2_Core and enable that extension. + CGLPixelFormatAttribute attributes[] = { + kCGLPFAOpenGLProfile, + static_cast<CGLPixelFormatAttribute>(kCGLOGLPVersion_Legacy), + static_cast<CGLPixelFormatAttribute>(0) + }; + + GLint num; + CGLError error = CGLChoosePixelFormat(attributes, &pixelFormat, &num); + if (error != kCGLNoError) { + throw std::runtime_error(std::string("Error choosing pixel format:") + CGLErrorString(error) + "\n"); + } + if (num <= 0) { + throw std::runtime_error("No pixel formats found."); + } +} + +HeadlessDisplay::Impl::~Impl() { + CGLDestroyPixelFormat(pixelFormat); +} + +template <> +CGLPixelFormatObj HeadlessDisplay::attribute() const { + return impl->pixelFormat; +} + +HeadlessDisplay::HeadlessDisplay() + : impl(std::make_unique<Impl>()) { +} + +HeadlessDisplay::~HeadlessDisplay() { +} + +} // namespace mbgl diff --git a/platform/darwin/src/image.mm b/platform/darwin/src/image.mm index 066535a58c..3a707d4a36 100644 --- a/platform/darwin/src/image.mm +++ b/platform/darwin/src/image.mm @@ -11,7 +11,7 @@ namespace mbgl { std::string encodePNG(const PremultipliedImage& src) { - CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, src.data.get(), src.size(), NULL); + CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, src.data.get(), src.bytes(), NULL); if (!provider) { return ""; } @@ -22,9 +22,10 @@ std::string encodePNG(const PremultipliedImage& src) { return ""; } - CGImageRef image = CGImageCreate(src.width, src.height, 8, 32, 4 * src.width, color_space, - kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedLast, provider, NULL, false, - kCGRenderingIntentDefault); + CGImageRef image = + CGImageCreate(src.size.width, src.size.height, 8, 32, 4 * src.size.width, color_space, + kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedLast, provider, NULL, + false, kCGRenderingIntentDefault); if (!image) { CGColorSpaceRelease(color_space); CGDataProviderRelease(provider); @@ -92,11 +93,12 @@ PremultipliedImage decodeImage(const std::string &source_data) { throw std::runtime_error("CGColorSpaceCreateDeviceRGB failed"); } - PremultipliedImage result{ static_cast<uint16_t>(CGImageGetWidth(image)), - static_cast<uint16_t>(CGImageGetHeight(image)) }; + PremultipliedImage result({ static_cast<uint32_t>(CGImageGetWidth(image)), + static_cast<uint32_t>(CGImageGetHeight(image)) }); - CGContextRef context = CGBitmapContextCreate(result.data.get(), result.width, result.height, 8, result.stride(), - color_space, kCGImageAlphaPremultipliedLast); + CGContextRef context = + CGBitmapContextCreate(result.data.get(), result.size.width, result.size.height, 8, + result.stride(), color_space, kCGImageAlphaPremultipliedLast); if (!context) { CGColorSpaceRelease(color_space); CGImageRelease(image); @@ -107,7 +109,9 @@ PremultipliedImage decodeImage(const std::string &source_data) { CGContextSetBlendMode(context, kCGBlendModeCopy); - CGRect rect = {{ 0, 0 }, { static_cast<CGFloat>(result.width), static_cast<CGFloat>(result.height) }}; + CGRect rect = { { 0, 0 }, + { static_cast<CGFloat>(result.size.width), + static_cast<CGFloat>(result.size.height) } }; CGContextDrawImage(context, rect, image); CGContextRelease(context); diff --git a/platform/darwin/src/log_nslog.mm b/platform/darwin/src/logging_nslog.mm index 49583ae3c4..dd428f56b1 100644 --- a/platform/darwin/src/log_nslog.mm +++ b/platform/darwin/src/logging_nslog.mm @@ -1,4 +1,4 @@ -#include <mbgl/platform/log.hpp> +#include <mbgl/util/logging.hpp> #include <mbgl/util/enum.hpp> #import <Foundation/Foundation.h> diff --git a/platform/darwin/src/nsthread.mm b/platform/darwin/src/nsthread.mm index eee6d6991b..6caa1be43e 100644 --- a/platform/darwin/src/nsthread.mm +++ b/platform/darwin/src/nsthread.mm @@ -1,6 +1,6 @@ #import <Foundation/Foundation.h> -#include <mbgl/platform/platform.hpp> +#include <mbgl/util/platform.hpp> #include <pthread.h> diff --git a/platform/darwin/src/string_nsstring.mm b/platform/darwin/src/string_nsstring.mm index 9bf199afc0..08f9aeccef 100644 --- a/platform/darwin/src/string_nsstring.mm +++ b/platform/darwin/src/string_nsstring.mm @@ -1,6 +1,6 @@ #import <Foundation/Foundation.h> -#include <mbgl/platform/platform.hpp> +#include <mbgl/util/platform.hpp> namespace mbgl { namespace platform { diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm index 7f464aaab1..66b752a73a 100644 --- a/platform/darwin/test/MGLFeatureTests.mm +++ b/platform/darwin/test/MGLFeatureTests.mm @@ -91,7 +91,7 @@ mbgl::Point<double> point = { -90.066667, 29.95 }; mbgl::Feature pointFeature { point }; pointFeature.id = { UINT64_MAX }; - pointFeature.properties["null"] = nullptr; + pointFeature.properties["null"] = mapbox::geometry::null_value; pointFeature.properties["bool"] = true; pointFeature.properties["unsigned int"] = UINT64_MAX; pointFeature.properties["int"] = INT64_MIN; diff --git a/platform/darwin/test/MGLStyleLayerTests.xib b/platform/darwin/test/MGLStyleLayerTests.xib index cc336191ef..23ad22e7e3 100644 --- a/platform/darwin/test/MGLStyleLayerTests.xib +++ b/platform/darwin/test/MGLStyleLayerTests.xib @@ -4,14 +4,14 @@ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/> </dependencies> <objects> - <customObject id="-2" userLabel="File's Owner" customClass="MGLMapViewTests"> + <customObject id="-2" userLabel="File's Owner" customClass="MGLStyleLayerTests"> <connections> <outlet property="mapView" destination="6RL-d9-juy" id="0ch-aR-Um6"/> </connections> </customObject> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/> - <window title="MGLMapViewTests" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g"> + <window title="MGLStyleLayerTests" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g"> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="196" y="240" width="256" height="256"/> |