[ios, macos] fixes #5974 Move style classes API to MGLStyle
This commit is contained in:
@@ -221,6 +221,34 @@ static const NSInteger MGLStyleDefaultVersion = 9;
|
||||
*/
|
||||
- (void)removeSource:(MGLSource *)source;
|
||||
|
||||
/**
|
||||
Currently active style classes, represented as an array of string identifiers.
|
||||
*/
|
||||
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;
|
||||
|
||||
/**
|
||||
Returns a Boolean value indicating whether the style class with the given
|
||||
identifier is currently active.
|
||||
|
||||
@param styleClass The style class to query for.
|
||||
@return Whether the style class is currently active.
|
||||
*/
|
||||
- (BOOL)hasStyleClass:(NSString *)styleClass;
|
||||
|
||||
/**
|
||||
Activates the style class with the given identifier.
|
||||
|
||||
@param styleClass The style class to activate.
|
||||
*/
|
||||
- (void)addStyleClass:(NSString *)styleClass;
|
||||
|
||||
/**
|
||||
Deactivates the style class with the given identifier.
|
||||
|
||||
@param styleClass The style class to deactivate.
|
||||
*/
|
||||
- (void)removeStyleClass:(NSString *)styleClass;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
#import "MGLStyle_Private.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLSource_Private.h"
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "MGLVectorSource.h"
|
||||
#import "MGLRasterSource.h"
|
||||
#import "MGLGeoJSONSource.h"
|
||||
|
||||
#include <mbgl/util/default_styles.hpp>
|
||||
#include <mbgl/style/layers/fill_layer.hpp>
|
||||
@@ -179,4 +183,58 @@ static NSURL *MGLStyleURL_emerald;
|
||||
self.mapView.mbglMap->removeSource(source.sourceIdentifier.UTF8String);
|
||||
}
|
||||
|
||||
- (NS_ARRAY_OF(NSString *) *)styleClasses
|
||||
{
|
||||
NSMutableArray *returnArray = [NSMutableArray array];
|
||||
|
||||
const std::vector<std::string> &appliedClasses = self.mapView.mbglMap->getClasses();
|
||||
|
||||
for (auto class_it = appliedClasses.begin(); class_it != appliedClasses.end(); class_it++)
|
||||
{
|
||||
[returnArray addObject:@(class_it->c_str())];
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
- (void)setStyleClasses:(NS_ARRAY_OF(NSString *) *)appliedClasses
|
||||
{
|
||||
[self setStyleClasses:appliedClasses transitionDuration:0];
|
||||
}
|
||||
|
||||
- (void)setStyleClasses:(NS_ARRAY_OF(NSString *) *)appliedClasses transitionDuration:(NSTimeInterval)transitionDuration
|
||||
{
|
||||
std::vector<std::string> newAppliedClasses;
|
||||
|
||||
for (NSString *appliedClass in appliedClasses)
|
||||
{
|
||||
newAppliedClasses.insert(newAppliedClasses.end(), [appliedClass UTF8String]);
|
||||
}
|
||||
|
||||
mbgl::style::TransitionOptions transition { { MGLDurationInSeconds(transitionDuration) } };
|
||||
self.mapView.mbglMap->setClasses(newAppliedClasses, transition);
|
||||
}
|
||||
|
||||
- (BOOL)hasStyleClass:(NSString *)styleClass
|
||||
{
|
||||
return styleClass && self.mapView.mbglMap->hasClass([styleClass UTF8String]);
|
||||
}
|
||||
|
||||
- (void)addStyleClass:(NSString *)styleClass
|
||||
{
|
||||
if (styleClass)
|
||||
{
|
||||
self.mapView.mbglMap->addClass([styleClass UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)removeStyleClass:(NSString *)styleClass
|
||||
{
|
||||
if (styleClass)
|
||||
{
|
||||
self.mapView.mbglMap->removeClass([styleClass UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,4 +7,7 @@
|
||||
|
||||
@interface MGLStyle (Private)
|
||||
@property (nonatomic, weak) MGLMapView *mapView;
|
||||
|
||||
- (void)setStyleClasses:(NS_ARRAY_OF(NSString *) *)appliedClasses transitionDuration:(NSTimeInterval)transitionDuration;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#import "MGLVectorSource.h"
|
||||
|
||||
#import "MGLSource_Private.hpp"
|
||||
#import "MGLSource_Private.h"
|
||||
|
||||
#include <mbgl/style/sources/vector_source.hpp>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
static NSString *MGLVectorSourceType = @"vector";
|
||||
|
||||
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url {
|
||||
if (self = [super initWithSourceIdentifier:sourceIdentifier sourceType:MGLVectorSourceType]) {
|
||||
if (self = [super initWithSourceIdentifier:sourceIdentifier]) {
|
||||
_URL = url;
|
||||
}
|
||||
return self;
|
||||
|
||||
@@ -54,15 +54,10 @@
|
||||
35305D481D22AA680007D005 /* NSData+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35305D471D22AA450007D005 /* NSData+MGLAdditions.mm */; };
|
||||
35305D491D22AA680007D005 /* NSData+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35305D471D22AA450007D005 /* NSData+MGLAdditions.mm */; };
|
||||
35305D4A1D22AA6A0007D005 /* NSData+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35305D461D22AA450007D005 /* NSData+MGLAdditions.h */; };
|
||||
353349B31D5CC6F20094E9DE /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 353349B21D5CC6F20094E9DE /* amsterdam.geojson */; };
|
||||
3534C7921D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.h */; };
|
||||
3534C7931D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.h */; };
|
||||
3534C7951D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.h */; };
|
||||
3534C7961D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.h */; };
|
||||
3538AA171D541C43008EC33D /* MGLStyleFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA151D541C43008EC33D /* MGLStyleFilter.h */; };
|
||||
3538AA181D541C43008EC33D /* MGLStyleFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA151D541C43008EC33D /* MGLStyleFilter.h */; };
|
||||
3538AA191D541C43008EC33D /* MGLStyleFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3538AA161D541C43008EC33D /* MGLStyleFilter.m */; };
|
||||
3538AA1A1D541C43008EC33D /* MGLStyleFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3538AA161D541C43008EC33D /* MGLStyleFilter.m */; };
|
||||
3538AA1D1D542239008EC33D /* MGLBaseStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA1B1D542239008EC33D /* MGLBaseStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3538AA1E1D542239008EC33D /* MGLBaseStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA1B1D542239008EC33D /* MGLBaseStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3538AA1F1D542239008EC33D /* MGLBaseStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3538AA1C1D542239008EC33D /* MGLBaseStyleLayer.mm */; };
|
||||
@@ -77,6 +72,8 @@
|
||||
353933FC1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933FA1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
353933FE1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933FD1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
353933FF1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933FD1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
353BAEF61D646370009A8DA9 /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 353BAEF51D646370009A8DA9 /* amsterdam.geojson */; };
|
||||
353BAEF71D646370009A8DA9 /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 353BAEF51D646370009A8DA9 /* amsterdam.geojson */; };
|
||||
353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */; };
|
||||
354B83961D2E873E005D9406 /* MGLUserLocationAnnotationView.h in Headers */ = {isa = PBXBuildFile; fileRef = 354B83941D2E873E005D9406 /* MGLUserLocationAnnotationView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
354B83971D2E873E005D9406 /* MGLUserLocationAnnotationView.h in Headers */ = {isa = PBXBuildFile; fileRef = 354B83941D2E873E005D9406 /* MGLUserLocationAnnotationView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -372,7 +369,6 @@
|
||||
DAD165791CF4CDFF001FF4B9 /* MGLShapeCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = DAD165761CF4CDFF001FF4B9 /* MGLShapeCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
DAD1657A1CF4CDFF001FF4B9 /* MGLShapeCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = DAD165771CF4CDFF001FF4B9 /* MGLShapeCollection.m */; };
|
||||
DAD1657B1CF4CDFF001FF4B9 /* MGLShapeCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = DAD165771CF4CDFF001FF4B9 /* MGLShapeCollection.m */; };
|
||||
DAED385C1D62802D00D7640F /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 353349B21D5CC6F20094E9DE /* amsterdam.geojson */; };
|
||||
DAED38631D62D0FC00D7640F /* NSURL+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DAED38611D62D0FC00D7640F /* NSURL+MGLAdditions.h */; };
|
||||
DAED38641D62D0FC00D7640F /* NSURL+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DAED38611D62D0FC00D7640F /* NSURL+MGLAdditions.h */; };
|
||||
DAED38651D62D0FC00D7640F /* NSURL+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DAED38621D62D0FC00D7640F /* NSURL+MGLAdditions.m */; };
|
||||
@@ -483,11 +479,8 @@
|
||||
35136D4B1D4277FC00C20EFD /* MGLSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLSource.mm; sourceTree = "<group>"; };
|
||||
35305D461D22AA450007D005 /* NSData+MGLAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+MGLAdditions.h"; sourceTree = "<group>"; };
|
||||
35305D471D22AA450007D005 /* NSData+MGLAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSData+MGLAdditions.mm"; sourceTree = "<group>"; };
|
||||
353349B21D5CC6F20094E9DE /* amsterdam.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = amsterdam.geojson; sourceTree = "<group>"; };
|
||||
3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeFunction_Private.h; sourceTree = "<group>"; };
|
||||
3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeValue_Private.h; sourceTree = "<group>"; };
|
||||
3538AA151D541C43008EC33D /* MGLStyleFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleFilter.h; sourceTree = "<group>"; };
|
||||
3538AA161D541C43008EC33D /* MGLStyleFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLStyleFilter.m; sourceTree = "<group>"; };
|
||||
3538AA1B1D542239008EC33D /* MGLBaseStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLBaseStyleLayer.h; sourceTree = "<group>"; };
|
||||
3538AA1C1D542239008EC33D /* MGLBaseStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLBaseStyleLayer.mm; sourceTree = "<group>"; };
|
||||
353933F11D3FB753003F57D7 /* MGLCircleStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCircleStyleLayer.h; sourceTree = "<group>"; };
|
||||
@@ -495,6 +488,7 @@
|
||||
353933F71D3FB79F003F57D7 /* MGLLineStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLLineStyleLayer.h; sourceTree = "<group>"; };
|
||||
353933FA1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLRasterStyleLayer.h; sourceTree = "<group>"; };
|
||||
353933FD1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSymbolStyleLayer.h; sourceTree = "<group>"; };
|
||||
353BAEF51D646370009A8DA9 /* amsterdam.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = amsterdam.geojson; path = ../../darwin/test/amsterdam.geojson; sourceTree = "<group>"; };
|
||||
353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAnnotationViewTests.m; sourceTree = "<group>"; };
|
||||
354B83941D2E873E005D9406 /* MGLUserLocationAnnotationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLUserLocationAnnotationView.h; sourceTree = "<group>"; };
|
||||
354B83951D2E873E005D9406 /* MGLUserLocationAnnotationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLUserLocationAnnotationView.m; sourceTree = "<group>"; };
|
||||
@@ -849,7 +843,6 @@
|
||||
357579811D502AD4000B822E /* Styling */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
353349B21D5CC6F20094E9DE /* amsterdam.geojson */,
|
||||
3575798F1D513EF1000B822E /* Layers */,
|
||||
);
|
||||
name = Styling;
|
||||
@@ -938,6 +931,7 @@
|
||||
DA1DC96C1CB6C6CE006E619F /* points.geojson */,
|
||||
DA1DC96D1CB6C6CE006E619F /* polyline.geojson */,
|
||||
DA1DC96F1CB6C6CE006E619F /* threestates.geojson */,
|
||||
353BAEF51D646370009A8DA9 /* amsterdam.geojson */,
|
||||
DA1DC95E1CB6C1C2006E619F /* Info.plist */,
|
||||
DA1DC99C1CB6E076006E619F /* Default-568h@2x.png */,
|
||||
DA1DC94D1CB6C1C2006E619F /* Supporting Files */,
|
||||
@@ -1674,7 +1668,7 @@
|
||||
files = (
|
||||
DA25D5CD1CCDA11500607828 /* Settings.bundle in Resources */,
|
||||
DA1DC9701CB6C6CE006E619F /* points.geojson in Resources */,
|
||||
DAED385C1D62802D00D7640F /* amsterdam.geojson in Resources */,
|
||||
353BAEF61D646370009A8DA9 /* amsterdam.geojson in Resources */,
|
||||
DA1DC9711CB6C6CE006E619F /* polyline.geojson in Resources */,
|
||||
DA1DC99D1CB6E076006E619F /* Default-568h@2x.png in Resources */,
|
||||
DA821D071CCC6D59007508D4 /* Main.storyboard in Resources */,
|
||||
@@ -1697,7 +1691,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
353349B31D5CC6F20094E9DE /* amsterdam.geojson in Resources */,
|
||||
353BAEF71D646370009A8DA9 /* amsterdam.geojson in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -212,7 +212,7 @@ IB_DESIGNABLE
|
||||
/**
|
||||
Currently active style classes, represented as an array of string identifiers.
|
||||
*/
|
||||
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;
|
||||
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses __attribute__((deprecated("Use -style.styleClasses:.")));
|
||||
|
||||
/**
|
||||
Returns a Boolean value indicating whether the style class with the given
|
||||
@@ -221,21 +221,21 @@ IB_DESIGNABLE
|
||||
@param styleClass The style class to query for.
|
||||
@return Whether the style class is currently active.
|
||||
*/
|
||||
- (BOOL)hasStyleClass:(NSString *)styleClass;
|
||||
- (BOOL)hasStyleClass:(NSString *)styleClass __attribute__((deprecated("Use -style.hasStyleClass:.")));
|
||||
|
||||
/**
|
||||
Activates the style class with the given identifier.
|
||||
|
||||
@param styleClass The style class to activate.
|
||||
*/
|
||||
- (void)addStyleClass:(NSString *)styleClass;
|
||||
- (void)addStyleClass:(NSString *)styleClass __attribute__((deprecated("Use -style.addStyleClass:.")));
|
||||
|
||||
/**
|
||||
Deactivates the style class with the given identifier.
|
||||
|
||||
@param styleClass The style class to deactivate.
|
||||
*/
|
||||
- (void)removeStyleClass:(NSString *)styleClass;
|
||||
- (void)removeStyleClass:(NSString *)styleClass __attribute__((deprecated("Use -style.removeStyleClass:.")));
|
||||
|
||||
#pragma mark Displaying the User’s Location
|
||||
|
||||
|
||||
@@ -2710,16 +2710,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
|
||||
|
||||
- (NS_ARRAY_OF(NSString *) *)styleClasses
|
||||
{
|
||||
NSMutableArray *returnArray = [NSMutableArray array];
|
||||
|
||||
const std::vector<std::string> &appliedClasses = _mbglMap->getClasses();
|
||||
|
||||
for (auto class_it = appliedClasses.begin(); class_it != appliedClasses.end(); class_it++)
|
||||
{
|
||||
[returnArray addObject:@(class_it->c_str())];
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
return [self.style styleClasses];
|
||||
}
|
||||
|
||||
- (void)setStyleClasses:(NS_ARRAY_OF(NSString *) *)appliedClasses
|
||||
@@ -2729,36 +2720,22 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
|
||||
|
||||
- (void)setStyleClasses:(NS_ARRAY_OF(NSString *) *)appliedClasses transitionDuration:(NSTimeInterval)transitionDuration
|
||||
{
|
||||
std::vector<std::string> newAppliedClasses;
|
||||
|
||||
for (NSString *appliedClass in appliedClasses)
|
||||
{
|
||||
newAppliedClasses.insert(newAppliedClasses.end(), [appliedClass UTF8String]);
|
||||
}
|
||||
|
||||
mbgl::style::TransitionOptions transition { { MGLDurationInSeconds(transitionDuration) } };
|
||||
_mbglMap->setClasses(newAppliedClasses, transition);
|
||||
[self.style setStyleClasses:appliedClasses transitionDuration:transitionDuration];
|
||||
}
|
||||
|
||||
- (BOOL)hasStyleClass:(NSString *)styleClass
|
||||
{
|
||||
return styleClass && _mbglMap->hasClass([styleClass UTF8String]);
|
||||
return [self.style hasStyleClass:styleClass];
|
||||
}
|
||||
|
||||
- (void)addStyleClass:(NSString *)styleClass
|
||||
{
|
||||
if (styleClass)
|
||||
{
|
||||
_mbglMap->addClass([styleClass UTF8String]);
|
||||
}
|
||||
[self.style addStyleClass:styleClass];
|
||||
}
|
||||
|
||||
- (void)removeStyleClass:(NSString *)styleClass
|
||||
{
|
||||
if (styleClass)
|
||||
{
|
||||
_mbglMap->removeClass([styleClass UTF8String]);
|
||||
}
|
||||
[self.style removeStyleClass:styleClass];
|
||||
}
|
||||
|
||||
#pragma mark - Annotations -
|
||||
|
||||
@@ -15,6 +15,9 @@ extern const CGSize MGLAnnotationAccessibilityElementMinimumSize;
|
||||
|
||||
- (mbgl::Map *)mbglMap;
|
||||
|
||||
/** Converts NSTimeInterval to mbgl::Duration */
|
||||
mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration);
|
||||
|
||||
/** Returns whether the map view is currently loading or processing any assets required to render the map */
|
||||
- (BOOL)isFullyLoaded;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
3537CA741D3F93A600380318 /* MGLStyle_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3537CA731D3F93A600380318 /* MGLStyle_Private.h */; };
|
||||
3538AA231D542685008EC33D /* MGLBaseStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA211D542685008EC33D /* MGLBaseStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3538AA241D542685008EC33D /* MGLBaseStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3538AA221D542685008EC33D /* MGLBaseStyleLayer.mm */; };
|
||||
353BAEF81D6463B8009A8DA9 /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 358EB3AE1D61F0DB00E46D9C /* amsterdam.geojson */; };
|
||||
355BA4ED1D41633E00CCC6D5 /* NSColor+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 355BA4EB1D41633E00CCC6D5 /* NSColor+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
355BA4EE1D41633E00CCC6D5 /* NSColor+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 355BA4EC1D41633E00CCC6D5 /* NSColor+MGLAdditions.mm */; };
|
||||
35602BFA1D3EA99F0050646F /* MGLFillStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35602BF81D3EA99F0050646F /* MGLFillStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -31,8 +32,8 @@
|
||||
35602BFF1D3EA9B40050646F /* MGLStyleLayer_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 35602BFC1D3EA9B40050646F /* MGLStyleLayer_Private.h */; };
|
||||
35602C001D3EA9B40050646F /* MGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35602BFD1D3EA9B40050646F /* MGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
35602C011D3EA9B40050646F /* MGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35602BFE1D3EA9B40050646F /* MGLStyleLayer.mm */; };
|
||||
3593E52A1D52A628006D9365 /* MGLStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3593E5281D52A628006D9365 /* MGLStyleAttribute.h */; };
|
||||
35724FC41D630502002A4AB4 /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 358EB3AE1D61F0DB00E46D9C /* amsterdam.geojson */; };
|
||||
3593E52A1D52A628006D9365 /* MGLStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3593E5281D52A628006D9365 /* MGLStyleAttribute.h */; };
|
||||
3593E52B1D52A628006D9365 /* MGLStyleAttribute.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3593E5291D52A628006D9365 /* MGLStyleAttribute.mm */; };
|
||||
3593E52D1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3593E52C1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.h */; };
|
||||
52BECB0A1CC5A26F009CD791 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */; };
|
||||
@@ -72,9 +73,9 @@
|
||||
DA8F25931D51CA750010E6B5 /* MGLSymbolStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25911D51CA750010E6B5 /* MGLSymbolStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
DA8F25941D51CA750010E6B5 /* MGLSymbolStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25921D51CA750010E6B5 /* MGLSymbolStyleLayer.mm */; };
|
||||
DA8F25971D51CAC70010E6B5 /* MGLVectorSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25951D51CAC70010E6B5 /* MGLVectorSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
DA8F25981D51CAC70010E6B5 /* MGLVectorSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25961D51CAC70010E6B5 /* MGLVectorSource.mm */; };
|
||||
DA8F259A1D51CAD00010E6B5 /* MGLSource_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25991D51CAD00010E6B5 /* MGLSource_Private.h */; };
|
||||
DA8F259C1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F259B1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.h */; };
|
||||
DA8F25981D51CAC70010E6B5 /* MGLVectorSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25961D51CAC70010E6B5 /* MGLVectorSource.mm */; };
|
||||
DA8F25A91D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F259D1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
DA8F25AA1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F259E1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.mm */; };
|
||||
DA8F25AB1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F259F1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.h */; };
|
||||
@@ -228,8 +229,8 @@
|
||||
35602BFC1D3EA9B40050646F /* MGLStyleLayer_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleLayer_Private.h; sourceTree = "<group>"; };
|
||||
35602BFD1D3EA9B40050646F /* MGLStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleLayer.h; sourceTree = "<group>"; };
|
||||
35602BFE1D3EA9B40050646F /* MGLStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleLayer.mm; sourceTree = "<group>"; };
|
||||
3593E5281D52A628006D9365 /* MGLStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttribute.h; sourceTree = "<group>"; };
|
||||
358EB3AE1D61F0DB00E46D9C /* amsterdam.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = amsterdam.geojson; path = ../../darwin/test/amsterdam.geojson; sourceTree = "<group>"; };
|
||||
3593E5281D52A628006D9365 /* MGLStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttribute.h; sourceTree = "<group>"; };
|
||||
3593E5291D52A628006D9365 /* MGLStyleAttribute.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleAttribute.mm; sourceTree = "<group>"; };
|
||||
3593E52C1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSColor+MGLStyleAttributeAdditions_Private.h"; sourceTree = "<group>"; };
|
||||
52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
@@ -285,9 +286,9 @@
|
||||
DA8F25911D51CA750010E6B5 /* MGLSymbolStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSymbolStyleLayer.h; sourceTree = "<group>"; };
|
||||
DA8F25921D51CA750010E6B5 /* MGLSymbolStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLSymbolStyleLayer.mm; sourceTree = "<group>"; };
|
||||
DA8F25951D51CAC70010E6B5 /* MGLVectorSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLVectorSource.h; sourceTree = "<group>"; };
|
||||
DA8F25961D51CAC70010E6B5 /* MGLVectorSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLVectorSource.mm; sourceTree = "<group>"; };
|
||||
DA8F25991D51CAD00010E6B5 /* MGLSource_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSource_Private.h; sourceTree = "<group>"; };
|
||||
DA8F259B1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeValue_Private.h; sourceTree = "<group>"; };
|
||||
DA8F25961D51CAC70010E6B5 /* MGLVectorSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLVectorSource.mm; sourceTree = "<group>"; };
|
||||
DA8F259D1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
|
||||
DA8F259E1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSNumber+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
|
||||
DA8F259F1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+MGLStyleAttributeAdditions_Private.h"; sourceTree = "<group>"; };
|
||||
@@ -390,7 +391,6 @@
|
||||
DAE6C3CA1CC34BD800DB3429 /* MGLOfflineRegionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLOfflineRegionTests.m; path = ../../darwin/test/MGLOfflineRegionTests.m; sourceTree = "<group>"; };
|
||||
DAE6C3CB1CC34BD800DB3429 /* MGLOfflineStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLOfflineStorageTests.m; path = ../../darwin/test/MGLOfflineStorageTests.m; sourceTree = "<group>"; };
|
||||
DAE6C3CC1CC34BD800DB3429 /* MGLStyleTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLStyleTests.mm; path = ../../darwin/test/MGLStyleTests.mm; sourceTree = "<group>"; };
|
||||
DAED38591D627FF400D7640F /* amsterdam.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = amsterdam.geojson; sourceTree = "<group>"; };
|
||||
DAED385D1D62CED700D7640F /* NSURL+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+MGLAdditions.h"; sourceTree = "<group>"; };
|
||||
DAED385E1D62CED700D7640F /* NSURL+MGLAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+MGLAdditions.m"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -608,7 +608,6 @@
|
||||
DA8F257D1D51C5F40010E6B5 /* Styling */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DAED38591D627FF400D7640F /* amsterdam.geojson */,
|
||||
DA8F257C1D51C5F40010E6B5 /* Layers */,
|
||||
);
|
||||
name = Styling;
|
||||
@@ -1018,9 +1017,9 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
35724FC51D630515002A4AB4 /* amsterdam.geojson in Resources */,
|
||||
DA839EA21CC2E3400062CAFB /* Assets.xcassets in Resources */,
|
||||
DA839EA01CC2E3400062CAFB /* MapDocument.xib in Resources */,
|
||||
353BAEF81D6463B8009A8DA9 /* amsterdam.geojson in Resources */,
|
||||
DA839EA51CC2E3400062CAFB /* MainMenu.xib in Resources */,
|
||||
DA5589771D320C41006B7F64 /* wms.json in Resources */,
|
||||
DAE6C2E21CC304F900DB3429 /* Credits.rtf in Resources */,
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
/// Synchronously render a frame of the map.
|
||||
- (void)renderSync;
|
||||
|
||||
/// Converts NSTimeInterval to mbgl::Duration
|
||||
mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration);
|
||||
|
||||
- (mbgl::Map *)mbglMap;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user