Runtime styling API for iOS/macOS (#5727)

* [ios] wip runtime styling

* [ios, macos] Outlined header templates

* [ios, macos] cleanup and use appropiate data types

* [ios, macos] removed refs to mbgl and added convenient color methods on UIColor and NSColor

* [ios, macos] updated header template, included doc string

* [ios, macos] outlined template for layer implementation files

* [ios, macos] moved script to platform/darwin and updated comments

* [ios, macos] Cleaned up the implementation template

* [ios, macos] removed unused function and added support for more datatypes

* [ios, macos] overhauling the type protocols

* [ios, macos] removed unnecessary style classes

* [ios, macos] added support for more types

* [ios, macos] fixed string and number prop values

* [ios, macos] enum getters

* [ios, macos] added removeLayer() and removed unused layer ref

* [ios, macos] fixed remaining layer types and converted style layer into a protocol

* [ios, macos] fixed addLayer() and added example for line layer

* [ios] GeoJSON source now works

* [ios] fixed raster layer and raster source

* [ios] fixed attr prop number and outlined prop function

* [ios] wip functions

* [ios] bool and float function fix

* [ios] cleanup

* [macos] fixed support for macos

* [ios] fixed string functions

* [ios] extended array functions

* [ios] added tests and fixed a few bugs

* [ios] less verbose functions and improved tests

* [ios, macos] Removed unnecessary use of default arguments

Default arguments aren’t supported in Node v4, and they aren’t needed here anyways, because we’re only testing for truthiness.

* [ios, macos] Enum setters

Rely on a macro instead of category methods to specialize the setter implementation for enum attributes, since generic types are disallowed in Objective-C method signatures and mbgl::style::PropertyType must be type-qualified.

* [ios, macos] Got macOS closer to parity w/ iOS

Added various classes and test classes to the macOS workspace. Also fixed lots of compiler errors and updated macosapp runtime styling example to use the new dictionary syntax for function stops.

Updated all conversions from Objective-C stops to C++ stops to enumerate over the dictionary. Fixed compiler errors in enum setter implementations.

Also corrected path to script in generated file comments.

* [ios, macos] Added EJS templates to project

* [ios, macos] Code formatting

Made code format more consistent.

* [ios, macos] Spelled out ID

Cocoa convention is to always spell out “ID” as “identifier”, in part to avoid confusion with the id keyword. Also, URL is capitalized in most contexts, including property names.

* [ios, macos] Grouped related headers together

* [ios, macos] Cleaned up layer transformation

Also added support for converting background layers into Objective-C.

* [ios, macos] Cleaned up tests

Also made the tests work on macOS by introducing a new window to host the map.

* [ios, macos] Replaced TODOs with #warnings

* [ios] convert array based property values

* [ios, macos] color function/undefined getter

* [ios, macos] fixed function/undefined getters for bool and float properties

* [ios, macos] more function/undefined property getters

* [ios, macos] more type conversion and cleanup

* [ios, macos] disable macos runtime styling tests for now

* [ios, macos] cleaned up style code script

* [ios, macos] more type conversion

* [ios] added a base layer to handle visibility min/max zoom

* [macos] fixed base layer

* [ios, macos] use accessor methods

* [ios, macos] cleanup

* [ios, macos] add geojson to ios and macos

* [macos] rebase fix

* [ios, macos] fixed enum getters and added tests for enums

* [ios, macos] added an update method to base layer

* [ios, macos] added some documentation

* [ios, macos] docs

* [ios, macos] removed refs to filters for now

* [ios, macos] various tail work

* [ios, macos] missing import and incorrect type
This commit is contained in:
Fredrik Karlsson
2016-08-11 13:14:45 -04:00
committed by GitHub
parent b0cb8715ed
commit 2354c87411
96 changed files with 6841 additions and 53 deletions

View File

@@ -253,6 +253,8 @@ ifabric: $(IOS_PROJ_PATH)
idocument:
OUTPUT=$(OUTPUT) ./platform/ios/scripts/document.sh
style-code-darwin:
node platform/darwin/scripts/generate-style-code.js
endif
#### Linux targets #####################################################

View File

@@ -0,0 +1,211 @@
'use strict';
const fs = require('fs');
const ejs = require('ejs');
const spec = require('mapbox-gl-style-spec').latest;
var prefix = 'MGL';
var suffix = 'StyleLayer';
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); }
global.testImplementation = function (property, layerType) {
switch (property.type) {
case 'boolean':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testBool;`;
case 'number':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testNumber;`;
case 'string':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testString;`;
case 'enum':
var objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
var objCEnum = `${objCType}${camelize(property.values[property.values.length-1])}`;
return `layer.${objCName(property)} = [MGLRuntimeStylingHelper testEnum:${objCEnum} type:@encode(${objCType})];`;
case 'color':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testColor;`;
case 'array':
return testArrayImplementation(property);
default: throw new Error(`unknown type for ${property.name}`)
}
}
global.testGetterImplementation = function (property, layerType) {
switch (property.type) {
case 'boolean':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testBool);`;
case 'number':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testNumber);`;
case 'string':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testString);`;
case 'enum':
var objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
var objCEnum = `${objCType}${camelize(property.values[property.values.length-1])}`;
return `XCTAssert([(NSValue *)gLayer.${objCName(property)} objCType] == [[MGLRuntimeStylingHelper testEnum:${objCEnum} type:@encode(${objCType})] objCType]);`;
case 'color':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testColor);`;
case 'array':
return testGetterArrayImplementation(property);
default: throw new Error(`unknown type for ${property.name}`)
}
}
global.testGetterArrayImplementation = function (property) {
switch (property.name) {
case 'icon-text-fit-padding':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testPadding);`;
case 'line-dasharray':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testDashArray);`;
case 'text-font':
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testFont);`;
default:
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testOffset);`; // Default offset (dx, dy)
}
};
global.testArrayImplementation = function (property) {
switch (property.name) {
case 'icon-text-fit-padding':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testPadding;`;
case 'line-dasharray':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testDashArray;`;
case 'text-font':
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testFont;`;
default:
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testOffset;`; // Default offset (dx, dy)
}
};
global.propertyType = function (property, _private) {
return _private ? `id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>` : `id <MGLStyleAttributeValue>`;
};
global.initLayer = function (layerType) {
if (layerType == "background") {
return `_layer = new mbgl::style::${camelize(layerType)}Layer(layerIdentifier.UTF8String);`
} else {
return `_layer = new mbgl::style::${camelize(layerType)}Layer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);`
}
}
global.setterImplementation = function(property, layerType) {
switch (property.type) {
case 'boolean':
return `self.layer->set${camelize(property.name)}(${objCName(property)}.mbgl_boolPropertyValue);`;
case 'number':
return `self.layer->set${camelize(property.name)}(${objCName(property)}.mbgl_floatPropertyValue);`;
case 'string':
return `self.layer->set${camelize(property.name)}(${objCName(property)}.mbgl_stringPropertyValue);`;
case 'enum':
var objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
return `MGLSetEnumProperty(${objCName(property)}, ${camelize(property.name)}, ${mbglType(property)}, ${objCType});`;
case 'color':
return `self.layer->set${camelize(property.name)}(${objCName(property)}.mbgl_colorPropertyValue);`;
case 'array':
return arraySetterImplementation(property);
default: throw new Error(`unknown type for ${property.name}`)
}
}
global.mbglType = function(property) {
var mbglType = camelize(property.name) + 'Type';
if (/-translate-anchor$/.test(property.name)) {
mbglType = 'TranslateAnchorType';
}
if (/-(rotation|pitch)-alignment$/.test(property.name)) {
mbglType = 'AlignmentType';
}
return mbglType;
}
global.arraySetterImplementation = function(property) {
return `self.layer->set${camelize(property.name)}(${objCName(property)}.mbgl_${convertedType(property)}PropertyValue);`;
}
global.getterImplementation = function(property, layerType) {
switch (property.type) {
case 'boolean':
return `return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->get${camelize(property.name)}()];`
case 'number':
return `return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->get${camelize(property.name)}()];`
case 'string':
return `return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->get${camelize(property.name)}()];`
case 'enum':
var objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
return `MGLGetEnumProperty(${camelize(property.name)}, ${mbglType(property)}, ${objCType});`;
case 'color':
return `return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->get${camelize(property.name)}()];`
case 'array':
return arrayGetterImplementation(property);
default:
throw new Error(`unknown type for ${property.name}`)
}
}
global.arrayGetterImplementation = function(property) {
return `return [MGLStyleAttribute mbgl_${convertedType(property)}PropertyValueWith:self.layer->get${camelize(property.name)}()];`
}
global.convertedType = function(property) {
switch (property.name) {
case 'boolean':
return 'bool';
case 'number':
return 'number';
case 'color':
return 'color';
case 'string':
return 'string';
case 'icon-text-fit-padding':
return "padding";
case 'line-dasharray':
return "numberArray";
case 'text-font':
return "stringArray";
default:
return "offset";
}
}
const layerH = ejs.compile(fs.readFileSync('platform/darwin/src/MGLStyleLayer.h.ejs', 'utf8'), { strict: true });
const layerM = ejs.compile(fs.readFileSync('platform/darwin/src/MGLStyleLayer.mm.ejs', 'utf8'), { strict: true});
const testLayers = ejs.compile(fs.readFileSync('platform/darwin/src/MGLRuntimeStylingTests.m.ejs', 'utf8'), { strict: true});
const layers = spec.layer.type.values.map((type) => {
const layoutProperties = Object.keys(spec[`layout_${type}`]).reduce((memo, name) => {
if (name !== 'visibility') {
spec[`layout_${type}`][name].name = name;
memo.push(spec[`layout_${type}`][name]);
}
return memo;
}, []);
const paintProperties = Object.keys(spec[`paint_${type}`]).reduce((memo, name) => {
spec[`paint_${type}`][name].name = name;
memo.push(spec[`paint_${type}`][name]);
return memo;
}, []);
return {
type: type,
layoutProperties: layoutProperties,
paintProperties: paintProperties,
};
});
for (const layer of layers) {
fs.writeFileSync(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.h`, 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));
}

View File

@@ -0,0 +1,27 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
@interface MGLBackgroundStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Paint Attributes
/**
The color with which the background will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> backgroundColor;
/**
Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
*/
@property (nonatomic) id <MGLStyleAttributeValue> backgroundPattern;
/**
The opacity at which the background will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> backgroundOpacity;
@end

View File

@@ -0,0 +1,57 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLBackgroundStyleLayer.h"
#include <mbgl/style/layers/background_layer.hpp>
@interface MGLBackgroundStyleLayer ()
@property (nonatomic) mbgl::style::BackgroundLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLBackgroundStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::BackgroundLayer(layerIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Paint Attributes
- (void)setBackgroundColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)backgroundColor {
self.layer->setBackgroundColor(backgroundColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)backgroundColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getBackgroundColor()];
}
- (void)setBackgroundPattern:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)backgroundPattern {
self.layer->setBackgroundPattern(backgroundPattern.mbgl_stringPropertyValue);
}
- (id <MGLStyleAttributeValue>)backgroundPattern {
return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getBackgroundPattern()];
}
- (void)setBackgroundOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)backgroundOpacity {
self.layer->setBackgroundOpacity(backgroundOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)backgroundOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getBackgroundOpacity()];
}
@end

View File

@@ -0,0 +1,22 @@
#import <Foundation/Foundation.h>
@interface MGLBaseStyleLayer : NSObject
@property (nonatomic, assign, getter=isVisible) BOOL visible;
/**
The maximum zoom level on which the layer gets parsed and appears on.
*/
@property (nonatomic, assign) float maximumZoomLevel;
/**
The minimum zoom level on which the layer gets parsed and appears on.
*/
@property (nonatomic, assign) float minimumZoomLevel;
/**
Updates the layer’s layout and paint properties.
*/
- (void)update;
@end

View File

@@ -0,0 +1,56 @@
#import "MGLBaseStyleLayer.h"
#import "MGLStyleLayer_Private.hpp"
#import "MGLMapView_Private.hpp"
#include <mbgl/style/layer.hpp>
@interface MGLBaseStyleLayer() <MGLStyleLayer_Private>
@end
@implementation MGLBaseStyleLayer
@synthesize layerIdentifier;
@synthesize mapView;
@synthesize layer;
- (void)update
{
self.mapView.mbglMap->update(mbgl::Update::RecalculateStyle | mbgl::Update::Classes);
}
- (void)setVisible:(BOOL)visible
{
mbgl::style::VisibilityType v = visible
? mbgl::style::VisibilityType::Visible
: mbgl::style::VisibilityType::None;
self.layer->setVisibility(v);
}
- (BOOL)isVisible
{
mbgl::style::VisibilityType v = self.layer->getVisibility();
return (v == mbgl::style::VisibilityType::Visible);
}
- (void)setMaximumZoomLevel:(float)maximumZoomLevel
{
self.layer->setMaxZoom(maximumZoomLevel);
}
- (float)maximumZoomLevel
{
return self.layer->getMaxZoom();
}
- (void)setMinimumZoomLevel:(float)minimumZoomLevel
{
self.layer->setMinZoom(minimumZoomLevel);
}
- (float)minimumZoomLevel
{
return self.layer->getMinZoom();
}
@end

View File

@@ -0,0 +1,57 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
typedef NS_ENUM(NSUInteger, MGLCircleStyleLayerCircleTranslateAnchor) {
MGLCircleStyleLayerCircleTranslateAnchorMap,
MGLCircleStyleLayerCircleTranslateAnchorViewport,
};
typedef NS_ENUM(NSUInteger, MGLCircleStyleLayerCirclePitchScale) {
MGLCircleStyleLayerCirclePitchScaleMap,
MGLCircleStyleLayerCirclePitchScaleViewport,
};
@interface MGLCircleStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Paint Attributes
/**
Circle radius.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleRadius;
/**
The color of the circle.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleColor;
/**
Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleBlur;
/**
The opacity at which the circle will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleOpacity;
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
*/
@property (nonatomic) id <MGLStyleAttributeValue> circleTranslateAnchor;
/**
Controls the scaling behavior of the circle when the map is pitched. The value `map` scales circles according to their apparent distance to the camera. The value `viewport` results in no pitch-related scaling.
*/
@property (nonatomic) id <MGLStyleAttributeValue> circlePitchScale;
@end

View File

@@ -0,0 +1,89 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLCircleStyleLayer.h"
#include <mbgl/style/layers/circle_layer.hpp>
@interface MGLCircleStyleLayer ()
@property (nonatomic) mbgl::style::CircleLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLCircleStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::CircleLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Paint Attributes
- (void)setCircleRadius:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleRadius {
self.layer->setCircleRadius(circleRadius.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)circleRadius {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getCircleRadius()];
}
- (void)setCircleColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleColor {
self.layer->setCircleColor(circleColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)circleColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getCircleColor()];
}
- (void)setCircleBlur:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleBlur {
self.layer->setCircleBlur(circleBlur.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)circleBlur {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getCircleBlur()];
}
- (void)setCircleOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleOpacity {
self.layer->setCircleOpacity(circleOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)circleOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getCircleOpacity()];
}
- (void)setCircleTranslate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleTranslate {
self.layer->setCircleTranslate(circleTranslate.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)circleTranslate {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getCircleTranslate()];
}
- (void)setCircleTranslateAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circleTranslateAnchor {
MGLSetEnumProperty(circleTranslateAnchor, CircleTranslateAnchor, TranslateAnchorType, MGLCircleStyleLayerCircleTranslateAnchor);
}
- (id <MGLStyleAttributeValue>)circleTranslateAnchor {
MGLGetEnumProperty(CircleTranslateAnchor, TranslateAnchorType, MGLCircleStyleLayerCircleTranslateAnchor);
}
- (void)setCirclePitchScale:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)circlePitchScale {
MGLSetEnumProperty(circlePitchScale, CirclePitchScale, CirclePitchScaleType, MGLCircleStyleLayerCirclePitchScale);
}
- (id <MGLStyleAttributeValue>)circlePitchScale {
MGLGetEnumProperty(CirclePitchScale, CirclePitchScaleType, MGLCircleStyleLayerCirclePitchScale);
}
@end

View File

@@ -0,0 +1,52 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) {
MGLFillStyleLayerFillTranslateAnchorMap,
MGLFillStyleLayerFillTranslateAnchorViewport,
};
@interface MGLFillStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Paint Attributes
/**
Whether or not the fill should be antialiased.
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillAntialias;
/**
The opacity of the entire fill layer. In contrast to the fill-color, this value will also affect the 1px stroke around the fill, if the stroke is used.
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillOpacity;
/**
The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillColor;
/**
The outline color of the fill. Matches the value of `fill-color` if unspecified.
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillOutlineColor;
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillTranslateAnchor;
/**
Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
*/
@property (nonatomic) id <MGLStyleAttributeValue> fillPattern;
@end

View File

@@ -0,0 +1,89 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLFillStyleLayer.h"
#include <mbgl/style/layers/fill_layer.hpp>
@interface MGLFillStyleLayer ()
@property (nonatomic) mbgl::style::FillLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLFillStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::FillLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Paint Attributes
- (void)setFillAntialias:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillAntialias {
self.layer->setFillAntialias(fillAntialias.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillAntialias {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getFillAntialias()];
}
- (void)setFillOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillOpacity {
self.layer->setFillOpacity(fillOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getFillOpacity()];
}
- (void)setFillColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillColor {
self.layer->setFillColor(fillColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getFillColor()];
}
- (void)setFillOutlineColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillOutlineColor {
self.layer->setFillOutlineColor(fillOutlineColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillOutlineColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getFillOutlineColor()];
}
- (void)setFillTranslate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillTranslate {
self.layer->setFillTranslate(fillTranslate.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillTranslate {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getFillTranslate()];
}
- (void)setFillTranslateAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillTranslateAnchor {
MGLSetEnumProperty(fillTranslateAnchor, FillTranslateAnchor, TranslateAnchorType, MGLFillStyleLayerFillTranslateAnchor);
}
- (id <MGLStyleAttributeValue>)fillTranslateAnchor {
MGLGetEnumProperty(FillTranslateAnchor, TranslateAnchorType, MGLFillStyleLayerFillTranslateAnchor);
}
- (void)setFillPattern:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)fillPattern {
self.layer->setFillPattern(fillPattern.mbgl_stringPropertyValue);
}
- (id <MGLStyleAttributeValue>)fillPattern {
return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getFillPattern()];
}
@end

View File

@@ -0,0 +1,9 @@
#import "MGLSource.h"
@interface MGLGeoJSONSource : MGLSource
@property (nonatomic, readonly, copy) NSString *data;
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url NS_DESIGNATED_INITIALIZER;
@end

View File

@@ -0,0 +1,43 @@
#import "MGLGeoJSONSource.h"
#import "MGLSource_Private.hpp"
#include <mbgl/style/sources/geojson_source.hpp>
@interface MGLGeoJSONSource ()
@property (nonatomic, copy) NSURL *URL;
@end
@implementation MGLGeoJSONSource
static NSString *MGLGeoJSONSourceType = @"geojson";
static NSString *MGLGeoJSONDataKey = @"data";
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url
{
if (self = [super initWithSourceIdentifier:sourceIdentifier sourceType:MGLGeoJSONSourceType]) {
_URL = url;
if (url.isFileURL) {
_data = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:NULL];
} else {
_data = url.absoluteString;
}
}
return self;
}
- (std::unique_ptr<mbgl::style::Source>)mbgl_source
{
auto source = std::make_unique<mbgl::style::GeoJSONSource>(self.sourceIdentifier.UTF8String);
if (_URL.isFileURL) {
const auto geojson = mapbox::geojson::parse(self.data.UTF8String).get<mapbox::geojson::feature_collection>();
source->setGeoJSON(geojson);
} else {
source->setURL(self.data.UTF8String);
}
return std::move(source);
}
@end

View File

@@ -0,0 +1,101 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineCap) {
MGLLineStyleLayerLineCapButt,
MGLLineStyleLayerLineCapRound,
MGLLineStyleLayerLineCapSquare,
};
typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineJoin) {
MGLLineStyleLayerLineJoinBevel,
MGLLineStyleLayerLineJoinRound,
MGLLineStyleLayerLineJoinMiter,
};
typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineTranslateAnchor) {
MGLLineStyleLayerLineTranslateAnchorMap,
MGLLineStyleLayerLineTranslateAnchorViewport,
};
@interface MGLLineStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Layout Attributes
/**
The display of line endings.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineCap;
/**
The display of lines when joining.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineJoin;
/**
Used to automatically convert miter joins to bevel joins for sharp angles.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineMiterLimit;
/**
Used to automatically convert round joins to miter joins for shallow angles.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineRoundLimit;
#pragma mark - Accessing the Paint Attributes
/**
The opacity at which the line will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineOpacity;
/**
The color with which the line will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineColor;
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineTranslateAnchor;
/**
Stroke thickness.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineWidth;
/**
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineGapWidth;
/**
The line's offset perpendicular to its direction. Values may be positive or negative, where positive indicates "rightwards" (if you were moving in the direction of the line) and negative indicates "leftwards."
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineOffset;
/**
Blur applied to the line, in pixels.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineBlur;
/**
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.
*/
@property (nonatomic) id <MGLStyleAttributeValue> lineDasharray;
/**
Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
*/
@property (nonatomic) id <MGLStyleAttributeValue> linePattern;
@end

View File

@@ -0,0 +1,147 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLLineStyleLayer.h"
#include <mbgl/style/layers/line_layer.hpp>
@interface MGLLineStyleLayer ()
@property (nonatomic) mbgl::style::LineLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLLineStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::LineLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Layout Attributes
- (void)setLineCap:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineCap {
MGLSetEnumProperty(lineCap, LineCap, LineCapType, MGLLineStyleLayerLineCap);
}
- (id <MGLStyleAttributeValue>)lineCap {
MGLGetEnumProperty(LineCap, LineCapType, MGLLineStyleLayerLineCap);
}
- (void)setLineJoin:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineJoin {
MGLSetEnumProperty(lineJoin, LineJoin, LineJoinType, MGLLineStyleLayerLineJoin);
}
- (id <MGLStyleAttributeValue>)lineJoin {
MGLGetEnumProperty(LineJoin, LineJoinType, MGLLineStyleLayerLineJoin);
}
- (void)setLineMiterLimit:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineMiterLimit {
self.layer->setLineMiterLimit(lineMiterLimit.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineMiterLimit {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineMiterLimit()];
}
- (void)setLineRoundLimit:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineRoundLimit {
self.layer->setLineRoundLimit(lineRoundLimit.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineRoundLimit {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineRoundLimit()];
}
#pragma mark - Accessing the Paint Attributes
- (void)setLineOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineOpacity {
self.layer->setLineOpacity(lineOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineOpacity()];
}
- (void)setLineColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineColor {
self.layer->setLineColor(lineColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getLineColor()];
}
- (void)setLineTranslate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineTranslate {
self.layer->setLineTranslate(lineTranslate.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineTranslate {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getLineTranslate()];
}
- (void)setLineTranslateAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineTranslateAnchor {
MGLSetEnumProperty(lineTranslateAnchor, LineTranslateAnchor, TranslateAnchorType, MGLLineStyleLayerLineTranslateAnchor);
}
- (id <MGLStyleAttributeValue>)lineTranslateAnchor {
MGLGetEnumProperty(LineTranslateAnchor, TranslateAnchorType, MGLLineStyleLayerLineTranslateAnchor);
}
- (void)setLineWidth:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineWidth {
self.layer->setLineWidth(lineWidth.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineWidth {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineWidth()];
}
- (void)setLineGapWidth:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineGapWidth {
self.layer->setLineGapWidth(lineGapWidth.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineGapWidth {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineGapWidth()];
}
- (void)setLineOffset:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineOffset {
self.layer->setLineOffset(lineOffset.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineOffset {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineOffset()];
}
- (void)setLineBlur:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineBlur {
self.layer->setLineBlur(lineBlur.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineBlur {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getLineBlur()];
}
- (void)setLineDasharray:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)lineDasharray {
self.layer->setLineDasharray(lineDasharray.mbgl_numberArrayPropertyValue);
}
- (id <MGLStyleAttributeValue>)lineDasharray {
return [MGLStyleAttribute mbgl_numberArrayPropertyValueWith:self.layer->getLineDasharray()];
}
- (void)setLinePattern:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)linePattern {
self.layer->setLinePattern(linePattern.mbgl_stringPropertyValue);
}
- (id <MGLStyleAttributeValue>)linePattern {
return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getLinePattern()];
}
@end

View File

@@ -0,0 +1,10 @@
#import "MGLSource.h"
@interface MGLRasterSource : MGLSource
@property (nonatomic, readonly, copy) NSURL *URL;
@property (nonatomic, readonly, assign) CGFloat tileSize;
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url tileSize:(CGFloat)tileSize;
@end

View File

@@ -0,0 +1,26 @@
#import "MGLRasterSource.h"
#import "MGLSource_Private.hpp"
#include <mbgl/style/sources/raster_source.hpp>
@implementation MGLRasterSource
static NSString *MGLRasterSourceType = @"raster";
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier URL:(NSURL *)url tileSize:(CGFloat)tileSize {
if (self = [super initWithSourceIdentifier:sourceIdentifier sourceType:MGLRasterSourceType]) {
_URL = url;
_tileSize = tileSize;
}
return self;
}
- (std::unique_ptr<mbgl::style::Source>)mbgl_source {
auto source = std::make_unique<mbgl::style::RasterSource>(self.sourceIdentifier.UTF8String,
self.URL.absoluteString.UTF8String,
uint16_t(self.tileSize));
return std::move(source);
}
@end

View File

@@ -0,0 +1,47 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
@interface MGLRasterStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Paint Attributes
/**
The opacity at which the image will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterOpacity;
/**
Rotates hues around the color wheel.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterHueRotate;
/**
Increase or reduce the brightness of the image. The value is the minimum brightness.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterBrightnessMin;
/**
Increase or reduce the brightness of the image. The value is the maximum brightness.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterBrightnessMax;
/**
Increase or reduce the saturation of the image.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterSaturation;
/**
Increase or reduce the contrast of the image.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterContrast;
/**
Fade duration when a new tile is added.
*/
@property (nonatomic) id <MGLStyleAttributeValue> rasterFadeDuration;
@end

View File

@@ -0,0 +1,89 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLRasterStyleLayer.h"
#include <mbgl/style/layers/raster_layer.hpp>
@interface MGLRasterStyleLayer ()
@property (nonatomic) mbgl::style::RasterLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLRasterStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::RasterLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Paint Attributes
- (void)setRasterOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterOpacity {
self.layer->setRasterOpacity(rasterOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterOpacity()];
}
- (void)setRasterHueRotate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterHueRotate {
self.layer->setRasterHueRotate(rasterHueRotate.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterHueRotate {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterHueRotate()];
}
- (void)setRasterBrightnessMin:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterBrightnessMin {
self.layer->setRasterBrightnessMin(rasterBrightnessMin.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterBrightnessMin {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterBrightnessMin()];
}
- (void)setRasterBrightnessMax:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterBrightnessMax {
self.layer->setRasterBrightnessMax(rasterBrightnessMax.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterBrightnessMax {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterBrightnessMax()];
}
- (void)setRasterSaturation:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterSaturation {
self.layer->setRasterSaturation(rasterSaturation.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterSaturation {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterSaturation()];
}
- (void)setRasterContrast:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterContrast {
self.layer->setRasterContrast(rasterContrast.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterContrast {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterContrast()];
}
- (void)setRasterFadeDuration:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)rasterFadeDuration {
self.layer->setRasterFadeDuration(rasterFadeDuration.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)rasterFadeDuration {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getRasterFadeDuration()];
}
@end

View File

@@ -0,0 +1,40 @@
<%
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
-%>
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGL<%- camelize(type) %>LayerTests : MGLStyleLayerTests
@end
@implementation MGL<%- camelize(type) %>LayerTests
- (void)test<%- camelize(type) %>Layer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGL<%- camelize(type) %>StyleLayer *layer = [[MGL<%- camelize(type) %>StyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
<% for (const property of layoutProperties) { -%>
<%- testImplementation(property, type) %>
<% } -%>
<% for (const property of paintProperties) { -%>
<%- testImplementation(property, type) %>
<% } -%>
MGL<%- camelize(type) %>StyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
<% for (const property of layoutProperties) { -%>
<%- testGetterImplementation(property, type) %>
<% } -%>
<% for (const property of paintProperties) { -%>
<%- testGetterImplementation(property, type) %>
<% } -%>
}
@end

View File

@@ -0,0 +1,11 @@
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
@interface MGLSource : NSObject
@property (nonatomic, copy) NSString *sourceIdentifier;
@property (nonatomic, copy) NSString *sourceType;
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier sourceType:(NSString *)sourceType;
@end

View File

@@ -0,0 +1,20 @@
#import "MGLSource.h"
#include <mbgl/style/source.hpp>
@implementation MGLSource
- (instancetype)initWithSourceIdentifier:(NSString *)sourceIdentifier sourceType:(NSString *)sourceType {
if (self = [super init]) {
_sourceIdentifier = sourceIdentifier;
_sourceType = sourceType;
}
return self;
}
- (std::unique_ptr<mbgl::style::Source>)mbgl_source {
[NSException raise:@"Subclasses must override this method" format:@""];
return nil;
}
@end

View File

@@ -0,0 +1,10 @@
#import "MGLSource.h"
#include <mbgl/mbgl.hpp>
#include <mbgl/style/source.hpp>
@interface MGLSource (Private)
- (std::unique_ptr<mbgl::style::Source>)mbgl_source;
@end

View File

@@ -2,6 +2,10 @@
#import "MGLTypes.h"
#import "MGLStyleLayer.h"
@class MGLSource;
NS_ASSUME_NONNULL_BEGIN
/**
@@ -32,6 +36,8 @@ static const NSInteger MGLStyleDefaultVersion = 9;
*/
@interface MGLStyle : NSObject
#pragma mark Default Style URLs
/**
Returns the URL to version 8 of the
<a href="https://www.mapbox.com/maps/streets/">Mapbox Streets</a> style.
@@ -158,7 +164,54 @@ static const NSInteger MGLStyleDefaultVersion = 9;
*/
+ (NSURL *)satelliteStreetsStyleURLWithVersion:(NSInteger)version;
- (instancetype)init NS_UNAVAILABLE;
#pragma mark Runtime Styling
/**
Returns a layer that conforms to `MGLStyleLayer` if any layer with the given
identifier was found.
@return layer A layer instance of the corresponding type.
*/
- (nullable id <MGLStyleLayer>)layerWithIdentifier:(NSString *)identifier;
/**
Adds a new layer at the top of the hierarchy.
@param styleLayer The layer object to add to the map view. This object
must conform to the `MGLStyleLayer` protocol.
*/
- (void)addLayer:(id <MGLStyleLayer>)styleLayer;
/**
Inserts a new layer below another layer.
@param styleLayer Layer to be inserted.
@param belowLayer A layer that's already on the map view.
*/
- (void)insertLayer:(id <MGLStyleLayer>)styleLayer
belowLayer:(id <MGLStyleLayer>)belowLayer;
/**
Removes a layer from the map view.
@param styleLayer The layer object to remove from the map view. This object
must conform to the `MGLStyleLayer` protocol.
*/
- (void)removeLayer:(id <MGLStyleLayer>)styleLayer;
/**
Adds a new source to the map view.
@param source The source to add to the map view.
*/
- (void)addSource:(MGLSource *)source;
/**
Removes a source from the map view.
@param source The source to remove.
*/
- (void)removeSource:(MGLSource *)source;
@end

View File

@@ -1,6 +1,32 @@
#import "MGLStyle.h"
#import "MGLMapView_Private.hpp"
#import "MGLStyleLayer.h"
#import "MGLFillStyleLayer.h"
#import "MGLLineStyleLayer.h"
#import "MGLCircleStyleLayer.h"
#import "MGLSymbolStyleLayer.h"
#import "MGLRasterStyleLayer.h"
#import "MGLBackgroundStyleLayer.h"
#import "MGLStyle_Private.hpp"
#import "MGLStyleLayer_Private.hpp"
#import "MGLSource_Private.hpp"
#import "MGLSource.h"
#import <mbgl/util/default_styles.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/layers/line_layer.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/style/sources/geojson_source.hpp>
#include <mbgl/mbgl.hpp>
@interface MGLStyle()
@property (nonatomic, weak) MGLMapView *mapView;
@end
@implementation MGLStyle
@@ -54,4 +80,74 @@ static NSURL *MGLStyleURL_emerald;
return MGLStyleURL_emerald;
}
- (mbgl::style::Layer *)mbglLayerWithIdentifier:(NSString *)identifier
{
return self.mapView.mbglMap->getLayer(identifier.UTF8String);
}
- (mbgl::style::Source *)mbglSourceWithIdentifier:(NSString *)identifier
{
return self.mapView.mbglMap->getSource(identifier.UTF8String);
}
- (id <MGLStyleLayer>)layerWithIdentifier:(NSString *)identifier
{
auto layer = self.mapView.mbglMap->getLayer(identifier.UTF8String);
Class clazz = [self classFromLayer:layer];
id <MGLStyleLayer, MGLStyleLayer_Private> styleLayer = [[clazz alloc] init];
styleLayer.layerIdentifier = identifier;
styleLayer.layer = layer;
styleLayer.mapView = self.mapView;
return styleLayer;
}
- (Class)classFromLayer:(mbgl::style::Layer *)layer
{
if (layer->is<mbgl::style::FillLayer>()) {
return MGLFillStyleLayer.class;
} else if (layer->is<mbgl::style::LineLayer>()) {
return MGLLineStyleLayer.class;
} else if (layer->is<mbgl::style::SymbolLayer>()) {
return MGLSymbolStyleLayer.class;
} else if (layer->is<mbgl::style::RasterLayer>()) {
return MGLRasterStyleLayer.class;
} else if (layer->is<mbgl::style::CircleLayer>()) {
return MGLCircleStyleLayer.class;
} else if (layer->is<mbgl::style::BackgroundLayer>()) {
return MGLBackgroundStyleLayer.class;
}
[NSException raise:@"Layer type not handled" format:@""];
return Nil;
}
- (void)removeLayer:(id <MGLStyleLayer_Private>)styleLayer
{
self.mapView.mbglMap->removeLayer(styleLayer.layer->getID());
}
- (void)addLayer:(id <MGLStyleLayer, MGLStyleLayer_Private>)styleLayer
{
self.mapView.mbglMap->addLayer(std::unique_ptr<mbgl::style::Layer>(styleLayer.layer));
}
- (void)insertLayer:(id <MGLStyleLayer, MGLStyleLayer_Private>)styleLayer
belowLayer:(id <MGLStyleLayer, MGLStyleLayer_Private>)belowLayer
{
const mbgl::optional<std::string> belowLayerId{[belowLayer layerIdentifier].UTF8String};
self.mapView.mbglMap->addLayer(std::unique_ptr<mbgl::style::Layer>(styleLayer.layer), belowLayerId);
}
- (void)addSource:(MGLSource *)source
{
self.mapView.mbglMap->addSource(std::move([source mbgl_source]));
}
- (void)removeSource:(MGLSource *)source
{
self.mapView.mbglMap->removeSource(source.sourceIdentifier.UTF8String);
}
@end

View File

@@ -0,0 +1,25 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue_Private.hpp"
@interface MGLStyleAttribute : NSObject <MGLStyleAttributeValue>
+ (id <MGLStyleAttributeValue>)mbgl_colorPropertyValueWith:(mbgl::style::PropertyValue<mbgl::Color>)property;
+ (id <MGLStyleAttributeValue>)mbgl_numberPropertyValueWith:(mbgl::style::PropertyValue<float>)property;
+ (id <MGLStyleAttributeValue>)mbgl_boolPropertyValueWith:(mbgl::style::PropertyValue<bool>)property;
+ (id <MGLStyleAttributeValue>)mbgl_stringPropertyValueWith:(mbgl::style::PropertyValue<std::string>)property;
+ (id <MGLStyleAttributeValue>)mbgl_offsetPropertyValueWith:(mbgl::style::PropertyValue<std::array<float, 2>>)property;
+ (id <MGLStyleAttributeValue>)mbgl_paddingPropertyValueWith:(mbgl::style::PropertyValue<std::array<float, 4>>)property;
+ (id <MGLStyleAttributeValue>)mbgl_stringArrayPropertyValueWith:(mbgl::style::PropertyValue<std::vector<std::string>>)property;
+ (id <MGLStyleAttributeValue>)mbgl_numberArrayPropertyValueWith:(mbgl::style::PropertyValue<std::vector<float>>)property;
@end

View File

@@ -0,0 +1,111 @@
#import "MGLStyleAttribute.hpp"
#import "MGLStyleAttributeValue_Private.hpp"
#import "MGLStyleAttributeFunction_Private.hpp"
@interface MGLStyleAttribute()
@end
@implementation MGLStyleAttribute
+ (id <MGLStyleAttributeValue>)mbgl_colorPropertyValueWith:(mbgl::style::PropertyValue<mbgl::Color>)property
{
if (property.isConstant()) {
return [MGLColor mbgl_colorWithColor:property.asConstant()];
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithColorPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id <MGLStyleAttributeValue>)mbgl_numberPropertyValueWith:(mbgl::style::PropertyValue<float>)property
{
if (property.isConstant()) {
return @(property.asConstant());
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithNumberPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_boolPropertyValueWith:(mbgl::style::PropertyValue<bool>)property
{
if (property.isConstant()) {
return @(property.asConstant());
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithBoolPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_stringPropertyValueWith:(mbgl::style::PropertyValue<std::string>)property
{
if (property.isConstant()) {
return @(property.asConstant().c_str());
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithStringPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_offsetPropertyValueWith:(mbgl::style::PropertyValue<std::array<float, 2> >)property
{
if (property.isConstant()) {
auto offset = property.asConstant();
return @[@(offset[0]), @(offset[1])];
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithOffsetPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_paddingPropertyValueWith:(mbgl::style::PropertyValue<std::array<float, 4> >)property
{
if (property.isConstant()) {
auto padding = property.asConstant();
return @[@(padding[0]), @(padding[1]), @(padding[2]), @(padding[3])];
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithPaddingPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_stringArrayPropertyValueWith:(mbgl::style::PropertyValue<std::vector<std::string> >)property
{
if (property.isConstant()) {
auto strings = property.asConstant();
NSMutableArray *convertedStrings = [[NSMutableArray alloc] initWithCapacity:strings.size()];
for (auto string : strings) {
[convertedStrings addObject:@(string.c_str())];
}
return convertedStrings;
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithStringArrayPropertyValue:property.asFunction()];
} else {
return nil;
}
}
+ (id<MGLStyleAttributeValue>)mbgl_numberArrayPropertyValueWith:(mbgl::style::PropertyValue<std::vector<float> >)property
{
if (property.isConstant()) {
auto numbers = property.asConstant();
NSMutableArray *convertedNumbers = [NSMutableArray arrayWithCapacity:numbers.size()];
for (auto number : numbers) {
[convertedNumbers addObject:@(number)];
}
return convertedNumbers;
} else if (property.isFunction()) {
return [MGLStyleAttributeFunction functionWithNumberArrayPropertyValue:property.asFunction()];
} else {
return nil;
}
}
@end

View File

@@ -0,0 +1,26 @@
#import <Foundation/Foundation.h>
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
typedef NS_ENUM(NSUInteger, MGLStyleAttributeFunctionType) {
MGLStyleAttributeFunctionTypeExponential,
MGLStyleAttributeFunctionTypeInterval,
MGLStyleAttributeFunctionTypeCategorical
};
NS_ASSUME_NONNULL_BEGIN
@interface MGLStyleAttributeFunction : NSObject <MGLStyleAttributeValue>
@property (nonatomic, copy) NSDictionary<NSNumber *, id> *stops;
@property (nonatomic, copy, nullable) NSString *property;
@property (nonatomic, copy, nullable) NSNumber *base;
@property (nonatomic, copy, nullable) NSNumber *functionType;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,243 @@
#import "MGLStyleAttributeFunction.h"
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue_Private.hpp"
#import "MGLStyleAttributeFunction_Private.hpp"
@interface MGLStyleAttributeFunction() <MGLStyleAttributeValue_Private>
@end
@implementation MGLStyleAttributeFunction
- (instancetype)init
{
if (self = [super init]) {
_base = @1;
}
return self;
}
- (BOOL)isFunction
{
return YES;
}
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue
{
__block std::vector<std::pair<float, mbgl::Color>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, MGLColor * _Nonnull color, BOOL * _Nonnull stop) {
NSAssert([color isKindOfClass:[MGLColor class]], @"Stops should be colors");
stops.emplace_back(zoomKey.floatValue, color.mbgl_color);
}];
return mbgl::style::Function<mbgl::Color>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<float>)mbgl_floatPropertyValue
{
__block std::vector<std::pair<float, float>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSNumber * _Nonnull number, BOOL * _Nonnull stop) {
NSAssert([number isKindOfClass:[NSNumber class]], @"Stops should be NSNumbers");
stops.emplace_back(zoomKey.floatValue, number.floatValue);
}];
return mbgl::style::Function<float>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<bool>)mbgl_boolPropertyValue
{
__block std::vector<std::pair<float, bool>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSNumber * _Nonnull number, BOOL * _Nonnull stop) {
NSAssert([number isKindOfClass:[NSNumber class]], @"Stops should be NSNumbers");
stops.emplace_back(zoomKey.floatValue, number.boolValue);
}];
return mbgl::style::Function<bool>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<std::string>)mbgl_stringPropertyValue
{
__block std::vector<std::pair<float, std::string>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSString * _Nonnull string, BOOL * _Nonnull stop) {
NSAssert([string isKindOfClass:[NSString class]], @"Stops should be strings");
stops.emplace_back(zoomKey.floatValue, string.UTF8String);
}];
return mbgl::style::Function<std::string>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<std::vector<std::string> >)mbgl_stringArrayPropertyValue
{
__block std::vector<std::pair<float, std::vector<std::string>>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSArray * _Nonnull strings, BOOL * _Nonnull stop) {
NSAssert([strings isKindOfClass:[NSArray class]], @"Stops should be NSArray");
std::vector<std::string>convertedStrings;
for (NSString *string in strings) {
convertedStrings.emplace_back(string.UTF8String);
}
stops.emplace_back(zoomKey.floatValue, convertedStrings);
}];
return mbgl::style::Function<std::vector<std::string>>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<std::vector<float> >)mbgl_numberArrayPropertyValue
{
__block std::vector<std::pair<float, std::vector<float>>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSArray * _Nonnull numbers, BOOL * _Nonnull stop) {
NSAssert([numbers isKindOfClass:[NSArray class]], @"Stops should be NSArray");
std::vector<float>convertedNumbers;
for (NSNumber *number in numbers) {
convertedNumbers.emplace_back(number.floatValue);
}
stops.emplace_back(zoomKey.floatValue, convertedNumbers);
}];
return mbgl::style::Function<std::vector<float>>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<std::array<float, 4> >)mbgl_paddingPropertyValue
{
__block std::vector<std::pair<float, std::array<float, 4>>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSArray * _Nonnull padding, BOOL * _Nonnull stop) {
NSAssert([padding isKindOfClass:[NSArray class]], @"Stops should be NSArray");
NSNumber *top = padding[0];
NSNumber *left = padding[1];
NSNumber *bottom = padding[2];
NSNumber *right = padding[2];
auto pad = std::array<float, 4>({{top.floatValue, left.floatValue, bottom.floatValue, right.floatValue}});
stops.emplace_back(zoomKey.floatValue, pad);
}];
return mbgl::style::Function<std::array<float, 4>>({{stops}}, _base.floatValue);
}
- (mbgl::style::PropertyValue<std::array<float, 2> >)mbgl_offsetPropertyValue
{
__block std::vector<std::pair<float, std::array<float, 2>>> stops;
[self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSArray * _Nonnull offset, BOOL * _Nonnull stop) {
NSAssert([offset isKindOfClass:[NSArray class]], @"Stops should be NSArray");
NSNumber *dx = offset[0];
NSNumber *dy = offset[1];
auto off = std::array<float, 2>({{dx.floatValue, dy.floatValue}});
stops.emplace_back(zoomKey.floatValue, off);
}];
return mbgl::style::Function<std::array<float, 2>>({{stops}}, _base.floatValue);
}
+ (instancetype)functionWithColorPropertyValue:(mbgl::style::Function<mbgl::Color>)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = [MGLColor mbgl_colorWithColor:stop.second];
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithNumberPropertyValue:(mbgl::style::Function<float>)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = @(stop.second);
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithBoolPropertyValue:(mbgl::style::Function<bool>)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = @(stop.second);
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithStringPropertyValue:(mbgl::style::Function<std::string>)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = @(stop.second.c_str());
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithOffsetPropertyValue:(mbgl::style::Function<std::array<float, 2> >)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = @[@(stop.second[0]), @(stop.second[1])];
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithPaddingPropertyValue:(mbgl::style::Function<std::array<float, 4> >)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
convertedStops[@(stop.first)] = @[@(stop.second[0]), @(stop.second[1]), @(stop.second[2]), @(stop.second[3])];
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithStringArrayPropertyValue:(mbgl::style::Function<std::vector<std::string> >)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
auto strings = stop.second;
NSMutableArray *convertedStrings = [NSMutableArray arrayWithCapacity:strings.size()];
for (auto const& string: strings) {
[convertedStrings addObject:@(string.c_str())];
}
convertedStops[@(stop.first)] = convertedStrings;
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
+ (instancetype)functionWithNumberArrayPropertyValue:(mbgl::style::Function<std::vector<float> >)property
{
MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init];
auto stops = property.getStops();
NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()];
for (auto stop : stops) {
auto numbers = stop.second;
NSMutableArray *convertedNumbers = [NSMutableArray arrayWithCapacity:numbers.size()];
for (auto const& number: numbers) {
[convertedNumbers addObject:@(number)];
}
convertedStops[@(stop.first)] = convertedNumbers;
}
function.base = @(property.getBase());
function.stops = convertedStops;
return function;
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p, base = %@; stops = %@>",
NSStringFromClass([self class]), (void *)self,
self.base,
self.stops];
}
@end

View File

@@ -0,0 +1,61 @@
#import "MGLStyleAttributeFunction.h"
#include <mbgl/util/color.hpp>
#include <mbgl/style/function.hpp>
#include <mbgl/style/property_value.hpp>
#define MGLSetEnumProperty(name, Name, MBGLType, ObjCType) \
if (name.isFunction) { \
NSAssert([name isKindOfClass:[MGLStyleAttributeFunction class]], @"" #name @" should be a function"); \
\
__block std::vector<std::pair<float, mbgl::style::MBGLType>> stops; \
[[(MGLStyleAttributeFunction *)name stops] enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull key, NSValue * _Nonnull obj, BOOL * _Nonnull stop) { \
NSAssert([obj isKindOfClass:[NSValue class]], @"Stops in " #name @" should be NSValues"); \
ObjCType value; \
[obj getValue:&value]; \
stops.emplace_back(key.floatValue, static_cast<mbgl::style::MBGLType>(value)); \
}]; \
auto function = mbgl::style::Function<mbgl::style::MBGLType> { \
stops, \
[(MGLStyleAttributeFunction *)name base].floatValue, \
}; \
self.layer->set##Name(function); \
} else { \
NSAssert([name isKindOfClass:[NSValue class]], @"" #name @"should be an NSValue"); \
ObjCType value; \
[(NSValue *)name getValue:&value]; \
self.layer->set##Name({ static_cast<mbgl::style::MBGLType>(value) }); \
}
#define MGLGetEnumProperty(Name, MBGLType, ObjCType) \
const char *type = @encode(ObjCType); \
mbgl::style::PropertyValue<mbgl::style::MBGLType> property = self.layer->get##Name(); \
if (property.isConstant()) { \
return [NSValue value:&property.asConstant() withObjCType:type]; \
} else if (property.isFunction()) { \
return nil; \
} else { \
return nil; \
}
@interface MGLStyleAttributeFunction(Private)
+ (instancetype)functionWithColorPropertyValue:(mbgl::style::Function<mbgl::Color>)property;
+ (instancetype)functionWithNumberPropertyValue:(mbgl::style::Function<float>)property;
+ (instancetype)functionWithBoolPropertyValue:(mbgl::style::Function<bool>)property;
+ (instancetype)functionWithStringPropertyValue:(mbgl::style::Function<std::string>)property;
+ (instancetype)functionWithOffsetPropertyValue:(mbgl::style::Function<std::array<float, 2>>)property;
+ (instancetype)functionWithPaddingPropertyValue:(mbgl::style::Function<std::array<float, 4>>)property;
+ (instancetype)functionWithStringArrayPropertyValue:(mbgl::style::Function<std::vector<std::string>>)property;
+ (instancetype)functionWithNumberArrayPropertyValue:(mbgl::style::Function<std::vector<float>>)property;
+ (instancetype)functionWithEnumProperyValue:(mbgl::style::Function<bool>)property type:(const char *)type;
@end;

View File

@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import "MGLTypes.h"
@protocol MGLStyleAttributeValue <NSObject>
@optional
@end

View File

@@ -0,0 +1,25 @@
#import <Foundation/Foundation.h>
#import "MGLTypes.h"
#import "MGLStyleAttributeFunction_Private.hpp"
#include <array>
@protocol MGLStyleAttributeValue_Private <NSObject>
- (BOOL)isFunction;
@optional
// Convert darwin types to mbgl types
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue;
- (mbgl::style::PropertyValue<float>)mbgl_floatPropertyValue;
- (mbgl::style::PropertyValue<bool>)mbgl_boolPropertyValue;
- (mbgl::style::PropertyValue<std::string>)mbgl_stringPropertyValue;
- (mbgl::style::PropertyValue<std::array<float, 2>>)mbgl_offsetPropertyValue;
- (mbgl::style::PropertyValue<std::array<float, 4>>)mbgl_paddingPropertyValue;
- (mbgl::style::PropertyValue<std::vector<std::string> >)mbgl_stringArrayPropertyValue;
- (mbgl::style::PropertyValue<std::vector<float> >)mbgl_numberArrayPropertyValue;
- (mbgl::style::PropertyValue<uint8_t>)mbgl_enumPropertyValue;
// Convert mbgl types to darwin types
- (id <MGLStyleAttributeValue>)mbgl_colorPropertyValueWith:(mbgl::style::PropertyValue<mbgl::Color>)color;
@end

View File

@@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface MGLStyleFilter : NSObject
@end

View File

@@ -0,0 +1,5 @@
#import "MGLStyleFilter.h"
@implementation MGLStyleFilter
@end

View File

@@ -0,0 +1,17 @@
#import <Foundation/Foundation.h>
@class MGLMapView;
@protocol MGLStyleLayer <NSObject>
@property (nonatomic, weak) MGLMapView *mapView;
@property (nonatomic, copy, readonly) NSString *layerIdentifier;
@optional
@property (nonatomic, readonly) NSString *sourceIdentifier;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier;
@end

View File

@@ -0,0 +1,55 @@
<%
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
-%>
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
<% for (const property of layoutProperties) { -%>
<% if (property.type == "enum") { -%>
typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %>) {
<% for (const value of property.values) { -%>
MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
};
<% } -%>
<% } -%>
<% for (const property of paintProperties) { -%>
<% if (property.type == "enum") { -%>
typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %>) {
<% for (const value of property.values) { -%>
MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
};
<% } -%>
<% } -%>
@interface MGL<%- camelize(type) %>StyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
<% if (layoutProperties.length) { -%>
#pragma mark - Accessing the Layout Attributes
<% for (const property of layoutProperties) { -%>
/**
<%- property.doc %>
*/
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
<% } -%>
<% } -%>
#pragma mark - Accessing the Paint Attributes
<% for (const property of paintProperties) { -%>
/**
<%- property.doc %>
*/
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
<% } -%>
@end

View File

@@ -0,0 +1,5 @@
#import "MGLStyleLayer.h"
#import "MGLTypes.h"
#import "MGLStyleLayer_Private.hpp"
#import "MGLMapView_Private.hpp"

View File

@@ -0,0 +1,64 @@
<%
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
-%>
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGL<%- camelize(type) %>StyleLayer.h"
#include <mbgl/style/layers/<%- type %>_layer.hpp>
@interface MGL<%- camelize(type) %>StyleLayer ()
@property (nonatomic) mbgl::style::<%- camelize(type) %>Layer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGL<%- camelize(type) %>StyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
<%- initLayer(type) %>
}
return self;
}
<% if (layoutProperties.length) { -%>
#pragma mark - Accessing the Layout Attributes
<% for (const property of layoutProperties) { -%>
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
<%- setterImplementation(property, type) %>
}
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
<%- getterImplementation(property, type) %>
}
<% } -%>
<% } -%>
<% if (paintProperties.length) { -%>
#pragma mark - Accessing the Paint Attributes
<% for (const property of paintProperties) { -%>
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
<%- setterImplementation(property, type) %>
}
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
<%- getterImplementation(property, type) %>
}
<% } -%>
<% } -%>
@end

View File

@@ -0,0 +1,30 @@
#import <Foundation/Foundation.h>
#include <mbgl/style/layer.hpp>
#import "MGLStyleLayer.h"
#import "MGLStyleAttribute.hpp"
#import "NSNumber+MGLStyleAttributeAdditions_Private.hpp"
#import "NSArray+MGLStyleAttributeAdditions_Private.hpp"
#import "NSString+MGLStyleAttributeAdditions_Private.hpp"
#import "NSValue+MGLStyleAttributeAdditions_Private.hpp"
#import "MGLStyleAttributeFunction_Private.hpp"
#import "MGLStyleAttributeValue_Private.hpp"
#if TARGET_OS_IPHONE
#import "UIColor+MGLAdditions.hpp"
#import "UIColor+MGLStyleAttributeAdditions_Private.hpp"
#else
#import "NSColor+MGLAdditions.hpp"
#import "NSColor+MGLStyleAttributeAdditions_Private.hpp"
#endif
@class MGLMapView;
@protocol MGLStyleLayer_Private <MGLStyleLayer>
@property (nonatomic, weak) MGLMapView *mapView;
@property (nonatomic, readwrite, copy) NSString *layerIdentifier;
@property (nonatomic) mbgl::style::Layer *layer;
@end

View File

@@ -0,0 +1,10 @@
#import "MGLStyle.h"
#import "MGLStyleLayer.h"
#import "MGLFillStyleLayer.h"
#import <mbgl/util/default_styles.hpp>
#include <mbgl/mbgl.hpp>
@interface MGLStyle (Private)
@property (nonatomic, weak) MGLMapView *mapView;
@end

View File

@@ -0,0 +1,315 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerSymbolPlacement) {
MGLSymbolStyleLayerSymbolPlacementPoint,
MGLSymbolStyleLayerSymbolPlacementLine,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerIconRotationAlignment) {
MGLSymbolStyleLayerIconRotationAlignmentMap,
MGLSymbolStyleLayerIconRotationAlignmentViewport,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerIconTextFit) {
MGLSymbolStyleLayerIconTextFitNone,
MGLSymbolStyleLayerIconTextFitBoth,
MGLSymbolStyleLayerIconTextFitWidth,
MGLSymbolStyleLayerIconTextFitHeight,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextPitchAlignment) {
MGLSymbolStyleLayerTextPitchAlignmentMap,
MGLSymbolStyleLayerTextPitchAlignmentViewport,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextRotationAlignment) {
MGLSymbolStyleLayerTextRotationAlignmentMap,
MGLSymbolStyleLayerTextRotationAlignmentViewport,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextJustify) {
MGLSymbolStyleLayerTextJustifyLeft,
MGLSymbolStyleLayerTextJustifyCenter,
MGLSymbolStyleLayerTextJustifyRight,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextAnchor) {
MGLSymbolStyleLayerTextAnchorCenter,
MGLSymbolStyleLayerTextAnchorLeft,
MGLSymbolStyleLayerTextAnchorRight,
MGLSymbolStyleLayerTextAnchorTop,
MGLSymbolStyleLayerTextAnchorBottom,
MGLSymbolStyleLayerTextAnchorTopLeft,
MGLSymbolStyleLayerTextAnchorTopRight,
MGLSymbolStyleLayerTextAnchorBottomLeft,
MGLSymbolStyleLayerTextAnchorBottomRight,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTransform) {
MGLSymbolStyleLayerTextTransformNone,
MGLSymbolStyleLayerTextTransformUppercase,
MGLSymbolStyleLayerTextTransformLowercase,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerIconTranslateAnchor) {
MGLSymbolStyleLayerIconTranslateAnchorMap,
MGLSymbolStyleLayerIconTranslateAnchorViewport,
};
typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
MGLSymbolStyleLayerTextTranslateAnchorMap,
MGLSymbolStyleLayerTextTranslateAnchorViewport,
};
@interface MGLSymbolStyleLayer : MGLBaseStyleLayer <MGLStyleLayer>
#pragma mark - Accessing the Layout Attributes
/**
Label placement relative to its geometry. `line` can only be used on LineStrings and Polygons.
*/
@property (nonatomic) id <MGLStyleAttributeValue> symbolPlacement;
/**
Distance between two symbol anchors.
*/
@property (nonatomic) id <MGLStyleAttributeValue> symbolSpacing;
/**
If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
*/
@property (nonatomic) id <MGLStyleAttributeValue> symbolAvoidEdges;
/**
If true, the icon will be visible even if it collides with other previously drawn symbols.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconAllowOverlap;
/**
If true, other symbols can be visible even if they collide with the icon.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconIgnorePlacement;
/**
If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconOptional;
/**
Orientation of icon when map is rotated.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconRotationAlignment;
/**
Scale factor for icon. 1 is original size, 3 triples the size.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconSize;
/**
Position and scale an icon by the its corresponding text.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconTextFit;
/**
Size of padding area around the text-fit size in clockwise order: top, right, bottom, left.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconTextFitPadding;
/**
A string with {tokens} replaced, referencing the data property to pull from.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconImage;
/**
Rotates the icon clockwise.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconRotate;
/**
Size of the additional area around the icon bounding box used for detecting symbol collisions.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconPadding;
/**
If true, the icon may be flipped to prevent it from being rendered upside-down.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconKeepUpright;
/**
Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconOffset;
/**
Aligns text to the plane of the `viewport` or the `map` when the map is pitched. Matches `text-rotation-alignment` if unspecified.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textPitchAlignment;
/**
Orientation of text when map is rotated.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textRotationAlignment;
/**
Value to use for a text label. Feature properties are specified using tokens like {field_name}.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textField;
/**
Font stack to use for displaying text.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textFont;
/**
Font size.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textSize;
/**
The maximum line width for text wrapping.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textMaxWidth;
/**
Text leading value for multi-line text.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textLineHeight;
/**
Text tracking amount.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textLetterSpacing;
/**
Text justification options.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textJustify;
/**
Part of the text placed closest to the anchor.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textAnchor;
/**
Maximum angle change between adjacent characters.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textMaxAngle;
/**
Rotates the text clockwise.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textRotate;
/**
Size of the additional area around the text bounding box used for detecting symbol collisions.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textPadding;
/**
If true, the text may be flipped vertically to prevent it from being rendered upside-down.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textKeepUpright;
/**
Specifies how to capitalize text, similar to the CSS `text-transform` property.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textTransform;
/**
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textOffset;
/**
If true, the text will be visible even if it collides with other previously drawn symbols.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textAllowOverlap;
/**
If true, other symbols can be visible even if they collide with the text.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textIgnorePlacement;
/**
If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textOptional;
#pragma mark - Accessing the Paint Attributes
/**
The opacity at which the icon will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconOpacity;
/**
The color of the icon. This can only be used with sdf icons.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconColor;
/**
The color of the icon's halo. Icon halos can only be used with sdf icons.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconHaloColor;
/**
Distance of halo to the icon outline.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconHaloWidth;
/**
Fade out the halo towards the outside.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconHaloBlur;
/**
Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen).
*/
@property (nonatomic) id <MGLStyleAttributeValue> iconTranslateAnchor;
/**
The opacity at which the text will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textOpacity;
/**
The color with which the text will be drawn.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textColor;
/**
The color of the text's halo, which helps it stand out from backgrounds.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textHaloColor;
/**
Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textHaloWidth;
/**
The halo's fadeout distance towards the outside.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textHaloBlur;
/**
Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
*/
@property (nonatomic) id <MGLStyleAttributeValue> textTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen).
*/
@property (nonatomic) id <MGLStyleAttributeValue> textTranslateAnchor;
@end

View File

@@ -0,0 +1,419 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayer_Private.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLSymbolStyleLayer.h"
#include <mbgl/style/layers/symbol_layer.hpp>
@interface MGLSymbolStyleLayer ()
@property (nonatomic) mbgl::style::SymbolLayer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGLSymbolStyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
_layer = new mbgl::style::SymbolLayer(layerIdentifier.UTF8String, sourceIdentifier.UTF8String);
}
return self;
}
#pragma mark - Accessing the Layout Attributes
- (void)setSymbolPlacement:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)symbolPlacement {
MGLSetEnumProperty(symbolPlacement, SymbolPlacement, SymbolPlacementType, MGLSymbolStyleLayerSymbolPlacement);
}
- (id <MGLStyleAttributeValue>)symbolPlacement {
MGLGetEnumProperty(SymbolPlacement, SymbolPlacementType, MGLSymbolStyleLayerSymbolPlacement);
}
- (void)setSymbolSpacing:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)symbolSpacing {
self.layer->setSymbolSpacing(symbolSpacing.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)symbolSpacing {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getSymbolSpacing()];
}
- (void)setSymbolAvoidEdges:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)symbolAvoidEdges {
self.layer->setSymbolAvoidEdges(symbolAvoidEdges.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)symbolAvoidEdges {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getSymbolAvoidEdges()];
}
- (void)setIconAllowOverlap:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconAllowOverlap {
self.layer->setIconAllowOverlap(iconAllowOverlap.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconAllowOverlap {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconAllowOverlap()];
}
- (void)setIconIgnorePlacement:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconIgnorePlacement {
self.layer->setIconIgnorePlacement(iconIgnorePlacement.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconIgnorePlacement {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconIgnorePlacement()];
}
- (void)setIconOptional:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconOptional {
self.layer->setIconOptional(iconOptional.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconOptional {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconOptional()];
}
- (void)setIconRotationAlignment:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconRotationAlignment {
MGLSetEnumProperty(iconRotationAlignment, IconRotationAlignment, AlignmentType, MGLSymbolStyleLayerIconRotationAlignment);
}
- (id <MGLStyleAttributeValue>)iconRotationAlignment {
MGLGetEnumProperty(IconRotationAlignment, AlignmentType, MGLSymbolStyleLayerIconRotationAlignment);
}
- (void)setIconSize:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconSize {
self.layer->setIconSize(iconSize.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconSize {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconSize()];
}
- (void)setIconTextFit:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconTextFit {
MGLSetEnumProperty(iconTextFit, IconTextFit, IconTextFitType, MGLSymbolStyleLayerIconTextFit);
}
- (id <MGLStyleAttributeValue>)iconTextFit {
MGLGetEnumProperty(IconTextFit, IconTextFitType, MGLSymbolStyleLayerIconTextFit);
}
- (void)setIconTextFitPadding:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconTextFitPadding {
self.layer->setIconTextFitPadding(iconTextFitPadding.mbgl_paddingPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconTextFitPadding {
return [MGLStyleAttribute mbgl_paddingPropertyValueWith:self.layer->getIconTextFitPadding()];
}
- (void)setIconImage:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconImage {
self.layer->setIconImage(iconImage.mbgl_stringPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconImage {
return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getIconImage()];
}
- (void)setIconRotate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconRotate {
self.layer->setIconRotate(iconRotate.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconRotate {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconRotate()];
}
- (void)setIconPadding:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconPadding {
self.layer->setIconPadding(iconPadding.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconPadding {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconPadding()];
}
- (void)setIconKeepUpright:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconKeepUpright {
self.layer->setIconKeepUpright(iconKeepUpright.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconKeepUpright {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getIconKeepUpright()];
}
- (void)setIconOffset:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconOffset {
self.layer->setIconOffset(iconOffset.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconOffset {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getIconOffset()];
}
- (void)setTextPitchAlignment:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textPitchAlignment {
MGLSetEnumProperty(textPitchAlignment, TextPitchAlignment, AlignmentType, MGLSymbolStyleLayerTextPitchAlignment);
}
- (id <MGLStyleAttributeValue>)textPitchAlignment {
MGLGetEnumProperty(TextPitchAlignment, AlignmentType, MGLSymbolStyleLayerTextPitchAlignment);
}
- (void)setTextRotationAlignment:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textRotationAlignment {
MGLSetEnumProperty(textRotationAlignment, TextRotationAlignment, AlignmentType, MGLSymbolStyleLayerTextRotationAlignment);
}
- (id <MGLStyleAttributeValue>)textRotationAlignment {
MGLGetEnumProperty(TextRotationAlignment, AlignmentType, MGLSymbolStyleLayerTextRotationAlignment);
}
- (void)setTextField:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textField {
self.layer->setTextField(textField.mbgl_stringPropertyValue);
}
- (id <MGLStyleAttributeValue>)textField {
return [MGLStyleAttribute mbgl_stringPropertyValueWith:self.layer->getTextField()];
}
- (void)setTextFont:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textFont {
self.layer->setTextFont(textFont.mbgl_stringArrayPropertyValue);
}
- (id <MGLStyleAttributeValue>)textFont {
return [MGLStyleAttribute mbgl_stringArrayPropertyValueWith:self.layer->getTextFont()];
}
- (void)setTextSize:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textSize {
self.layer->setTextSize(textSize.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textSize {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextSize()];
}
- (void)setTextMaxWidth:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textMaxWidth {
self.layer->setTextMaxWidth(textMaxWidth.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textMaxWidth {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextMaxWidth()];
}
- (void)setTextLineHeight:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textLineHeight {
self.layer->setTextLineHeight(textLineHeight.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textLineHeight {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextLineHeight()];
}
- (void)setTextLetterSpacing:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textLetterSpacing {
self.layer->setTextLetterSpacing(textLetterSpacing.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textLetterSpacing {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextLetterSpacing()];
}
- (void)setTextJustify:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textJustify {
MGLSetEnumProperty(textJustify, TextJustify, TextJustifyType, MGLSymbolStyleLayerTextJustify);
}
- (id <MGLStyleAttributeValue>)textJustify {
MGLGetEnumProperty(TextJustify, TextJustifyType, MGLSymbolStyleLayerTextJustify);
}
- (void)setTextAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textAnchor {
MGLSetEnumProperty(textAnchor, TextAnchor, TextAnchorType, MGLSymbolStyleLayerTextAnchor);
}
- (id <MGLStyleAttributeValue>)textAnchor {
MGLGetEnumProperty(TextAnchor, TextAnchorType, MGLSymbolStyleLayerTextAnchor);
}
- (void)setTextMaxAngle:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textMaxAngle {
self.layer->setTextMaxAngle(textMaxAngle.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textMaxAngle {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextMaxAngle()];
}
- (void)setTextRotate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textRotate {
self.layer->setTextRotate(textRotate.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textRotate {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextRotate()];
}
- (void)setTextPadding:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textPadding {
self.layer->setTextPadding(textPadding.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textPadding {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextPadding()];
}
- (void)setTextKeepUpright:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textKeepUpright {
self.layer->setTextKeepUpright(textKeepUpright.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)textKeepUpright {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextKeepUpright()];
}
- (void)setTextTransform:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textTransform {
MGLSetEnumProperty(textTransform, TextTransform, TextTransformType, MGLSymbolStyleLayerTextTransform);
}
- (id <MGLStyleAttributeValue>)textTransform {
MGLGetEnumProperty(TextTransform, TextTransformType, MGLSymbolStyleLayerTextTransform);
}
- (void)setTextOffset:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textOffset {
self.layer->setTextOffset(textOffset.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)textOffset {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getTextOffset()];
}
- (void)setTextAllowOverlap:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textAllowOverlap {
self.layer->setTextAllowOverlap(textAllowOverlap.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)textAllowOverlap {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextAllowOverlap()];
}
- (void)setTextIgnorePlacement:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textIgnorePlacement {
self.layer->setTextIgnorePlacement(textIgnorePlacement.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)textIgnorePlacement {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextIgnorePlacement()];
}
- (void)setTextOptional:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textOptional {
self.layer->setTextOptional(textOptional.mbgl_boolPropertyValue);
}
- (id <MGLStyleAttributeValue>)textOptional {
return [MGLStyleAttribute mbgl_boolPropertyValueWith:self.layer->getTextOptional()];
}
#pragma mark - Accessing the Paint Attributes
- (void)setIconOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconOpacity {
self.layer->setIconOpacity(iconOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconOpacity()];
}
- (void)setIconColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconColor {
self.layer->setIconColor(iconColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getIconColor()];
}
- (void)setIconHaloColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconHaloColor {
self.layer->setIconHaloColor(iconHaloColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconHaloColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getIconHaloColor()];
}
- (void)setIconHaloWidth:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconHaloWidth {
self.layer->setIconHaloWidth(iconHaloWidth.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconHaloWidth {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconHaloWidth()];
}
- (void)setIconHaloBlur:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconHaloBlur {
self.layer->setIconHaloBlur(iconHaloBlur.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconHaloBlur {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getIconHaloBlur()];
}
- (void)setIconTranslate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconTranslate {
self.layer->setIconTranslate(iconTranslate.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)iconTranslate {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getIconTranslate()];
}
- (void)setIconTranslateAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)iconTranslateAnchor {
MGLSetEnumProperty(iconTranslateAnchor, IconTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerIconTranslateAnchor);
}
- (id <MGLStyleAttributeValue>)iconTranslateAnchor {
MGLGetEnumProperty(IconTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerIconTranslateAnchor);
}
- (void)setTextOpacity:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textOpacity {
self.layer->setTextOpacity(textOpacity.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textOpacity {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextOpacity()];
}
- (void)setTextColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textColor {
self.layer->setTextColor(textColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)textColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getTextColor()];
}
- (void)setTextHaloColor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textHaloColor {
self.layer->setTextHaloColor(textHaloColor.mbgl_colorPropertyValue);
}
- (id <MGLStyleAttributeValue>)textHaloColor {
return [MGLStyleAttribute mbgl_colorPropertyValueWith:self.layer->getTextHaloColor()];
}
- (void)setTextHaloWidth:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textHaloWidth {
self.layer->setTextHaloWidth(textHaloWidth.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textHaloWidth {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextHaloWidth()];
}
- (void)setTextHaloBlur:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textHaloBlur {
self.layer->setTextHaloBlur(textHaloBlur.mbgl_floatPropertyValue);
}
- (id <MGLStyleAttributeValue>)textHaloBlur {
return [MGLStyleAttribute mbgl_numberPropertyValueWith:self.layer->getTextHaloBlur()];
}
- (void)setTextTranslate:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textTranslate {
self.layer->setTextTranslate(textTranslate.mbgl_offsetPropertyValue);
}
- (id <MGLStyleAttributeValue>)textTranslate {
return [MGLStyleAttribute mbgl_offsetPropertyValueWith:self.layer->getTextTranslate()];
}
- (void)setTextTranslateAnchor:(id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>)textTranslateAnchor {
MGLSetEnumProperty(textTranslateAnchor, TextTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerTextTranslateAnchor);
}
- (id <MGLStyleAttributeValue>)textTranslateAnchor {
MGLGetEnumProperty(TextTranslateAnchor, TranslateAnchorType, MGLSymbolStyleLayerTextTranslateAnchor);
}
@end

View File

@@ -12,6 +12,14 @@
#define _Nonnull
#endif
#if TARGET_OS_IPHONE
@class UIColor;
#define MGLColor UIColor
#else
@class NSColor;
#define MGLColor NSColor
#endif
NS_ASSUME_NONNULL_BEGIN
/** Indicates an error occurred in the Mapbox SDK. */

View File

@@ -0,0 +1,5 @@
#import "MGLSource.h"
@interface MGLVectorSource : MGLSource
@end

View File

@@ -0,0 +1,5 @@
#import "MGLVectorSource.h"
@implementation MGLVectorSource
@end

View File

@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
@interface NSArray (MGLStyleAttributeAdditions) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,54 @@
#import "NSArray+MGLStyleAttributeAdditions.h"
#import "NSArray+MGLStyleAttributeAdditions_Private.hpp"
#import "MGLStyleAttributeValue_Private.hpp"
#include <array>
@interface NSArray(Private) <MGLStyleAttributeValue_Private>
@end
@implementation NSArray (MGLStyleAttributeAdditions)
- (mbgl::style::PropertyValue<std::array<float, 2>>)mbgl_offsetPropertyValue
{
NSAssert(self.count == 2, @"Offset must contain 2 values (dx, dy)");
NSNumber *dx = self[0];
NSNumber *dy = self[1];
return {{dx.floatValue, dy.floatValue}};
}
- (mbgl::style::PropertyValue<std::array<float, 4> >)mbgl_paddingPropertyValue
{
NSAssert(self.count == 4, @"Padding must contain 4 values (top, left, bottom & right)");
NSNumber *top = self[0];
NSNumber *left = self[1];
NSNumber *bottom = self[2];
NSNumber *right = self[3];
return {{top.floatValue, left.floatValue, bottom.floatValue, right.floatValue}};
}
- (mbgl::style::PropertyValue<std::vector<std::string> >)mbgl_stringArrayPropertyValue
{
std::vector<std::string>fonts;
for (NSString *font in self) {
fonts.emplace_back(font.UTF8String);
}
return {{fonts}};
}
- (mbgl::style::PropertyValue<std::vector<float> >)mbgl_numberArrayPropertyValue
{
std::vector<float>values;
for (NSNumber *n in self) {
values.emplace_back(n.floatValue);
}
return {{values}};
}
@end

View File

@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface NSArray (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,7 @@
#import <Cocoa/Cocoa.h>
#import "MGLStyleAttributeValue.h"
@interface NSColor (MGLStyleAttributeAdditions) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,5 @@
#import "NSColor+MGLStyleAttributeAdditions.h"
@implementation NSColor (MGLStyleAttributeAdditions)
@end

View File

@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface NSColor (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
@interface NSNumber (MGLStyleAttributeAdditions) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,22 @@
#import "NSNumber+MGLStyleAttributeAdditions.h"
#include <mbgl/style/property_value.hpp>
@implementation NSNumber (MGLStyleAttributeAdditions)
- (NSNumber *)numberValue
{
return self;
}
- (mbgl::style::PropertyValue<bool>)mbgl_boolPropertyValue
{
return mbgl::style::PropertyValue<bool> { !!self.boolValue };
}
- (mbgl::style::PropertyValue<float>)mbgl_floatPropertyValue
{
return mbgl::style::PropertyValue<float> { self.floatValue };
}
@end

View File

@@ -0,0 +1,13 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface NSNumber (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
- (mbgl::style::PropertyValue<bool>)mbgl_booleanPropertyValue;
- (mbgl::style::PropertyValue<float>)mbgl_numberPropertyValue;
@end

View File

@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
@interface NSString (MGLStyleAttributeAdditions) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,17 @@
#import "NSString+MGLStyleAttributeAdditions.h"
#import "NSString+MGLStyleAttributeAdditions_Private.hpp"
@implementation NSString (MGLStyleAttributeAdditions)
- (BOOL)isFunction
{
return NO;
}
- (mbgl::style::PropertyValue<std::string>)mbgl_stringPropertyValue
{
return mbgl::style::PropertyValue<std::string> {{ self.UTF8String }};
}
@end

View File

@@ -0,0 +1,11 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface NSString (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
- (mbgl::style::PropertyValue<std::string>)mbgl_stringPropertyValue;
@end

View File

@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
@interface NSValue (MGLStyleAttributeValue) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,19 @@
#import "NSValue+MGLStyleAttributeAdditions.h"
#import "NSValue+MGLStyleAttributeAdditions_Private.hpp"
@implementation NSValue (MGLStyleAttributeAdditions)
- (BOOL)isFunction
{
return NO;
}
- (mbgl::style::PropertyValue<uint8_t>)mbgl_enumPropertyValue
{
uint8_t value = 0;
[self getValue:&value];
return mbgl::style::PropertyValue<uint8_t> { value };
}
@end

View File

@@ -0,0 +1,9 @@
#import <Foundation/Foundation.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface NSValue (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
- (mbgl::style::PropertyValue<uint8_t>)mbgl_enumPropertyValue;
@end

View File

@@ -0,0 +1,9 @@
#import <UIKit/UIKit.h>
#import "MGLStyleAttributeValue.h"
#include <mbgl/style/property_value.hpp>
@interface UIColor (MGLStyleAttributeAdditions_Private) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,29 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLBackgroundLayerTests : MGLStyleLayerTests
@end
@implementation MGLBackgroundLayerTests
- (void)testBackgroundLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLBackgroundStyleLayer *layer = [[MGLBackgroundStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.backgroundColor = MGLRuntimeStylingHelper.testColor;
layer.backgroundPattern = MGLRuntimeStylingHelper.testString;
layer.backgroundOpacity = MGLRuntimeStylingHelper.testNumber;
MGLBackgroundStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertEqualObjects(gLayer.backgroundColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.backgroundPattern, MGLRuntimeStylingHelper.testString);
XCTAssertEqualObjects(gLayer.backgroundOpacity, MGLRuntimeStylingHelper.testNumber);
}
@end

View File

@@ -0,0 +1,37 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLCircleLayerTests : MGLStyleLayerTests
@end
@implementation MGLCircleLayerTests
- (void)testCircleLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLCircleStyleLayer *layer = [[MGLCircleStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.circleRadius = MGLRuntimeStylingHelper.testNumber;
layer.circleColor = MGLRuntimeStylingHelper.testColor;
layer.circleBlur = MGLRuntimeStylingHelper.testNumber;
layer.circleOpacity = MGLRuntimeStylingHelper.testNumber;
layer.circleTranslate = MGLRuntimeStylingHelper.testOffset;
layer.circleTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLCircleStyleLayerCircleTranslateAnchorViewport type:@encode(MGLCircleStyleLayerCircleTranslateAnchor)];
layer.circlePitchScale = [MGLRuntimeStylingHelper testEnum:MGLCircleStyleLayerCirclePitchScaleViewport type:@encode(MGLCircleStyleLayerCirclePitchScale)];
MGLCircleStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertEqualObjects(gLayer.circleRadius, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.circleColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.circleBlur, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.circleOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.circleTranslate, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.circleTranslateAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLCircleStyleLayerCircleTranslateAnchorViewport type:@encode(MGLCircleStyleLayerCircleTranslateAnchor)] objCType]);
XCTAssert([(NSValue *)gLayer.circlePitchScale objCType] == [[MGLRuntimeStylingHelper testEnum:MGLCircleStyleLayerCirclePitchScaleViewport type:@encode(MGLCircleStyleLayerCirclePitchScale)] objCType]);
}
@end

View File

@@ -0,0 +1,37 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLFillLayerTests : MGLStyleLayerTests
@end
@implementation MGLFillLayerTests
- (void)testFillLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLFillStyleLayer *layer = [[MGLFillStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.fillAntialias = MGLRuntimeStylingHelper.testBool;
layer.fillOpacity = MGLRuntimeStylingHelper.testNumber;
layer.fillColor = MGLRuntimeStylingHelper.testColor;
layer.fillOutlineColor = MGLRuntimeStylingHelper.testColor;
layer.fillTranslate = MGLRuntimeStylingHelper.testOffset;
layer.fillTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLFillStyleLayerFillTranslateAnchorViewport type:@encode(MGLFillStyleLayerFillTranslateAnchor)];
layer.fillPattern = MGLRuntimeStylingHelper.testString;
MGLFillStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertEqualObjects(gLayer.fillAntialias, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.fillOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.fillColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.fillOutlineColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.fillTranslate, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.fillTranslateAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLFillStyleLayerFillTranslateAnchorViewport type:@encode(MGLFillStyleLayerFillTranslateAnchor)] objCType]);
XCTAssertEqualObjects(gLayer.fillPattern, MGLRuntimeStylingHelper.testString);
}
@end

View File

@@ -0,0 +1,51 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLLineLayerTests : MGLStyleLayerTests
@end
@implementation MGLLineLayerTests
- (void)testLineLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLLineStyleLayer *layer = [[MGLLineStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.lineCap = [MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineCapSquare type:@encode(MGLLineStyleLayerLineCap)];
layer.lineJoin = [MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineJoinMiter type:@encode(MGLLineStyleLayerLineJoin)];
layer.lineMiterLimit = MGLRuntimeStylingHelper.testNumber;
layer.lineRoundLimit = MGLRuntimeStylingHelper.testNumber;
layer.lineOpacity = MGLRuntimeStylingHelper.testNumber;
layer.lineColor = MGLRuntimeStylingHelper.testColor;
layer.lineTranslate = MGLRuntimeStylingHelper.testOffset;
layer.lineTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineTranslateAnchorViewport type:@encode(MGLLineStyleLayerLineTranslateAnchor)];
layer.lineWidth = MGLRuntimeStylingHelper.testNumber;
layer.lineGapWidth = MGLRuntimeStylingHelper.testNumber;
layer.lineOffset = MGLRuntimeStylingHelper.testNumber;
layer.lineBlur = MGLRuntimeStylingHelper.testNumber;
layer.lineDasharray = MGLRuntimeStylingHelper.testDashArray;
layer.linePattern = MGLRuntimeStylingHelper.testString;
MGLLineStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssert([(NSValue *)gLayer.lineCap objCType] == [[MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineCapSquare type:@encode(MGLLineStyleLayerLineCap)] objCType]);
XCTAssert([(NSValue *)gLayer.lineJoin objCType] == [[MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineJoinMiter type:@encode(MGLLineStyleLayerLineJoin)] objCType]);
XCTAssertEqualObjects(gLayer.lineMiterLimit, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineRoundLimit, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.lineTranslate, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.lineTranslateAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLLineStyleLayerLineTranslateAnchorViewport type:@encode(MGLLineStyleLayerLineTranslateAnchor)] objCType]);
XCTAssertEqualObjects(gLayer.lineWidth, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineGapWidth, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineOffset, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineBlur, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.lineDasharray, MGLRuntimeStylingHelper.testDashArray);
XCTAssertEqualObjects(gLayer.linePattern, MGLRuntimeStylingHelper.testString);
}
@end

View File

@@ -0,0 +1,37 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLRasterLayerTests : MGLStyleLayerTests
@end
@implementation MGLRasterLayerTests
- (void)testRasterLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLRasterStyleLayer *layer = [[MGLRasterStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.rasterOpacity = MGLRuntimeStylingHelper.testNumber;
layer.rasterHueRotate = MGLRuntimeStylingHelper.testNumber;
layer.rasterBrightnessMin = MGLRuntimeStylingHelper.testNumber;
layer.rasterBrightnessMax = MGLRuntimeStylingHelper.testNumber;
layer.rasterSaturation = MGLRuntimeStylingHelper.testNumber;
layer.rasterContrast = MGLRuntimeStylingHelper.testNumber;
layer.rasterFadeDuration = MGLRuntimeStylingHelper.testNumber;
MGLRasterStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssertEqualObjects(gLayer.rasterOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterHueRotate, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterBrightnessMin, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterBrightnessMax, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterSaturation, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterContrast, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.rasterFadeDuration, MGLRuntimeStylingHelper.testNumber);
}
@end

View File

@@ -0,0 +1,25 @@
#import <Foundation/Foundation.h>
#import "MGLTypes.h"
@interface MGLRuntimeStylingHelper : NSObject
+ (NSArray *)testPadding;
+ (NSArray *)testOffset;
+ (NSArray *)testFont;
+ (NSArray *)testDashArray;
+ (NSNumber *)testNumber;
+ (NSNumber *)testBool;
+ (NSString *)testString;
+ (MGLColor *)testColor;
+ (NSValue *)testEnum:(NSUInteger)value type:(const char *)type;
@end

View File

@@ -0,0 +1,56 @@
#import "MGLRuntimeStylingHelper.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
@implementation MGLRuntimeStylingHelper
+ (NSArray *)testPadding
{
return @[@1.0f, @1.0f, @1.0f, @1.0f];
}
+ (NSArray *)testOffset
{
return @[@1.0f, @1.0f];
}
+ (NSArray *)testFont
{
return @[@"Open Sans Regular", @"Arial Unicode MS Regular"];
}
+ (NSArray *)testDashArray
{
return @[@1, @2];
}
+ (NSNumber *)testNumber
{
return @1;
}
+ (NSNumber *)testBool
{
return @YES;
}
+ (NSString *)testString
{
return @"test";
}
+ (MGLColor *)testColor
{
return [MGLColor redColor];
}
+ (NSValue *)testEnum:(NSUInteger)value type:(const char *)type
{
return [NSValue value:&value withObjCType:type];
}
@end

View File

@@ -0,0 +1,10 @@
#import <Mapbox/Mapbox.h>
#import "MGLRuntimeStylingHelper.h"
#import <XCTest/XCTest.h>
@interface MGLStyleLayerTests : XCTestCase <MGLMapViewDelegate>
@property (nonatomic) IBOutlet MGLMapView *mapView;
@property (nonatomic) XCTestExpectation *expectation;
@end

View File

@@ -0,0 +1,21 @@
#import "MGLStyleLayerTests.h"
@implementation MGLStyleLayerTests
- (void)setUp {
[super setUp];
#if TARGET_OS_IPHONE
UIApplication *app = [[UIApplication sharedApplication] delegate];
UIViewController *vc = [[UIViewController alloc] init];
app.keyWindow.rootViewController = vc;
[vc view]; // Force load xib
_mapView = [[MGLMapView alloc] initWithFrame:CGRectMake(0, 0, 256, 256)];
[vc.view addSubview:_mapView];
_mapView.delegate = self;
#else
NSWindowController *windowController = [[NSWindowController alloc] initWithWindowNibName:@"MGLStyleLayerTests" owner:self];
[windowController showWindow:nil];
#endif
}
@end

View File

@@ -0,0 +1,119 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@interface MGLSymbolLayerTests : MGLStyleLayerTests
@end
@implementation MGLSymbolLayerTests
- (void)testSymbolLayer {
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url];
MGLSymbolStyleLayer *layer = [[MGLSymbolStyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:layer];
layer.symbolPlacement = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerSymbolPlacementLine type:@encode(MGLSymbolStyleLayerSymbolPlacement)];
layer.symbolSpacing = MGLRuntimeStylingHelper.testNumber;
layer.symbolAvoidEdges = MGLRuntimeStylingHelper.testBool;
layer.iconAllowOverlap = MGLRuntimeStylingHelper.testBool;
layer.iconIgnorePlacement = MGLRuntimeStylingHelper.testBool;
layer.iconOptional = MGLRuntimeStylingHelper.testBool;
layer.iconRotationAlignment = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconRotationAlignmentViewport type:@encode(MGLSymbolStyleLayerIconRotationAlignment)];
layer.iconSize = MGLRuntimeStylingHelper.testNumber;
layer.iconTextFit = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconTextFitHeight type:@encode(MGLSymbolStyleLayerIconTextFit)];
layer.iconTextFitPadding = MGLRuntimeStylingHelper.testPadding;
layer.iconImage = MGLRuntimeStylingHelper.testString;
layer.iconRotate = MGLRuntimeStylingHelper.testNumber;
layer.iconPadding = MGLRuntimeStylingHelper.testNumber;
layer.iconKeepUpright = MGLRuntimeStylingHelper.testBool;
layer.iconOffset = MGLRuntimeStylingHelper.testOffset;
layer.textPitchAlignment = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextPitchAlignmentViewport type:@encode(MGLSymbolStyleLayerTextPitchAlignment)];
layer.textRotationAlignment = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextRotationAlignmentViewport type:@encode(MGLSymbolStyleLayerTextRotationAlignment)];
layer.textField = MGLRuntimeStylingHelper.testString;
layer.textFont = MGLRuntimeStylingHelper.testFont;
layer.textSize = MGLRuntimeStylingHelper.testNumber;
layer.textMaxWidth = MGLRuntimeStylingHelper.testNumber;
layer.textLineHeight = MGLRuntimeStylingHelper.testNumber;
layer.textLetterSpacing = MGLRuntimeStylingHelper.testNumber;
layer.textJustify = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextJustifyRight type:@encode(MGLSymbolStyleLayerTextJustify)];
layer.textAnchor = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextAnchorBottomRight type:@encode(MGLSymbolStyleLayerTextAnchor)];
layer.textMaxAngle = MGLRuntimeStylingHelper.testNumber;
layer.textRotate = MGLRuntimeStylingHelper.testNumber;
layer.textPadding = MGLRuntimeStylingHelper.testNumber;
layer.textKeepUpright = MGLRuntimeStylingHelper.testBool;
layer.textTransform = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextTransformLowercase type:@encode(MGLSymbolStyleLayerTextTransform)];
layer.textOffset = MGLRuntimeStylingHelper.testOffset;
layer.textAllowOverlap = MGLRuntimeStylingHelper.testBool;
layer.textIgnorePlacement = MGLRuntimeStylingHelper.testBool;
layer.textOptional = MGLRuntimeStylingHelper.testBool;
layer.iconOpacity = MGLRuntimeStylingHelper.testNumber;
layer.iconColor = MGLRuntimeStylingHelper.testColor;
layer.iconHaloColor = MGLRuntimeStylingHelper.testColor;
layer.iconHaloWidth = MGLRuntimeStylingHelper.testNumber;
layer.iconHaloBlur = MGLRuntimeStylingHelper.testNumber;
layer.iconTranslate = MGLRuntimeStylingHelper.testOffset;
layer.iconTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconTranslateAnchorViewport type:@encode(MGLSymbolStyleLayerIconTranslateAnchor)];
layer.textOpacity = MGLRuntimeStylingHelper.testNumber;
layer.textColor = MGLRuntimeStylingHelper.testColor;
layer.textHaloColor = MGLRuntimeStylingHelper.testColor;
layer.textHaloWidth = MGLRuntimeStylingHelper.testNumber;
layer.textHaloBlur = MGLRuntimeStylingHelper.testNumber;
layer.textTranslate = MGLRuntimeStylingHelper.testOffset;
layer.textTranslateAnchor = [MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextTranslateAnchorViewport type:@encode(MGLSymbolStyleLayerTextTranslateAnchor)];
MGLSymbolStyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"];
XCTAssert([(NSValue *)gLayer.symbolPlacement objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerSymbolPlacementLine type:@encode(MGLSymbolStyleLayerSymbolPlacement)] objCType]);
XCTAssertEqualObjects(gLayer.symbolSpacing, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.symbolAvoidEdges, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.iconAllowOverlap, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.iconIgnorePlacement, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.iconOptional, MGLRuntimeStylingHelper.testBool);
XCTAssert([(NSValue *)gLayer.iconRotationAlignment objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconRotationAlignmentViewport type:@encode(MGLSymbolStyleLayerIconRotationAlignment)] objCType]);
XCTAssertEqualObjects(gLayer.iconSize, MGLRuntimeStylingHelper.testNumber);
XCTAssert([(NSValue *)gLayer.iconTextFit objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconTextFitHeight type:@encode(MGLSymbolStyleLayerIconTextFit)] objCType]);
XCTAssertEqualObjects(gLayer.iconTextFitPadding, MGLRuntimeStylingHelper.testPadding);
XCTAssertEqualObjects(gLayer.iconImage, MGLRuntimeStylingHelper.testString);
XCTAssertEqualObjects(gLayer.iconRotate, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.iconPadding, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.iconKeepUpright, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.iconOffset, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.textPitchAlignment objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextPitchAlignmentViewport type:@encode(MGLSymbolStyleLayerTextPitchAlignment)] objCType]);
XCTAssert([(NSValue *)gLayer.textRotationAlignment objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextRotationAlignmentViewport type:@encode(MGLSymbolStyleLayerTextRotationAlignment)] objCType]);
XCTAssertEqualObjects(gLayer.textField, MGLRuntimeStylingHelper.testString);
XCTAssertEqualObjects(gLayer.textFont, MGLRuntimeStylingHelper.testFont);
XCTAssertEqualObjects(gLayer.textSize, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textMaxWidth, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textLineHeight, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textLetterSpacing, MGLRuntimeStylingHelper.testNumber);
XCTAssert([(NSValue *)gLayer.textJustify objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextJustifyRight type:@encode(MGLSymbolStyleLayerTextJustify)] objCType]);
XCTAssert([(NSValue *)gLayer.textAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextAnchorBottomRight type:@encode(MGLSymbolStyleLayerTextAnchor)] objCType]);
XCTAssertEqualObjects(gLayer.textMaxAngle, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textRotate, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textPadding, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textKeepUpright, MGLRuntimeStylingHelper.testBool);
XCTAssert([(NSValue *)gLayer.textTransform objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextTransformLowercase type:@encode(MGLSymbolStyleLayerTextTransform)] objCType]);
XCTAssertEqualObjects(gLayer.textOffset, MGLRuntimeStylingHelper.testOffset);
XCTAssertEqualObjects(gLayer.textAllowOverlap, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.textIgnorePlacement, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.textOptional, MGLRuntimeStylingHelper.testBool);
XCTAssertEqualObjects(gLayer.iconOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.iconColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.iconHaloColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.iconHaloWidth, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.iconHaloBlur, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.iconTranslate, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.iconTranslateAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerIconTranslateAnchorViewport type:@encode(MGLSymbolStyleLayerIconTranslateAnchor)] objCType]);
XCTAssertEqualObjects(gLayer.textOpacity, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.textHaloColor, MGLRuntimeStylingHelper.testColor);
XCTAssertEqualObjects(gLayer.textHaloWidth, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textHaloBlur, MGLRuntimeStylingHelper.testNumber);
XCTAssertEqualObjects(gLayer.textTranslate, MGLRuntimeStylingHelper.testOffset);
XCTAssert([(NSValue *)gLayer.textTranslateAnchor objCType] == [[MGLRuntimeStylingHelper testEnum:MGLSymbolStyleLayerTextTranslateAnchorViewport type:@encode(MGLSymbolStyleLayerTextTranslateAnchor)] objCType]);
}
@end

View File

@@ -4,6 +4,7 @@
#import "MBXCustomCalloutView.h"
#import "MBXOfflinePacksTableViewController.h"
#import "MBXAnnotationView.h"
#import "MGLFillStyleLayer.h"
#import <Mapbox/Mapbox.h>
@@ -200,6 +201,7 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
@"Start World Tour",
@"Add Custom Callout Point",
@"Remove Annotations",
@"Runtime styling",
nil];
if (self.debugLoggingEnabled)
@@ -277,6 +279,10 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
{
[self.mapView removeAnnotations:self.mapView.annotations];
}
else if (buttonIndex == actionSheet.firstOtherButtonIndex + 16)
{
[self testRuntimeStyling];
}
else if (buttonIndex == actionSheet.numberOfButtons - 2 && self.debugLoggingEnabled)
{
NSString *fileContents = [NSString stringWithContentsOfFile:[self telemetryDebugLogfilePath] encoding:NSUTF8StringEncoding error:nil];
@@ -436,6 +442,96 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
[self.mapView showAnnotations:@[annotation] animated:YES];
}
- (void)testRuntimeStyling
{
[self styleWaterLayer];
[self styleRoadLayer];
[self styleRasterLayer];
[self styleGeoJSONSource];
[self styleSymbolLayer];
MGLFillStyleLayer *buildingLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"building"];
buildingLayer.fillColor = [UIColor blackColor];
MGLLineStyleLayer *ferryLineLayer = (MGLLineStyleLayer *)[self.mapView.style layerWithIdentifier:@"ferry"];
ferryLineLayer.lineColor = [UIColor redColor];
MGLFillStyleLayer *parkLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"park"];
[self.mapView.style removeLayer:parkLayer];
}
- (void)styleSymbolLayer
{
MGLSymbolStyleLayer *stateLayer = (MGLSymbolStyleLayer *)[self.mapView.style layerWithIdentifier:@"state-label-lg"];
stateLayer.textColor = [UIColor redColor];
}
- (void)styleGeoJSONSource
{
NSURL *geoJSONURL = [NSURL URLWithString:@"https://dl.dropboxusercontent.com/u/5285447/amsterdam.geojson"];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"ams" URL:geoJSONURL];
[self.mapView.style addSource:source];
MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithLayerIdentifier:@"test" sourceIdentifier:@"ams"];
fillLayer.fillColor = [UIColor purpleColor];
[self.mapView.style addLayer:fillLayer];
}
- (void)styleRasterLayer
{
NSURL *rasterURL = [NSURL URLWithString:@"mapbox://mapbox.satellite"];
MGLRasterSource *rasterSource = [[MGLRasterSource alloc] initWithSourceIdentifier:@"my-raster-source" URL:rasterURL tileSize:512];
[self.mapView.style addSource:rasterSource];
MGLRasterStyleLayer *rasterLayer = [[MGLRasterStyleLayer alloc] initWithLayerIdentifier:@"my-raster-layer" sourceIdentifier:@"my-raster-source"];
MGLStyleAttributeFunction *opacityFunction = [[MGLStyleAttributeFunction alloc] init];
opacityFunction.stops = @{@20.0f: @1.0f,
@5.0f: @0.0f};
rasterLayer.rasterOpacity = opacityFunction;
[self.mapView.style addLayer:rasterLayer];
}
- (void)styleWaterLayer
{
MGLFillStyleLayer *waterLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"water"];
MGLStyleAttributeFunction *waterColorFunction = [[MGLStyleAttributeFunction alloc] init];
waterColorFunction.stops = @{@6.0f: [UIColor yellowColor],
@8.0f: [UIColor blueColor],
@10.0f: [UIColor redColor],
@12.0f: [UIColor greenColor],
@14.0f: [UIColor blueColor]};
waterLayer.fillColor = waterColorFunction;
MGLStyleAttributeFunction *fillAntialias = [[MGLStyleAttributeFunction alloc] init];
fillAntialias.stops = @{@11: @YES,
@12: @NO,
@13: @YES,
@14: @NO,
@15: @YES};
waterLayer.fillAntialias = fillAntialias;
[waterLayer update];
}
- (void)styleRoadLayer
{
MGLLineStyleLayer *roadLayer = (MGLLineStyleLayer *)[self.mapView.style layerWithIdentifier:@"road-primary"];
roadLayer.lineColor = [UIColor blackColor];
MGLStyleAttributeFunction *lineWidthFunction = [[MGLStyleAttributeFunction alloc] init];
MGLStyleAttributeFunction *roadLineColor = [[MGLStyleAttributeFunction alloc] init];
roadLineColor.stops = @{@10: [UIColor purpleColor],
@13: [UIColor yellowColor],
@16: [UIColor cyanColor]};
roadLayer.lineColor = roadLineColor;
roadLayer.lineWidth = lineWidthFunction;
roadLayer.lineGapWidth = lineWidthFunction;
roadLayer.visible = YES;
roadLayer.maximumZoomLevel = 15;
roadLayer.minimumZoomLevel = 13;
}
- (IBAction)handleLongPress:(UILongPressGestureRecognizer *)longPress
{
if (longPress.state == UIGestureRecognizerStateBegan)

View File

@@ -39,6 +39,8 @@ macro(mbgl_platform_core)
PRIVATE platform/default/headless_view.cpp
)
target_add_mason_package(mbgl-core PUBLIC geojson)
target_compile_options(mbgl-core
PRIVATE -fobjc-arc
)
@@ -57,4 +59,4 @@ macro(mbgl_platform_core)
target_link_libraries(mbgl-core
PUBLIC -lz
)
endmacro()
endmacro()

View File

@@ -7,12 +7,126 @@
objects = {
/* Begin PBXBuildFile section */
350098AF1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098AD1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098B01D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098AD1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098B11D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098AE1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm */; };
350098B21D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098AE1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm */; };
350098BB1D480108004B2AF0 /* MGLVectorSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098B91D480108004B2AF0 /* MGLVectorSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098BC1D480108004B2AF0 /* MGLVectorSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098B91D480108004B2AF0 /* MGLVectorSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098BD1D480108004B2AF0 /* MGLVectorSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 350098BA1D480108004B2AF0 /* MGLVectorSource.m */; };
350098BE1D480108004B2AF0 /* MGLVectorSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 350098BA1D480108004B2AF0 /* MGLVectorSource.m */; };
350098C11D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098BF1D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098C21D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098BF1D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098C31D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098C01D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm */; };
350098C41D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098C01D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm */; };
350098C61D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098C51D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */; };
350098C71D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098C51D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */; };
350098CA1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098C81D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098CB1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098C81D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098CC1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098C91D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm */; };
350098CD1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098C91D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm */; };
350098CF1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098CE1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */; };
350098D01D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098CE1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */; };
350098D31D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098D11D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098D41D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098D11D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098D51D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098D21D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm */; };
350098D61D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098D21D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm */; };
350098D81D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098D71D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp */; };
350098D91D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 350098D71D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp */; };
350098DC1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098DA1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098DD1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 350098DA1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
350098DE1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098DB1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm */; };
350098DF1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 350098DB1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm */; };
35136D391D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D381D42271A00C20EFD /* MGLBackgroundStyleLayer.mm */; };
35136D3A1D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D381D42271A00C20EFD /* MGLBackgroundStyleLayer.mm */; };
35136D3C1D42272500C20EFD /* MGLCircleStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D3B1D42272500C20EFD /* MGLCircleStyleLayer.mm */; };
35136D3D1D42272500C20EFD /* MGLCircleStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D3B1D42272500C20EFD /* MGLCircleStyleLayer.mm */; };
35136D3F1D42273000C20EFD /* MGLLineStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D3E1D42273000C20EFD /* MGLLineStyleLayer.mm */; };
35136D401D42273000C20EFD /* MGLLineStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D3E1D42273000C20EFD /* MGLLineStyleLayer.mm */; };
35136D421D42274500C20EFD /* MGLRasterStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D411D42274500C20EFD /* MGLRasterStyleLayer.mm */; };
35136D431D42274500C20EFD /* MGLRasterStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D411D42274500C20EFD /* MGLRasterStyleLayer.mm */; };
35136D451D42275100C20EFD /* MGLSymbolStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D441D42275100C20EFD /* MGLSymbolStyleLayer.mm */; };
35136D461D42275100C20EFD /* MGLSymbolStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D441D42275100C20EFD /* MGLSymbolStyleLayer.mm */; };
35136D4C1D4277FC00C20EFD /* MGLSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 35136D4A1D4277FC00C20EFD /* MGLSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
35136D4D1D4277FC00C20EFD /* MGLSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 35136D4A1D4277FC00C20EFD /* MGLSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
35136D4E1D4277FC00C20EFD /* MGLSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D4B1D4277FC00C20EFD /* MGLSource.mm */; };
35136D4F1D4277FC00C20EFD /* MGLSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35136D4B1D4277FC00C20EFD /* MGLSource.mm */; };
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 */; settings = {ATTRIBUTES = (Private, ); }; };
353349B31D5CC6F20094E9DE /* amsterdam.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 353349B21D5CC6F20094E9DE /* amsterdam.geojson */; };
3534C7921D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp */; };
3534C7931D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp */; };
3534C7951D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp */; };
3534C7961D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp */; };
353794D01D22B3BD002C281C /* NSData+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35305D461D22AA450007D005 /* NSData+MGLAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
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 */; };
3538AA201D542239008EC33D /* MGLBaseStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3538AA1C1D542239008EC33D /* MGLBaseStyleLayer.mm */; };
353933F21D3FB753003F57D7 /* MGLCircleStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F11D3FB753003F57D7 /* MGLCircleStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933F31D3FB753003F57D7 /* MGLCircleStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F11D3FB753003F57D7 /* MGLCircleStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933F51D3FB785003F57D7 /* MGLBackgroundStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F41D3FB785003F57D7 /* MGLBackgroundStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933F61D3FB785003F57D7 /* MGLBackgroundStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F41D3FB785003F57D7 /* MGLBackgroundStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933F81D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F71D3FB79F003F57D7 /* MGLLineStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933F91D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933F71D3FB79F003F57D7 /* MGLLineStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
353933FB1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 353933FA1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
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, ); }; };
353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */; };
354D42DC1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 354D42DB1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */; };
354D42DD1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 354D42DB1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */; };
35599DEB1D46F14E0048254D /* MGLStyleAttributeFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 35599DE91D46F14E0048254D /* MGLStyleAttributeFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
35599DEC1D46F14E0048254D /* MGLStyleAttributeFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 35599DE91D46F14E0048254D /* MGLStyleAttributeFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
35599DED1D46F14E0048254D /* MGLStyleAttributeFunction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35599DEA1D46F14E0048254D /* MGLStyleAttributeFunction.mm */; };
35599DEE1D46F14E0048254D /* MGLStyleAttributeFunction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35599DEA1D46F14E0048254D /* MGLStyleAttributeFunction.mm */; };
35599DF01D46F3A60048254D /* MGLStyleAttributeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 35599DEF1D46F3A60048254D /* MGLStyleAttributeValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
35599DF11D46F3A60048254D /* MGLStyleAttributeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 35599DEF1D46F3A60048254D /* MGLStyleAttributeValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
3566C7661D4A77BA008152BC /* MGLGeoJSONSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3566C7641D4A77BA008152BC /* MGLGeoJSONSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
3566C7671D4A77BA008152BC /* MGLGeoJSONSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3566C7641D4A77BA008152BC /* MGLGeoJSONSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
3566C7681D4A77BA008152BC /* MGLGeoJSONSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3566C7651D4A77BA008152BC /* MGLGeoJSONSource.mm */; };
3566C7691D4A77BA008152BC /* MGLGeoJSONSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3566C7651D4A77BA008152BC /* MGLGeoJSONSource.mm */; };
3566C76C1D4A8DFA008152BC /* MGLRasterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3566C76A1D4A8DFA008152BC /* MGLRasterSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
3566C76D1D4A8DFA008152BC /* MGLRasterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3566C76A1D4A8DFA008152BC /* MGLRasterSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
3566C76E1D4A8DFA008152BC /* MGLRasterSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3566C76B1D4A8DFA008152BC /* MGLRasterSource.mm */; };
3566C76F1D4A8DFA008152BC /* MGLRasterSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3566C76B1D4A8DFA008152BC /* MGLRasterSource.mm */; };
3566C7711D4A9198008152BC /* MGLSource_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3566C7701D4A9198008152BC /* MGLSource_Private.hpp */; };
3566C7721D4A9198008152BC /* MGLSource_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3566C7701D4A9198008152BC /* MGLSource_Private.hpp */; };
357579801D501E09000B822E /* MGLFillStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3575797F1D501E09000B822E /* MGLFillStyleLayerTests.m */; };
357579831D502AE6000B822E /* MGLRasterStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 357579821D502AE6000B822E /* MGLRasterStyleLayerTests.m */; };
357579851D502AF5000B822E /* MGLSymbolStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 357579841D502AF5000B822E /* MGLSymbolStyleLayerTests.m */; };
357579871D502AFE000B822E /* MGLLineStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 357579861D502AFE000B822E /* MGLLineStyleLayerTests.m */; };
357579891D502B06000B822E /* MGLCircleStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 357579881D502B06000B822E /* MGLCircleStyleLayerTests.m */; };
3575798B1D502B0C000B822E /* MGLBackgroundStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3575798A1D502B0C000B822E /* MGLBackgroundStyleLayerTests.m */; };
3575798E1D502EC7000B822E /* MGLRuntimeStylingHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3575798D1D502EC7000B822E /* MGLRuntimeStylingHelper.m */; };
3593E5211D529C29006D9365 /* MGLStyleAttribute.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E51F1D529C29006D9365 /* MGLStyleAttribute.hpp */; };
3593E5221D529C29006D9365 /* MGLStyleAttribute.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E51F1D529C29006D9365 /* MGLStyleAttribute.hpp */; };
3593E5231D529C29006D9365 /* MGLStyleAttribute.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3593E5201D529C29006D9365 /* MGLStyleAttribute.mm */; };
3593E5241D529C29006D9365 /* MGLStyleAttribute.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3593E5201D529C29006D9365 /* MGLStyleAttribute.mm */; };
3593E5261D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E5251D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp */; };
3593E5271D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E5251D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp */; };
35CE61821D4165D9004F2359 /* UIColor+MGLAdditions.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35CE61801D4165D9004F2359 /* UIColor+MGLAdditions.hpp */; };
35CE61831D4165D9004F2359 /* UIColor+MGLAdditions.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35CE61801D4165D9004F2359 /* UIColor+MGLAdditions.hpp */; };
35CE61841D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35CE61811D4165D9004F2359 /* UIColor+MGLAdditions.mm */; };
35CE61851D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35CE61811D4165D9004F2359 /* UIColor+MGLAdditions.mm */; };
35D13AB71D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D13AB51D3D15E300AFB4E0 /* MGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D13AB81D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D13AB51D3D15E300AFB4E0 /* MGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D13AB91D3D15E300AFB4E0 /* MGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35D13AB61D3D15E300AFB4E0 /* MGLStyleLayer.mm */; };
35D13ABA1D3D15E300AFB4E0 /* MGLStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35D13AB61D3D15E300AFB4E0 /* MGLStyleLayer.mm */; };
35D13AC31D3D19DD00AFB4E0 /* MGLFillStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D13AC11D3D19DD00AFB4E0 /* MGLFillStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D13AC41D3D19DD00AFB4E0 /* MGLFillStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D13AC11D3D19DD00AFB4E0 /* MGLFillStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
35D13AC51D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35D13AC21D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm */; };
35D13AC61D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35D13AC21D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm */; };
35E0CFE61D3E501500188327 /* MGLStyle_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35E0CFE51D3E501500188327 /* MGLStyle_Private.hpp */; };
35E0CFE71D3E501500188327 /* MGLStyle_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35E0CFE51D3E501500188327 /* MGLStyle_Private.hpp */; };
35E208A71D24210F00EC9A46 /* MGLNSDataAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 35E208A61D24210F00EC9A46 /* MGLNSDataAdditionsTests.m */; };
35E79F201D41266300957B9E /* MGLStyleLayer_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35E79F1F1D41266300957B9E /* MGLStyleLayer_Private.hpp */; };
35E79F211D41266300957B9E /* MGLStyleLayer_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35E79F1F1D41266300957B9E /* MGLStyleLayer_Private.hpp */; };
36F1153D1D46080700878E1A /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 36F1153B1D46080700878E1A /* libmbgl-core.a */; };
4018B1C71CDC287F00F666AF /* MGLAnnotationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4018B1C41CDC277F00F666AF /* MGLAnnotationView.mm */; };
4018B1C81CDC287F00F666AF /* MGLAnnotationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4018B1C41CDC277F00F666AF /* MGLAnnotationView.mm */; };
@@ -27,8 +141,8 @@
554180421D2E97DE00012372 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554180411D2E97DE00012372 /* OpenGLES.framework */; };
55D8C9961D0F18CE00F42F10 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 55D8C9951D0F18CE00F42F10 /* libsqlite3.tbd */; };
DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */; };
DA17BE301CC4BAC300402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
DA17BE311CC4BDAA00402C41 /* MGLMapView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */; };
DA17BE301CC4BAC300402C41 /* MGLMapView_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.hpp */; };
DA17BE311CC4BDAA00402C41 /* MGLMapView_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.hpp */; };
DA1DC96A1CB6C6B7006E619F /* MBXCustomCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA1DC9671CB6C6B7006E619F /* MBXCustomCalloutView.m */; };
DA1DC96B1CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA1DC9691CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m */; };
DA1DC9701CB6C6CE006E619F /* points.geojson in Resources */ = {isa = PBXBuildFile; fileRef = DA1DC96C1CB6C6CE006E619F /* points.geojson */; };
@@ -44,6 +158,7 @@
DA25D5CD1CCDA11500607828 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DA25D5B91CCD9EDE00607828 /* Settings.bundle */; };
DA27C24E1CBB3811000B0ECD /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA27C24D1CBB3811000B0ECD /* GLKit.framework */; };
DA27C24F1CBB4C11000B0ECD /* MGLAccountManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8847FF1CBAFA6200AB86E3 /* MGLAccountManager_Private.h */; };
DA2DBBCE1D51E80400D38FF9 /* MGLStyleLayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2DBBCD1D51E80400D38FF9 /* MGLStyleLayerTests.m */; };
DA2E88561CC036F400F24E7B /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8847D21CBAF91600AB86E3 /* Mapbox.framework */; };
DA2E88611CC0382C00F24E7B /* MGLGeometryTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA2E885C1CC0382C00F24E7B /* MGLGeometryTests.mm */; };
DA2E88621CC0382C00F24E7B /* MGLOfflinePackTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2E885D1CC0382C00F24E7B /* MGLOfflinePackTests.m */; };
@@ -332,10 +447,73 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
350098AD1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIColor+MGLStyleAttributeAdditions.h"; path = "src/UIColor+MGLStyleAttributeAdditions.h"; sourceTree = SOURCE_ROOT; };
350098AE1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "UIColor+MGLStyleAttributeAdditions.mm"; path = "src/UIColor+MGLStyleAttributeAdditions.mm"; sourceTree = SOURCE_ROOT; };
350098B91D480108004B2AF0 /* MGLVectorSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLVectorSource.h; sourceTree = "<group>"; };
350098BA1D480108004B2AF0 /* MGLVectorSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLVectorSource.m; sourceTree = "<group>"; };
350098BF1D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
350098C01D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSNumber+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
350098C51D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSNumber+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
350098C81D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
350098C91D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSArray+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
350098CE1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSArray+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
350098D11D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
350098D21D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSString+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
350098D71D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSString+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
350098DA1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
350098DB1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSValue+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
35136D381D42271A00C20EFD /* MGLBackgroundStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLBackgroundStyleLayer.mm; sourceTree = "<group>"; };
35136D3B1D42272500C20EFD /* MGLCircleStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLCircleStyleLayer.mm; sourceTree = "<group>"; };
35136D3E1D42273000C20EFD /* MGLLineStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLLineStyleLayer.mm; sourceTree = "<group>"; };
35136D411D42274500C20EFD /* MGLRasterStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLRasterStyleLayer.mm; sourceTree = "<group>"; };
35136D441D42275100C20EFD /* MGLSymbolStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLSymbolStyleLayer.mm; sourceTree = "<group>"; };
35136D4A1D4277FC00C20EFD /* MGLSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSource.h; sourceTree = "<group>"; };
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.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttributeFunction_Private.hpp; sourceTree = "<group>"; };
3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttributeValue_Private.hpp; 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>"; };
353933F41D3FB785003F57D7 /* MGLBackgroundStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLBackgroundStyleLayer.h; sourceTree = "<group>"; };
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>"; };
353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAnnotationViewTests.m; sourceTree = "<group>"; };
354D42DB1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSValue+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
35599DE91D46F14E0048254D /* MGLStyleAttributeFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeFunction.h; sourceTree = "<group>"; };
35599DEA1D46F14E0048254D /* MGLStyleAttributeFunction.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleAttributeFunction.mm; sourceTree = "<group>"; };
35599DEF1D46F3A60048254D /* MGLStyleAttributeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeValue.h; sourceTree = "<group>"; };
3566C7641D4A77BA008152BC /* MGLGeoJSONSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLGeoJSONSource.h; sourceTree = "<group>"; };
3566C7651D4A77BA008152BC /* MGLGeoJSONSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLGeoJSONSource.mm; sourceTree = "<group>"; };
3566C76A1D4A8DFA008152BC /* MGLRasterSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLRasterSource.h; sourceTree = "<group>"; };
3566C76B1D4A8DFA008152BC /* MGLRasterSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLRasterSource.mm; sourceTree = "<group>"; };
3566C7701D4A9198008152BC /* MGLSource_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLSource_Private.hpp; sourceTree = "<group>"; };
3575797F1D501E09000B822E /* MGLFillStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLFillStyleLayerTests.m; path = ../../darwin/test/MGLFillStyleLayerTests.m; sourceTree = "<group>"; };
357579821D502AE6000B822E /* MGLRasterStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLRasterStyleLayerTests.m; path = ../../darwin/test/MGLRasterStyleLayerTests.m; sourceTree = "<group>"; };
357579841D502AF5000B822E /* MGLSymbolStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLSymbolStyleLayerTests.m; path = ../../darwin/test/MGLSymbolStyleLayerTests.m; sourceTree = "<group>"; };
357579861D502AFE000B822E /* MGLLineStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLLineStyleLayerTests.m; path = ../../darwin/test/MGLLineStyleLayerTests.m; sourceTree = "<group>"; };
357579881D502B06000B822E /* MGLCircleStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLCircleStyleLayerTests.m; path = ../../darwin/test/MGLCircleStyleLayerTests.m; sourceTree = "<group>"; };
3575798A1D502B0C000B822E /* MGLBackgroundStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLBackgroundStyleLayerTests.m; path = ../../darwin/test/MGLBackgroundStyleLayerTests.m; sourceTree = "<group>"; };
3575798C1D502EC7000B822E /* MGLRuntimeStylingHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLRuntimeStylingHelper.h; path = ../../darwin/test/MGLRuntimeStylingHelper.h; sourceTree = "<group>"; };
3575798D1D502EC7000B822E /* MGLRuntimeStylingHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLRuntimeStylingHelper.m; path = ../../darwin/test/MGLRuntimeStylingHelper.m; sourceTree = "<group>"; };
3593E51F1D529C29006D9365 /* MGLStyleAttribute.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttribute.hpp; sourceTree = "<group>"; };
3593E5201D529C29006D9365 /* MGLStyleAttribute.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleAttribute.mm; sourceTree = "<group>"; };
3593E5251D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "UIColor+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
35CE61801D4165D9004F2359 /* UIColor+MGLAdditions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "UIColor+MGLAdditions.hpp"; sourceTree = "<group>"; };
35CE61811D4165D9004F2359 /* UIColor+MGLAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIColor+MGLAdditions.mm"; sourceTree = "<group>"; };
35D13AB51D3D15E300AFB4E0 /* MGLStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleLayer.h; sourceTree = "<group>"; };
35D13AB61D3D15E300AFB4E0 /* MGLStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleLayer.mm; sourceTree = "<group>"; };
35D13AC11D3D19DD00AFB4E0 /* MGLFillStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFillStyleLayer.h; sourceTree = "<group>"; };
35D13AC21D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLFillStyleLayer.mm; sourceTree = "<group>"; };
35E0CFE51D3E501500188327 /* MGLStyle_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyle_Private.hpp; sourceTree = "<group>"; };
35E0CFE81D3E53FE00188327 /* MGLStyle_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyle_Private.hpp; sourceTree = "<group>"; };
35E208A61D24210F00EC9A46 /* MGLNSDataAdditionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLNSDataAdditionsTests.m; sourceTree = "<group>"; };
35E79F1F1D41266300957B9E /* MGLStyleLayer_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleLayer_Private.hpp; sourceTree = "<group>"; };
36F1153B1D46080700878E1A /* libmbgl-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-core.a"; path = "build/Debug-iphoneos/libmbgl-core.a"; sourceTree = "<group>"; };
36F1153C1D46080700878E1A /* libmbgl-platform-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-platform-ios.a"; path = "build/Debug-iphoneos/libmbgl-platform-ios.a"; sourceTree = "<group>"; };
4018B1C31CDC277F00F666AF /* MGLAnnotationView_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationView_Private.h; sourceTree = "<group>"; };
@@ -351,7 +529,7 @@
55D8C9941D0F133500F42F10 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = config.xcconfig; path = ../../build/ios/config.xcconfig; sourceTree = "<group>"; };
55D8C9951D0F18CE00F42F10 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
DA0CD58F1CF56F6A00A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; };
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMapView_Internal.h; sourceTree = "<group>"; };
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLMapView_Private.hpp; sourceTree = "<group>"; };
DA1DC94A1CB6C1C2006E619F /* Mapbox GL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL.app"; sourceTree = BUILT_PRODUCTS_DIR; };
DA1DC9501CB6C1C2006E619F /* MBXAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXAppDelegate.h; sourceTree = "<group>"; };
DA1DC9531CB6C1C2006E619F /* MBXViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXViewController.h; sourceTree = "<group>"; };
@@ -372,6 +550,8 @@
DA25D5BF1CCD9F8400607828 /* Root.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Root.plist; sourceTree = "<group>"; };
DA25D5C51CCDA06800607828 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Root.strings; sourceTree = "<group>"; };
DA27C24D1CBB3811000B0ECD /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
DA2DBBCC1D51E80400D38FF9 /* MGLStyleLayerTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLStyleLayerTests.h; path = ../../darwin/test/MGLStyleLayerTests.h; sourceTree = "<group>"; };
DA2DBBCD1D51E80400D38FF9 /* MGLStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLStyleLayerTests.m; path = ../../darwin/test/MGLStyleLayerTests.m; sourceTree = "<group>"; };
DA2E88511CC036F400F24E7B /* test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = test.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DA2E88551CC036F400F24E7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DA2E885C1CC0382C00F24E7B /* MGLGeometryTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLGeometryTests.mm; path = ../../darwin/test/MGLGeometryTests.mm; sourceTree = "<group>"; };
@@ -491,6 +671,9 @@
DA8963341CC549A100684375 /* sprites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = sprites; sourceTree = "<group>"; };
DA8963351CC549A100684375 /* styles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = styles; sourceTree = "<group>"; };
DA8963361CC549A100684375 /* tiles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tiles; sourceTree = "<group>"; };
DA8F25B91D51D2570010E6B5 /* MGLRuntimeStylingTests.m.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLRuntimeStylingTests.m.ejs; sourceTree = "<group>"; };
DA8F25BA1D51D2570010E6B5 /* MGLStyleLayer.h.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLStyleLayer.h.ejs; sourceTree = "<group>"; };
DA8F25BB1D51D2570010E6B5 /* MGLStyleLayer.mm.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLStyleLayer.mm.ejs; sourceTree = "<group>"; };
DAA4E4021CBB5C2F00178DFB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
DAA4E4041CBB5C9E00178DFB /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
DAA4E4061CBB5CBF00178DFB /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
@@ -564,6 +747,122 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
35136D491D4277EA00C20EFD /* Sources */ = {
isa = PBXGroup;
children = (
35136D4A1D4277FC00C20EFD /* MGLSource.h */,
3566C7701D4A9198008152BC /* MGLSource_Private.hpp */,
35136D4B1D4277FC00C20EFD /* MGLSource.mm */,
350098B91D480108004B2AF0 /* MGLVectorSource.h */,
350098BA1D480108004B2AF0 /* MGLVectorSource.m */,
3566C7641D4A77BA008152BC /* MGLGeoJSONSource.h */,
3566C7651D4A77BA008152BC /* MGLGeoJSONSource.mm */,
3566C76A1D4A8DFA008152BC /* MGLRasterSource.h */,
3566C76B1D4A8DFA008152BC /* MGLRasterSource.mm */,
);
name = Sources;
sourceTree = "<group>";
};
353933F01D3FB6BA003F57D7 /* Layers */ = {
isa = PBXGroup;
children = (
353933F41D3FB785003F57D7 /* MGLBackgroundStyleLayer.h */,
35136D381D42271A00C20EFD /* MGLBackgroundStyleLayer.mm */,
353933F11D3FB753003F57D7 /* MGLCircleStyleLayer.h */,
35136D3B1D42272500C20EFD /* MGLCircleStyleLayer.mm */,
35D13AC11D3D19DD00AFB4E0 /* MGLFillStyleLayer.h */,
35D13AC21D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm */,
353933F71D3FB79F003F57D7 /* MGLLineStyleLayer.h */,
35136D3E1D42273000C20EFD /* MGLLineStyleLayer.mm */,
353933FA1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h */,
35136D411D42274500C20EFD /* MGLRasterStyleLayer.mm */,
35D13AB51D3D15E300AFB4E0 /* MGLStyleLayer.h */,
35E79F1F1D41266300957B9E /* MGLStyleLayer_Private.hpp */,
35D13AB61D3D15E300AFB4E0 /* MGLStyleLayer.mm */,
353933FD1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h */,
35136D441D42275100C20EFD /* MGLSymbolStyleLayer.mm */,
3538AA1B1D542239008EC33D /* MGLBaseStyleLayer.h */,
3538AA1C1D542239008EC33D /* MGLBaseStyleLayer.mm */,
);
name = Layers;
sourceTree = "<group>";
};
35599DA21D4682B60048254D /* Styling */ = {
isa = PBXGroup;
children = (
35599DB81D46AD7F0048254D /* Categories */,
353933F01D3FB6BA003F57D7 /* Layers */,
35136D491D4277EA00C20EFD /* Sources */,
35599DE91D46F14E0048254D /* MGLStyleAttributeFunction.h */,
3534C7911D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp */,
35599DEA1D46F14E0048254D /* MGLStyleAttributeFunction.mm */,
35599DEF1D46F3A60048254D /* MGLStyleAttributeValue.h */,
3534C7941D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp */,
3593E51F1D529C29006D9365 /* MGLStyleAttribute.hpp */,
3593E5201D529C29006D9365 /* MGLStyleAttribute.mm */,
3538AA151D541C43008EC33D /* MGLStyleFilter.h */,
3538AA161D541C43008EC33D /* MGLStyleFilter.m */,
);
name = Styling;
sourceTree = "<group>";
};
35599DB81D46AD7F0048254D /* Categories */ = {
isa = PBXGroup;
children = (
350098AD1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h */,
3593E5251D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp */,
350098AE1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm */,
350098BF1D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h */,
350098C51D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */,
350098C01D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm */,
350098C81D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h */,
350098CE1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */,
350098C91D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm */,
350098D11D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h */,
350098D71D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp */,
350098D21D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm */,
350098DA1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h */,
354D42DB1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */,
350098DB1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm */,
);
name = Categories;
sourceTree = "<group>";
};
357579811D502AD4000B822E /* Styling */ = {
isa = PBXGroup;
children = (
353349B21D5CC6F20094E9DE /* amsterdam.geojson */,
3575798F1D513EF1000B822E /* Layers */,
);
name = Styling;
sourceTree = "<group>";
};
3575798F1D513EF1000B822E /* Layers */ = {
isa = PBXGroup;
children = (
DA2DBBCC1D51E80400D38FF9 /* MGLStyleLayerTests.h */,
DA2DBBCD1D51E80400D38FF9 /* MGLStyleLayerTests.m */,
3575797F1D501E09000B822E /* MGLFillStyleLayerTests.m */,
357579821D502AE6000B822E /* MGLRasterStyleLayerTests.m */,
357579841D502AF5000B822E /* MGLSymbolStyleLayerTests.m */,
357579861D502AFE000B822E /* MGLLineStyleLayerTests.m */,
357579881D502B06000B822E /* MGLCircleStyleLayerTests.m */,
3575798A1D502B0C000B822E /* MGLBackgroundStyleLayerTests.m */,
3575798C1D502EC7000B822E /* MGLRuntimeStylingHelper.h */,
3575798D1D502EC7000B822E /* MGLRuntimeStylingHelper.m */,
);
name = Layers;
sourceTree = "<group>";
};
35CE617F1D4165C2004F2359 /* Categories */ = {
isa = PBXGroup;
children = (
35CE61801D4165D9004F2359 /* UIColor+MGLAdditions.hpp */,
35CE61811D4165D9004F2359 /* UIColor+MGLAdditions.mm */,
);
name = Categories;
sourceTree = "<group>";
};
402E9DE21CD3A56500FD4519 /* Playground */ = {
isa = PBXGroup;
children = (
@@ -665,7 +964,7 @@
DA2E88521CC036F400F24E7B /* SDK Tests */ = {
isa = PBXGroup;
children = (
DA2E88551CC036F400F24E7B /* Info.plist */,
357579811D502AD4000B822E /* Styling */,
353D23951D0B0DFE002BE09D /* MGLAnnotationViewTests.m */,
DA35A2C31CCA9F8300E826B2 /* MGLClockDirectionFormatterTests.m */,
DA35A2C41CCA9F8300E826B2 /* MGLCompassDirectionFormatterTests.m */,
@@ -677,6 +976,7 @@
DA2E885E1CC0382C00F24E7B /* MGLOfflineRegionTests.m */,
DA2E885F1CC0382C00F24E7B /* MGLOfflineStorageTests.m */,
DA2E88601CC0382C00F24E7B /* MGLStyleTests.mm */,
DA2E88551CC036F400F24E7B /* Info.plist */,
);
name = "SDK Tests";
path = test;
@@ -687,6 +987,7 @@
children = (
DA88485E1CBAFC2E00AB86E3 /* Mapbox.h */,
DA8847DE1CBAFA3E00AB86E3 /* Foundation */,
DA8F25BC1D51D2570010E6B5 /* Foundation Templates */,
DA8933B91CCD2C6700E68420 /* Foundation Resources */,
DA8848331CBAFB2A00AB86E3 /* Kit */,
DA8848621CBAFCC100AB86E3 /* Kit Resources */,
@@ -701,6 +1002,7 @@
DA8847DE1CBAFA3E00AB86E3 /* Foundation */ = {
isa = PBXGroup;
children = (
35599DA21D4682B60048254D /* Styling */,
DAD165831CF4CFED001FF4B9 /* Categories */,
DAD165801CF4CF9A001FF4B9 /* Formatters */,
DAD165811CF4CFC4001FF4B9 /* Geometry */,
@@ -711,10 +1013,12 @@
DA8847E21CBAFA5100AB86E3 /* MGLMapCamera.h */,
DA8848031CBAFA6200AB86E3 /* MGLMapCamera.mm */,
DA8847EC1CBAFA5100AB86E3 /* MGLStyle.h */,
35E0CFE51D3E501500188327 /* MGLStyle_Private.hpp */,
DA88480F1CBAFA6200AB86E3 /* MGLStyle.mm */,
DA8847EE1CBAFA5100AB86E3 /* MGLTypes.h */,
DA8848111CBAFA6200AB86E3 /* MGLTypes.m */,
DA8848911CBB049300AB86E3 /* reachability */,
35E0CFE81D3E53FE00188327 /* MGLStyle_Private.hpp */,
);
name = Foundation;
path = ../darwin/src;
@@ -723,10 +1027,11 @@
DA8848331CBAFB2A00AB86E3 /* Kit */ = {
isa = PBXGroup;
children = (
35CE617F1D4165C2004F2359 /* Categories */,
DAD165841CF4D06B001FF4B9 /* Annotations */,
DAD165851CF4D08B001FF4B9 /* Telemetry */,
DA8848361CBAFB8500AB86E3 /* MGLMapView.h */,
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Internal.h */,
DA17BE2F1CC4BAC300402C41 /* MGLMapView_Private.hpp */,
DA8848371CBAFB8500AB86E3 /* MGLMapView+IBAdditions.h */,
DA8848381CBAFB8500AB86E3 /* MGLMapView+MGLCustomStyleLayerAdditions.h */,
DA737EE01D056A4E005BDA16 /* MGLMapViewDelegate.h */,
@@ -815,6 +1120,17 @@
path = assets;
sourceTree = "<group>";
};
DA8F25BC1D51D2570010E6B5 /* Foundation Templates */ = {
isa = PBXGroup;
children = (
DA8F25B91D51D2570010E6B5 /* MGLRuntimeStylingTests.m.ejs */,
DA8F25BA1D51D2570010E6B5 /* MGLStyleLayer.h.ejs */,
DA8F25BB1D51D2570010E6B5 /* MGLStyleLayer.mm.ejs */,
);
name = "Foundation Templates";
path = ../../darwin/src;
sourceTree = "<group>";
};
DABCABA91CB80692000A7C39 /* Benchmarking App */ = {
isa = PBXGroup;
children = (
@@ -971,63 +1287,95 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
35D13AC31D3D19DD00AFB4E0 /* MGLFillStyleLayer.h in Headers */,
DA88483A1CBAFB8500AB86E3 /* MGLAnnotationImage.h in Headers */,
DA35A2BB1CCA9A6900E826B2 /* MGLClockDirectionFormatter.h in Headers */,
353933FE1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */,
DA8848861CBB033F00AB86E3 /* Fabric+FABKits.h in Headers */,
DA8848201CBAFA6200AB86E3 /* MGLOfflinePack_Private.h in Headers */,
DA8847FA1CBAFA5100AB86E3 /* MGLPolyline.h in Headers */,
3566C7711D4A9198008152BC /* MGLSource_Private.hpp in Headers */,
3593E5211D529C29006D9365 /* MGLStyleAttribute.hpp in Headers */,
35599DEB1D46F14E0048254D /* MGLStyleAttributeFunction.h in Headers */,
4018B1C91CDC288A00F666AF /* MGLAnnotationView_Private.h in Headers */,
DA88482C1CBAFA6200AB86E3 /* NSBundle+MGLAdditions.h in Headers */,
35D13AB71D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */,
354D42DC1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DA88488E1CBB047F00AB86E3 /* reachability.h in Headers */,
350098DC1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h in Headers */,
DA8848231CBAFA6200AB86E3 /* MGLOfflineStorage_Private.h in Headers */,
404326891D5B9B27007111BD /* MGLAnnotationContainerView_Private.h in Headers */,
DA88483B1CBAFB8500AB86E3 /* MGLCalloutView.h in Headers */,
35E0CFE61D3E501500188327 /* MGLStyle_Private.hpp in Headers */,
3593E5261D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp in Headers */,
35599DF01D46F3A60048254D /* MGLStyleAttributeValue.h in Headers */,
DA8848531CBAFB9800AB86E3 /* MGLCompactCalloutView.h in Headers */,
DA8847FB1CBAFA5100AB86E3 /* MGLShape.h in Headers */,
353933F51D3FB785003F57D7 /* MGLBackgroundStyleLayer.h in Headers */,
DA88485A1CBAFB9800AB86E3 /* MGLUserLocation_Private.h in Headers */,
DA27C24F1CBB4C11000B0ECD /* MGLAccountManager_Private.h in Headers */,
DA8847FC1CBAFA5100AB86E3 /* MGLStyle.h in Headers */,
DA8847F01CBAFA5100AB86E3 /* MGLAnnotation.h in Headers */,
DA88483E1CBAFB8500AB86E3 /* MGLMapView+MGLCustomStyleLayerAdditions.h in Headers */,
4018B1CA1CDC288E00F666AF /* MGLAnnotationView.h in Headers */,
35E79F201D41266300957B9E /* MGLStyleLayer_Private.hpp in Headers */,
350098C61D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp in Headers */,
353933FB1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h in Headers */,
DA8847EF1CBAFA5100AB86E3 /* MGLAccountManager.h in Headers */,
DA8848511CBAFB9800AB86E3 /* MGLAPIClient.h in Headers */,
DA35A2C91CCAAAD200E826B2 /* NSValue+MGLAdditions.h in Headers */,
350098CF1D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DA8848571CBAFB9800AB86E3 /* MGLMapboxEvents.h in Headers */,
DA8848311CBAFA6200AB86E3 /* NSString+MGLAdditions.h in Headers */,
353933F81D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */,
DA8847F41CBAFA5100AB86E3 /* MGLOfflinePack.h in Headers */,
DA88482E1CBAFA6200AB86E3 /* NSException+MGLAdditions.h in Headers */,
DA8848551CBAFB9800AB86E3 /* MGLLocationManager.h in Headers */,
350098C11D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */,
DA88483F1CBAFB8500AB86E3 /* MGLUserLocation.h in Headers */,
DA88483D1CBAFB8500AB86E3 /* MGLMapView+IBAdditions.h in Headers */,
DA17BE301CC4BAC300402C41 /* MGLMapView_Internal.h in Headers */,
DA17BE301CC4BAC300402C41 /* MGLMapView_Private.hpp in Headers */,
DAD165781CF4CDFF001FF4B9 /* MGLShapeCollection.h in Headers */,
DA88481E1CBAFA6200AB86E3 /* MGLMultiPoint_Private.h in Headers */,
3566C7661D4A77BA008152BC /* MGLGeoJSONSource.h in Headers */,
35CE61821D4165D9004F2359 /* UIColor+MGLAdditions.hpp in Headers */,
DA35A29E1CC9E94C00E826B2 /* MGLCoordinateFormatter.h in Headers */,
DA8847F71CBAFA5100AB86E3 /* MGLOverlay.h in Headers */,
DA35A2B11CCA141D00E826B2 /* MGLCompassDirectionFormatter.h in Headers */,
350098D31D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h in Headers */,
DA88488B1CBB037E00AB86E3 /* SMCalloutView.h in Headers */,
DA8847FE1CBAFA5100AB86E3 /* MGLTypes.h in Headers */,
DA8847F11CBAFA5100AB86E3 /* MGLGeometry.h in Headers */,
DA8848221CBAFA6200AB86E3 /* MGLOfflineRegion_Private.h in Headers */,
35136D4C1D4277FC00C20EFD /* MGLSource.h in Headers */,
3566C76C1D4A8DFA008152BC /* MGLRasterSource.h in Headers */,
DA8847F91CBAFA5100AB86E3 /* MGLPolygon.h in Headers */,
DA8847F81CBAFA5100AB86E3 /* MGLPointAnnotation.h in Headers */,
353933F21D3FB753003F57D7 /* MGLCircleStyleLayer.h in Headers */,
DA8847F31CBAFA5100AB86E3 /* MGLMultiPoint.h in Headers */,
DAD1656C1CF41981001FF4B9 /* MGLFeature.h in Headers */,
40EDA1C01CFE0E0200D9EA68 /* MGLAnnotationContainerView.h in Headers */,
DA88484F1CBAFB9800AB86E3 /* MGLAnnotationImage_Private.h in Headers */,
3534C7921D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp in Headers */,
DA8847F21CBAFA5100AB86E3 /* MGLMapCamera.h in Headers */,
3538AA1D1D542239008EC33D /* MGLBaseStyleLayer.h in Headers */,
DA8847F51CBAFA5100AB86E3 /* MGLOfflineRegion.h in Headers */,
DA737EE11D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */,
DA8848851CBB033F00AB86E3 /* FABKitProtocol.h in Headers */,
DA88481B1CBAFA6200AB86E3 /* MGLGeometry_Private.h in Headers */,
DA88485C1CBAFB9800AB86E3 /* MGLUserLocationAnnotationView.h in Headers */,
350098CA1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h in Headers */,
350098AF1D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h in Headers */,
DA8848871CBB033F00AB86E3 /* Fabric.h in Headers */,
350098D81D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */,
35305D4A1D22AA6A0007D005 /* NSData+MGLAdditions.h in Headers */,
DA8848841CBB033F00AB86E3 /* FABAttributes.h in Headers */,
3538AA171D541C43008EC33D /* MGLStyleFilter.h in Headers */,
DA8847FD1CBAFA5100AB86E3 /* MGLTilePyramidOfflineRegion.h in Headers */,
DA88482F1CBAFA6200AB86E3 /* NSProcessInfo+MGLAdditions.h in Headers */,
DA8848601CBAFC2E00AB86E3 /* Mapbox.h in Headers */,
350098BB1D480108004B2AF0 /* MGLVectorSource.h in Headers */,
3534C7951D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp in Headers */,
DA8847F61CBAFA5100AB86E3 /* MGLOfflineStorage.h in Headers */,
DAD1656E1CF41981001FF4B9 /* MGLFeature_Private.h in Headers */,
DA88483C1CBAFB8500AB86E3 /* MGLMapView.h in Headers */,
@@ -1039,36 +1387,68 @@
buildActionMask = 2147483647;
files = (
DA35A2CA1CCAAAD200E826B2 /* NSValue+MGLAdditions.h in Headers */,
350098BC1D480108004B2AF0 /* MGLVectorSource.h in Headers */,
353933FC1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h in Headers */,
3566C76D1D4A8DFA008152BC /* MGLRasterSource.h in Headers */,
35599DEC1D46F14E0048254D /* MGLStyleAttributeFunction.h in Headers */,
DABFB85E1CBE99E500D62B32 /* MGLAnnotation.h in Headers */,
350098D01D482E10004B2AF0 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DABFB8641CBE99E500D62B32 /* MGLOfflineStorage.h in Headers */,
DAD165791CF4CDFF001FF4B9 /* MGLShapeCollection.h in Headers */,
350098D41D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.h in Headers */,
3566C7671D4A77BA008152BC /* MGLGeoJSONSource.h in Headers */,
DA35A29F1CC9E94C00E826B2 /* MGLCoordinateFormatter.h in Headers */,
DABFB8711CBE9A0F00D62B32 /* MGLMapView+MGLCustomStyleLayerAdditions.h in Headers */,
DABFB8611CBE99E500D62B32 /* MGLMultiPoint.h in Headers */,
35E0CFE71D3E501500188327 /* MGLStyle_Private.hpp in Headers */,
DABFB86D1CBE9A0F00D62B32 /* MGLAnnotationImage.h in Headers */,
DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */,
3566C7721D4A9198008152BC /* MGLSource_Private.hpp in Headers */,
353933FF1D3FB7DD003F57D7 /* MGLSymbolStyleLayer.h in Headers */,
DABFB8661CBE99E500D62B32 /* MGLPointAnnotation.h in Headers */,
35599DF11D46F3A60048254D /* MGLStyleAttributeValue.h in Headers */,
DABFB8621CBE99E500D62B32 /* MGLOfflinePack.h in Headers */,
DAD1656D1CF41981001FF4B9 /* MGLFeature.h in Headers */,
DA17BE311CC4BDAA00402C41 /* MGLMapView_Internal.h in Headers */,
DA17BE311CC4BDAA00402C41 /* MGLMapView_Private.hpp in Headers */,
DABFB86C1CBE99E500D62B32 /* MGLTypes.h in Headers */,
350098C21D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */,
DABFB8691CBE99E500D62B32 /* MGLShape.h in Headers */,
350098CB1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.h in Headers */,
DABFB8701CBE9A0F00D62B32 /* MGLMapView+IBAdditions.h in Headers */,
350098D91D4830D5004B2AF0 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */,
35CE61831D4165D9004F2359 /* UIColor+MGLAdditions.hpp in Headers */,
350098B01D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.h in Headers */,
DABFB8671CBE99E500D62B32 /* MGLPolygon.h in Headers */,
350098C71D48288B004B2AF0 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp in Headers */,
3593E5221D529C29006D9365 /* MGLStyleAttribute.hpp in Headers */,
DABFB8651CBE99E500D62B32 /* MGLOverlay.h in Headers */,
35E79F211D41266300957B9E /* MGLStyleLayer_Private.hpp in Headers */,
350098DD1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.h in Headers */,
3534C7961D4BD1D400D874A4 /* MGLStyleAttributeValue_Private.hpp in Headers */,
DABFB8681CBE99E500D62B32 /* MGLPolyline.h in Headers */,
3534C7931D4BC95400D874A4 /* MGLStyleAttributeFunction_Private.hpp in Headers */,
DABFB86F1CBE9A0F00D62B32 /* MGLMapView.h in Headers */,
353933F31D3FB753003F57D7 /* MGLCircleStyleLayer.h in Headers */,
3593E5271D529EDC006D9365 /* UIColor+MGLStyleAttributeAdditions_Private.hpp in Headers */,
3538AA1E1D542239008EC33D /* MGLBaseStyleLayer.h in Headers */,
DABFB8631CBE99E500D62B32 /* MGLOfflineRegion.h in Headers */,
DA35A2B21CCA141D00E826B2 /* MGLCompassDirectionFormatter.h in Headers */,
DABFB8731CBE9A9900D62B32 /* Mapbox.h in Headers */,
DABFB86B1CBE99E500D62B32 /* MGLTilePyramidOfflineRegion.h in Headers */,
4018B1CB1CDC288E00F666AF /* MGLAnnotationView.h in Headers */,
DABFB85F1CBE99E500D62B32 /* MGLGeometry.h in Headers */,
354D42DD1D4919F900F400A1 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */,
353933F61D3FB785003F57D7 /* MGLBackgroundStyleLayer.h in Headers */,
DABFB85D1CBE99E500D62B32 /* MGLAccountManager.h in Headers */,
353933F91D3FB79F003F57D7 /* MGLLineStyleLayer.h in Headers */,
35D13AB81D3D15E300AFB4E0 /* MGLStyleLayer.h in Headers */,
35136D4D1D4277FC00C20EFD /* MGLSource.h in Headers */,
DA35A2BC1CCA9A6900E826B2 /* MGLClockDirectionFormatter.h in Headers */,
35D13AC41D3D19DD00AFB4E0 /* MGLFillStyleLayer.h in Headers */,
DABFB86E1CBE9A0F00D62B32 /* MGLCalloutView.h in Headers */,
DABFB8601CBE99E500D62B32 /* MGLMapCamera.h in Headers */,
DA737EE21D056A4E005BDA16 /* MGLMapViewDelegate.h in Headers */,
3538AA181D541C43008EC33D /* MGLStyleFilter.h in Headers */,
353794D01D22B3BD002C281C /* NSData+MGLAdditions.h in Headers */,
DABFB86A1CBE99E500D62B32 /* MGLStyle.h in Headers */,
);
@@ -1288,6 +1668,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
353349B31D5CC6F20094E9DE /* amsterdam.geojson in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1374,11 +1755,19 @@
DA2E88631CC0382C00F24E7B /* MGLOfflineRegionTests.m in Sources */,
DA2E88651CC0382C00F24E7B /* MGLStyleTests.mm in Sources */,
DA2E88611CC0382C00F24E7B /* MGLGeometryTests.mm in Sources */,
357579801D501E09000B822E /* MGLFillStyleLayerTests.m in Sources */,
DA2E88641CC0382C00F24E7B /* MGLOfflineStorageTests.m in Sources */,
DA2DBBCE1D51E80400D38FF9 /* MGLStyleLayerTests.m in Sources */,
DA35A2C61CCA9F8300E826B2 /* MGLCompassDirectionFormatterTests.m in Sources */,
3575798E1D502EC7000B822E /* MGLRuntimeStylingHelper.m in Sources */,
357579851D502AF5000B822E /* MGLSymbolStyleLayerTests.m in Sources */,
357579871D502AFE000B822E /* MGLLineStyleLayerTests.m in Sources */,
357579891D502B06000B822E /* MGLCircleStyleLayerTests.m in Sources */,
DA35A2C51CCA9F8300E826B2 /* MGLClockDirectionFormatterTests.m in Sources */,
3575798B1D502B0C000B822E /* MGLBackgroundStyleLayerTests.m in Sources */,
DA2E88621CC0382C00F24E7B /* MGLOfflinePackTests.m in Sources */,
DA35A2AA1CCA058D00E826B2 /* MGLCoordinateFormatterTests.m in Sources */,
357579831D502AE6000B822E /* MGLRasterStyleLayerTests.m in Sources */,
353D23961D0B0DFE002BE09D /* MGLAnnotationViewTests.m in Sources */,
35E208A71D24210F00EC9A46 /* MGLNSDataAdditionsTests.m in Sources */,
DA0CD5901CF56F6A00A5F5A5 /* MGLFeatureTests.mm in Sources */,
@@ -1389,21 +1778,39 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
35136D391D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */,
350098D51D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm in Sources */,
DA88485D1CBAFB9800AB86E3 /* MGLUserLocationAnnotationView.m in Sources */,
3593E5231D529C29006D9365 /* MGLStyleAttribute.mm in Sources */,
350098B11D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm in Sources */,
DAD165701CF41981001FF4B9 /* MGLFeature.mm in Sources */,
350098C31D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */,
40EDA1C11CFE0E0500D9EA68 /* MGLAnnotationContainerView.m in Sources */,
DA8848541CBAFB9800AB86E3 /* MGLCompactCalloutView.m in Sources */,
DA8848251CBAFA6200AB86E3 /* MGLPointAnnotation.m in Sources */,
35136D3C1D42272500C20EFD /* MGLCircleStyleLayer.mm in Sources */,
3538AA191D541C43008EC33D /* MGLStyleFilter.m in Sources */,
350098DE1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */,
3566C7681D4A77BA008152BC /* MGLGeoJSONSource.mm in Sources */,
35136D421D42274500C20EFD /* MGLRasterStyleLayer.mm in Sources */,
3538AA1F1D542239008EC33D /* MGLBaseStyleLayer.mm in Sources */,
DA88482D1CBAFA6200AB86E3 /* NSBundle+MGLAdditions.m in Sources */,
DA88485B1CBAFB9800AB86E3 /* MGLUserLocation.m in Sources */,
350098BD1D480108004B2AF0 /* MGLVectorSource.m in Sources */,
3566C76E1D4A8DFA008152BC /* MGLRasterSource.mm in Sources */,
DA88488C1CBB037E00AB86E3 /* SMCalloutView.m in Sources */,
35136D4E1D4277FC00C20EFD /* MGLSource.mm in Sources */,
DA35A2B81CCA9A5D00E826B2 /* MGLClockDirectionFormatter.m in Sources */,
DAD1657A1CF4CDFF001FF4B9 /* MGLShapeCollection.m in Sources */,
350098CC1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */,
35136D451D42275100C20EFD /* MGLSymbolStyleLayer.mm in Sources */,
35599DED1D46F14E0048254D /* MGLStyleAttributeFunction.mm in Sources */,
DA8848211CBAFA6200AB86E3 /* MGLOfflinePack.mm in Sources */,
DA8848591CBAFB9800AB86E3 /* MGLMapView.mm in Sources */,
DA8848501CBAFB9800AB86E3 /* MGLAnnotationImage.m in Sources */,
DA8848281CBAFA6200AB86E3 /* MGLShape.m in Sources */,
DA35A2B31CCA141D00E826B2 /* MGLCompassDirectionFormatter.m in Sources */,
35D13AB91D3D15E300AFB4E0 /* MGLStyleLayer.mm in Sources */,
DA35A2CB1CCAAAD200E826B2 /* NSValue+MGLAdditions.m in Sources */,
DA8848321CBAFA6200AB86E3 /* NSString+MGLAdditions.m in Sources */,
DA35A2A11CC9E95F00E826B2 /* MGLCoordinateFormatter.m in Sources */,
@@ -1417,11 +1824,14 @@
DA8848261CBAFA6200AB86E3 /* MGLPolygon.mm in Sources */,
DA8848521CBAFB9800AB86E3 /* MGLAPIClient.m in Sources */,
DA8848301CBAFA6200AB86E3 /* NSProcessInfo+MGLAdditions.m in Sources */,
35D13AC51D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm in Sources */,
DA8848241CBAFA6200AB86E3 /* MGLOfflineStorage.mm in Sources */,
DA88482A1CBAFA6200AB86E3 /* MGLTilePyramidOfflineRegion.mm in Sources */,
35136D3F1D42273000C20EFD /* MGLLineStyleLayer.mm in Sources */,
DA88481A1CBAFA6200AB86E3 /* MGLAccountManager.m in Sources */,
DA8848271CBAFA6200AB86E3 /* MGLPolyline.mm in Sources */,
DA8848581CBAFB9800AB86E3 /* MGLMapboxEvents.m in Sources */,
35CE61841D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */,
DA8848561CBAFB9800AB86E3 /* MGLLocationManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1430,22 +1840,40 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
35136D3A1D42271A00C20EFD /* MGLBackgroundStyleLayer.mm in Sources */,
350098D61D4830A6004B2AF0 /* NSString+MGLStyleAttributeAdditions.mm in Sources */,
DAA4E4221CBB730400178DFB /* MGLPointAnnotation.m in Sources */,
3593E5241D529C29006D9365 /* MGLStyleAttribute.mm in Sources */,
350098B21D47E6F4004B2AF0 /* UIColor+MGLStyleAttributeAdditions.mm in Sources */,
DAD165711CF41981001FF4B9 /* MGLFeature.mm in Sources */,
350098C41D48149E004B2AF0 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */,
40EDA1C21CFE0E0500D9EA68 /* MGLAnnotationContainerView.m in Sources */,
DAA4E4291CBB730400178DFB /* NSBundle+MGLAdditions.m in Sources */,
DAA4E42E1CBB730400178DFB /* MGLAPIClient.m in Sources */,
35136D3D1D42272500C20EFD /* MGLCircleStyleLayer.mm in Sources */,
3538AA1A1D541C43008EC33D /* MGLStyleFilter.m in Sources */,
350098DF1D484E60004B2AF0 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */,
3566C7691D4A77BA008152BC /* MGLGeoJSONSource.mm in Sources */,
35136D431D42274500C20EFD /* MGLRasterStyleLayer.mm in Sources */,
3538AA201D542239008EC33D /* MGLBaseStyleLayer.mm in Sources */,
DAA4E4201CBB730400178DFB /* MGLOfflinePack.mm in Sources */,
DAA4E4331CBB730400178DFB /* MGLUserLocation.m in Sources */,
350098BE1D480108004B2AF0 /* MGLVectorSource.m in Sources */,
3566C76F1D4A8DFA008152BC /* MGLRasterSource.mm in Sources */,
DAA4E4351CBB730400178DFB /* SMCalloutView.m in Sources */,
35136D4F1D4277FC00C20EFD /* MGLSource.mm in Sources */,
DA35A2B91CCA9A5D00E826B2 /* MGLClockDirectionFormatter.m in Sources */,
DAD1657B1CF4CDFF001FF4B9 /* MGLShapeCollection.m in Sources */,
350098CD1D482D9C004B2AF0 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */,
DAA4E4251CBB730400178DFB /* MGLShape.m in Sources */,
35136D461D42275100C20EFD /* MGLSymbolStyleLayer.mm in Sources */,
35599DEE1D46F14E0048254D /* MGLStyleAttributeFunction.mm in Sources */,
DAA4E42B1CBB730400178DFB /* NSString+MGLAdditions.m in Sources */,
DAA4E4261CBB730400178DFB /* MGLStyle.mm in Sources */,
DAA4E41D1CBB730400178DFB /* MGLGeometry.mm in Sources */,
DAA4E41F1CBB730400178DFB /* MGLMultiPoint.mm in Sources */,
DA35A2B41CCA141D00E826B2 /* MGLCompassDirectionFormatter.m in Sources */,
35D13ABA1D3D15E300AFB4E0 /* MGLStyleLayer.mm in Sources */,
DA35A2CC1CCAAAD200E826B2 /* NSValue+MGLAdditions.m in Sources */,
DAA4E4281CBB730400178DFB /* MGLTypes.m in Sources */,
DA35A2A21CC9E95F00E826B2 /* MGLCoordinateFormatter.m in Sources */,
@@ -1458,11 +1886,14 @@
DAA4E4341CBB730400178DFB /* MGLUserLocationAnnotationView.m in Sources */,
DAA4E4311CBB730400178DFB /* MGLMapboxEvents.m in Sources */,
DAA4E4231CBB730400178DFB /* MGLPolygon.mm in Sources */,
35D13AC61D3D19DD00AFB4E0 /* MGLFillStyleLayer.mm in Sources */,
DAA4E42A1CBB730400178DFB /* NSProcessInfo+MGLAdditions.m in Sources */,
DAA4E4211CBB730400178DFB /* MGLOfflineStorage.mm in Sources */,
35136D401D42273000C20EFD /* MGLLineStyleLayer.mm in Sources */,
DAA4E42F1CBB730400178DFB /* MGLCompactCalloutView.m in Sources */,
DAA4E4271CBB730400178DFB /* MGLTilePyramidOfflineRegion.mm in Sources */,
DAA4E41C1CBB730400178DFB /* MGLAccountManager.m in Sources */,
35CE61851D4165D9004F2359 /* UIColor+MGLAdditions.mm in Sources */,
DAA4E4241CBB730400178DFB /* MGLPolyline.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

View File

@@ -1,7 +1,7 @@
#import "MGLAnnotationView.h"
#import "MGLAnnotationView_Private.h"
#import "MGLMapView_Private.hpp"
#import "MGLAnnotation.h"
#import "MGLMapView_Internal.h"
#import "NSBundle+MGLAdditions.h"

View File

@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
@class MGLPolyline;
@class MGLPolygon;
@class MGLShape;
@class MGLStyle;
@protocol MGLMapViewDelegate;
@protocol MGLAnnotation;
@@ -1087,6 +1088,10 @@ IB_DESIGNABLE
*/
- (void)removeOverlays:(NS_ARRAY_OF(id <MGLOverlay>) *)overlays;
#pragma mark - Runtime styling API
- (MGLStyle *)style;
#pragma mark Accessing the Underlying Map Data
/**

View File

@@ -1,4 +1,4 @@
#import "MGLMapView_Internal.h"
#import "MGLMapView_Private.hpp"
#import <mbgl/platform/log.hpp>
#import <mbgl/gl/gl.hpp>
@@ -35,10 +35,13 @@
#import "NSString+MGLAdditions.h"
#import "NSProcessInfo+MGLAdditions.h"
#import "NSException+MGLAdditions.h"
#import "UIColor+MGLAdditions.hpp"
#import "MGLUserLocationAnnotationView.h"
#import "MGLUserLocation_Private.h"
#import "MGLAnnotationImage_Private.h"
#import "MGLAnnotationView_Private.h"
#import "MGLStyle_Private.hpp"
#import "MGLStyleLayer_Private.hpp"
#import "MGLMapboxEvents.h"
#import "MGLCompactCalloutView.h"
#import "MGLAnnotationContainerView.h"
@@ -131,17 +134,6 @@ mbgl::util::UnitBezier MGLUnitBezierForMediaTimingFunction(CAMediaTimingFunction
return { p1[0], p1[1], p2[0], p2[1] };
}
mbgl::Color MGLColorObjectFromUIColor(UIColor *color)
{
if (!color)
{
return { 0, 0, 0, 0 };
}
CGFloat r, g, b, a;
[color getRed:&r green:&g blue:&b alpha:&a];
return { (float)r, (float)g, (float)b, (float)a };
}
@interface MGLAnnotationAccessibilityElement : UIAccessibilityElement
@property (nonatomic) MGLAnnotationTag tag;
@@ -611,6 +603,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
return image;
}
- (MGLStyle *)style
{
MGLStyle *style = [[MGLStyle alloc] init];
style.mapView = self;
return style;
}
- (void)reachabilityChanged:(NSNotification *)notification
{
MGLReachability *reachability = [notification object];
@@ -3046,7 +3045,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
UIColor *color = (_delegateHasStrokeColorsForShapeAnnotations
? [self.delegate mapView:self strokeColorForShapeAnnotation:annotation]
: self.tintColor);
return MGLColorObjectFromUIColor(color);
return color.mbgl_color;
}
- (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation
@@ -3054,7 +3053,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
UIColor *color = (_delegateHasFillColorsForShapeAnnotations
? [self.delegate mapView:self fillColorForPolygonAnnotation:annotation]
: self.tintColor);
return MGLColorObjectFromUIColor(color);
return color.mbgl_color;
}
- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation
@@ -5160,4 +5159,8 @@ void MGLFinishCustomStyleLayer(void *context)
_mbglMap->update(mbgl::Update::Repaint);
}
- (mbgl::Map *)mbglMap {
return _mbglMap;
}
@end

View File

@@ -1,5 +1,7 @@
#import <Mapbox/Mapbox.h>
#include <mbgl/mbgl.hpp>
/// Minimum size of an annotation’s accessibility element.
extern const CGSize MGLAnnotationAccessibilityElementMinimumSize;
@@ -11,6 +13,8 @@ extern const CGSize MGLAnnotationAccessibilityElementMinimumSize;
/** Triggers another render pass even when it is not necessary. */
- (void)setNeedsGLDisplay;
- (mbgl::Map *)mbglMap;
/** Returns whether the map view is currently loading or processing any assets required to render the map */
- (BOOL)isFullyLoaded;

View File

@@ -32,7 +32,26 @@ FOUNDATION_EXPORT const unsigned char MapboxVersionString[];
#import "MGLShape.h"
#import "MGLShapeCollection.h"
#import "MGLStyle.h"
#import "MGLStyleLayer.h"
#import "MGLBaseStyleLayer.h"
#import "MGLFillStyleLayer.h"
#import "MGLLineStyleLayer.h"
#import "MGLSymbolStyleLayer.h"
#import "MGLRasterStyleLayer.h"
#import "MGLCircleStyleLayer.h"
#import "MGLBackgroundStyleLayer.h"
#import "MGLSource.h"
#import "MGLVectorSource.h"
#import "MGLGeoJSONSource.h"
#import "MGLRasterSource.h"
#import "MGLTilePyramidOfflineRegion.h"
#import "MGLTypes.h"
#import "MGLUserLocation.h"
#import "NSValue+MGLAdditions.h"
#import "MGLStyleAttributeValue.h"
#import "MGLStyleAttributeFunction.h"
#import "UIColor+MGLStyleAttributeAdditions.h"
#import "NSNumber+MGLStyleAttributeAdditions.h"
#import "NSValue+MGLStyleAttributeAdditions.h"
#import "NSString+MGLStyleAttributeAdditions.h"
#import "NSArray+MGLStyleAttributeAdditions.h"

View File

@@ -0,0 +1,14 @@
#import <UIKit/UIKit.h>
#include <mbgl/util/color.hpp>
#include <mbgl/style/property_value.hpp>
@interface UIColor (MGLAdditions)
- (mbgl::Color)mbgl_color;
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue;
+ (UIColor *)mbgl_colorWithColor:(mbgl::Color)color;
@end

View File

@@ -0,0 +1,26 @@
#import "UIColor+MGLAdditions.hpp"
#import "MGLStyleAttributeValue.h"
#import "MGLStyleAttributeValue_Private.hpp"
@implementation UIColor (MGLAdditions)
- (mbgl::Color)mbgl_color
{
CGFloat r, g, b, a;
[self getRed:&r green:&g blue:&b alpha:&a];
return { (float)r, (float)g, (float)b, (float)a };
}
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue
{
mbgl::Color color = self.mbgl_color;
return {{ color.r, color.g, color.b, color.a }};
}
+ (UIColor *)mbgl_colorWithColor:(mbgl::Color)color
{
return [UIColor colorWithRed:color.r green:color.g blue:color.b alpha:color.a];
}
@end

View File

@@ -0,0 +1,7 @@
#import <UIKit/UIKit.h>
#import "MGLStyleAttributeValue.h"
@interface UIColor (MGLStyleAttributeAdditions) <MGLStyleAttributeValue>
@end

View File

@@ -0,0 +1,14 @@
#import "UIColor+MGLStyleAttributeAdditions.h"
#import "MGLStyleAttributeValue.h"
#import "MGLStyleAttributeValue_Private.hpp"
#import "UIColor+MGLAdditions.hpp"
@implementation UIColor (MGLStyleAttributeAdditions)
- (BOOL)isFunction
{
return NO;
}
@end

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11185.3" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11185.3"/>
</dependencies>
<objects>
<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="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"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="256" height="256"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="6RL-d9-juy" customClass="MGLMapView">
<rect key="frame" x="0.0" y="0.0" width="256" height="256"/>
<connections>
<outlet property="delegate" destination="-2" id="6kS-ct-JEg"/>
</connections>
</customView>
</subviews>
<constraints>
<constraint firstItem="6RL-d9-juy" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="KEN-aL-UF0"/>
<constraint firstAttribute="bottom" secondItem="6RL-d9-juy" secondAttribute="bottom" id="V27-f3-xHZ"/>
<constraint firstAttribute="trailing" secondItem="6RL-d9-juy" secondAttribute="trailing" id="vjq-iM-OyA"/>
<constraint firstItem="6RL-d9-juy" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="yWg-v4-wJB"/>
</constraints>
</view>
</window>
</objects>
</document>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="16A254g" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
@@ -17,7 +17,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="388" y="211" width="512" height="480"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
<view key="contentView" id="TuG-C5-zLS">
<rect key="frame" x="0.0" y="0.0" width="512" height="480"/>
<autoresizingMask key="autoresizingMask"/>
@@ -111,10 +111,10 @@
</window>
<menu title="Map View" id="XbX-6a-Mgy">
<items>
<menuItem title="Drop Pin" id="qZJ-mM-bLj">
<menuItem title="Drop Pin" id="KiK-wh-YwN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="dropPin:" target="-1" id="hxx-eC-kqU"/>
<action selector="dropPin:" target="-1" id="ZH6-Tj-IJT"/>
</connections>
</menuItem>
<menuItem title="Remove Pin" id="Zhx-30-VmE">
@@ -129,6 +129,12 @@
<action selector="selectFeatures:" target="-1" id="ikt-CZ-yZT"/>
</connections>
</menuItem>
<menuItem title="Runtime styling" id="qZJ-mM-bLj">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="runtimeStyling:" target="-1" id="gN9-lw-fG8"/>
</connections>
</menuItem>
</items>
<connections>
<outlet property="delegate" destination="-2" id="oHe-ZP-lyc"/>

View File

@@ -484,6 +484,26 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
}
}
- (IBAction)runtimeStyling:(id)sender {
MGLFillStyleLayer *fillStyleLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"water"];
MGLStyleAttributeFunction *colorFunction = [[MGLStyleAttributeFunction alloc] init];
colorFunction.stops = @{
@0.0: [NSColor redColor],
@10.0: [NSColor yellowColor],
@20.0: [NSColor blackColor],
};
fillStyleLayer.fillColor = colorFunction;
NSURL *geoJSONURL = [NSURL URLWithString:@"https://dl.dropboxusercontent.com/u/5285447/amsterdam.geojson"];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"ams" URL:geoJSONURL];
[self.mapView.style addSource:source];
MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithLayerIdentifier:@"test" sourceIdentifier:@"ams"];
fillLayer.fillColor = [NSColor purpleColor];
[self.mapView.style addLayer:fillLayer];
}
- (IBAction)dropPin:(NSMenuItem *)sender {
[self dropPinAtPoint:_mouseLocationForMapViewContextMenu];
}
@@ -579,6 +599,9 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
if (menuItem.action == @selector(reload:)) {
return YES;
}
if (menuItem.action == @selector(runtimeStyling:)) {
return YES;
}
if (menuItem.action == @selector(dropPin:)) {
id <MGLAnnotation> annotationUnderCursor = [self.mapView annotationAtPoint:_mouseLocationForMapViewContextMenu];
menuItem.hidden = annotationUnderCursor != nil;

View File

@@ -38,6 +38,8 @@ macro(mbgl_platform_core)
PRIVATE platform/default/headless_view.cpp
)
target_add_mason_package(mbgl-core PUBLIC geojson)
target_compile_options(mbgl-core
PRIVATE -fobjc-arc
)

View File

@@ -7,12 +7,39 @@
objects = {
/* Begin PBXBuildFile section */
352742781D4C220900A1ECE6 /* MGLStyleAttributeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 352742771D4C220900A1ECE6 /* MGLStyleAttributeValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
3527427C1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3527427A1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
3527427D1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3527427B1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.m */; };
352742811D4C243B00A1ECE6 /* MGLSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3527427F1D4C243B00A1ECE6 /* MGLSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
352742821D4C243B00A1ECE6 /* MGLSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 352742801D4C243B00A1ECE6 /* MGLSource.mm */; };
352742851D4C244700A1ECE6 /* MGLRasterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 352742831D4C244700A1ECE6 /* MGLRasterSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
352742861D4C244700A1ECE6 /* MGLRasterSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 352742841D4C244700A1ECE6 /* MGLRasterSource.mm */; };
352742891D4C245800A1ECE6 /* MGLGeoJSONSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 352742871D4C245800A1ECE6 /* MGLGeoJSONSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
3527428A1D4C245800A1ECE6 /* MGLGeoJSONSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 352742881D4C245800A1ECE6 /* MGLGeoJSONSource.mm */; };
3527428D1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3527428B1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
3527428E1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3527428C1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm */; };
3527429F1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3527429C1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction_Private.hpp */; };
352742A01D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3527429D1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
352742A11D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3527429E1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.mm */; };
3537CA741D3F93A600380318 /* MGLStyle_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3537CA731D3F93A600380318 /* MGLStyle_Private.hpp */; };
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 */; };
355BA4ED1D41633E00CCC6D5 /* NSColor+MGLAdditions.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 355BA4EB1D41633E00CCC6D5 /* NSColor+MGLAdditions.hpp */; 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, ); }; };
35602BFB1D3EA99F0050646F /* MGLFillStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35602BF91D3EA99F0050646F /* MGLFillStyleLayer.mm */; };
35602BFF1D3EA9B40050646F /* MGLStyleLayer_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 35602BFC1D3EA9B40050646F /* MGLStyleLayer_Private.hpp */; };
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.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E5281D52A628006D9365 /* MGLStyleAttribute.hpp */; };
3593E52B1D52A628006D9365 /* MGLStyleAttribute.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3593E5291D52A628006D9365 /* MGLStyleAttribute.mm */; };
3593E52D1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3593E52C1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.hpp */; };
52BECB0A1CC5A26F009CD791 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */; };
5548BE781D09E718005DDE81 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
5548BE7D1D0ACCD6005DDE81 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
558F18221D0B13B100123F46 /* libmbgl-loop.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 558F18211D0B13B000123F46 /* libmbgl-loop.a */; };
55D9B4B11D005D3900C1CCE2 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 55D9B4B01D005D3900C1CCE2 /* libz.tbd */; };
DA0CD58E1CF56F5800A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */; };
DA2DBBCB1D51E30A00D38FF9 /* MGLStyleLayerTests.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA2DBBCA1D51E30A00D38FF9 /* MGLStyleLayerTests.xib */; };
DA35A2A41CC9EB1A00E826B2 /* MGLCoordinateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA35A2A31CC9EB1A00E826B2 /* MGLCoordinateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA35A2A61CC9EB2700E826B2 /* MGLCoordinateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA35A2A51CC9EB2700E826B2 /* MGLCoordinateFormatter.m */; };
DA35A2A81CC9F41600E826B2 /* MGLCoordinateFormatterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA35A2A71CC9F41600E826B2 /* MGLCoordinateFormatterTests.m */; };
@@ -35,6 +62,31 @@
DA8933AE1CCD290700E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933AB1CCD290700E68420 /* Localizable.strings */; };
DA8933B51CCD2C2500E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B31CCD2C2500E68420 /* Foundation.strings */; };
DA8933B81CCD2C2D00E68420 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B61CCD2C2D00E68420 /* Foundation.stringsdict */; };
DA8F25871D51C9E10010E6B5 /* MGLBackgroundStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25851D51C9E10010E6B5 /* MGLBackgroundStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F25881D51C9E10010E6B5 /* MGLBackgroundStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25861D51C9E10010E6B5 /* MGLBackgroundStyleLayer.mm */; };
DA8F258B1D51CA540010E6B5 /* MGLLineStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25891D51CA540010E6B5 /* MGLLineStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F258C1D51CA540010E6B5 /* MGLLineStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F258A1D51CA540010E6B5 /* MGLLineStyleLayer.mm */; };
DA8F258F1D51CA600010E6B5 /* MGLRasterStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F258D1D51CA600010E6B5 /* MGLRasterStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F25901D51CA600010E6B5 /* MGLRasterStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F258E1D51CA600010E6B5 /* MGLRasterStyleLayer.mm */; };
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.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25961D51CAC70010E6B5 /* MGLVectorSource.m */; };
DA8F259A1D51CAD00010E6B5 /* MGLSource_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25991D51CAD00010E6B5 /* MGLSource_Private.hpp */; };
DA8F259C1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F259B1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.hpp */; };
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.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F259F1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */; };
DA8F25AC1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A01D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F25AD1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25A11D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.mm */; };
DA8F25AE1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A21D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */; };
DA8F25AF1D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A31D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F25B01D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25A41D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.mm */; };
DA8F25B11D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A51D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions_Private.hpp */; };
DA8F25B21D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A61D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA8F25B31D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA8F25A71D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.mm */; };
DA8F25B41D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DA8F25A81D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */; };
DAB6924A1CC75A31005AAB54 /* libmbgl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3451CC31D1200DB3429 /* libmbgl-core.a */; };
DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC2ABC41CC6D343006D18C4 /* MGLAnnotationImage_Private.h */; };
DACC22141CF3D3E200D220D9 /* MGLFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = DACC22121CF3D3E200D220D9 /* MGLFeature.h */; settings = {ATTRIBUTES = (Public, ); }; };
DACC22151CF3D3E200D220D9 /* MGLFeature.mm in Sources */ = {isa = PBXBuildFile; fileRef = DACC22131CF3D3E200D220D9 /* MGLFeature.mm */; };
@@ -100,9 +152,9 @@
DAE6C3B31CC31EF300DB3429 /* MGLAttributionButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3A91CC31EF300DB3429 /* MGLAttributionButton.m */; };
DAE6C3B41CC31EF300DB3429 /* MGLCompassCell.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C3AA1CC31EF300DB3429 /* MGLCompassCell.h */; };
DAE6C3B51CC31EF300DB3429 /* MGLCompassCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3AB1CC31EF300DB3429 /* MGLCompassCell.m */; };
DAE6C3B61CC31EF300DB3429 /* MGLMapView_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.h */; };
DAE6C3B61CC31EF300DB3429 /* MGLMapView_Private.hpp in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.hpp */; };
DAE6C3B71CC31EF300DB3429 /* MGLMapView.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3AD1CC31EF300DB3429 /* MGLMapView.mm */; };
DAE6C3B81CC31EF300DB3429 /* MGLMapView+IBAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.m */; };
DAE6C3B81CC31EF300DB3429 /* MGLMapView+IBAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.mm */; };
DAE6C3B91CC31EF300DB3429 /* MGLOpenGLLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C3AF1CC31EF300DB3429 /* MGLOpenGLLayer.h */; };
DAE6C3BA1CC31EF300DB3429 /* MGLOpenGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3B01CC31EF300DB3429 /* MGLOpenGLLayer.mm */; };
DAE6C3BE1CC31F2E00DB3429 /* default_marker.pdf in Resources */ = {isa = PBXBuildFile; fileRef = DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */; };
@@ -148,6 +200,33 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
352742771D4C220900A1ECE6 /* MGLStyleAttributeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeValue.h; sourceTree = "<group>"; };
3527427A1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSColor+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
3527427B1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSColor+MGLStyleAttributeAdditions.m"; sourceTree = "<group>"; };
3527427F1D4C243B00A1ECE6 /* MGLSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLSource.h; sourceTree = "<group>"; };
352742801D4C243B00A1ECE6 /* MGLSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLSource.mm; sourceTree = "<group>"; };
352742831D4C244700A1ECE6 /* MGLRasterSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLRasterSource.h; sourceTree = "<group>"; };
352742841D4C244700A1ECE6 /* MGLRasterSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLRasterSource.mm; sourceTree = "<group>"; };
352742871D4C245800A1ECE6 /* MGLGeoJSONSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLGeoJSONSource.h; sourceTree = "<group>"; };
352742881D4C245800A1ECE6 /* MGLGeoJSONSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLGeoJSONSource.mm; sourceTree = "<group>"; };
3527428B1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCircleStyleLayer.h; sourceTree = "<group>"; };
3527428C1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLCircleStyleLayer.mm; sourceTree = "<group>"; };
3527429C1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttributeFunction_Private.hpp; sourceTree = "<group>"; };
3527429D1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleAttributeFunction.h; sourceTree = "<group>"; };
3527429E1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleAttributeFunction.mm; sourceTree = "<group>"; };
3537CA731D3F93A600380318 /* MGLStyle_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyle_Private.hpp; sourceTree = "<group>"; };
3538AA211D542685008EC33D /* MGLBaseStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLBaseStyleLayer.h; sourceTree = "<group>"; };
3538AA221D542685008EC33D /* MGLBaseStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLBaseStyleLayer.mm; sourceTree = "<group>"; };
355BA4EB1D41633E00CCC6D5 /* NSColor+MGLAdditions.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSColor+MGLAdditions.hpp"; sourceTree = "<group>"; };
355BA4EC1D41633E00CCC6D5 /* NSColor+MGLAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSColor+MGLAdditions.mm"; sourceTree = "<group>"; };
35602BF81D3EA99F0050646F /* MGLFillStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFillStyleLayer.h; sourceTree = "<group>"; };
35602BF91D3EA99F0050646F /* MGLFillStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLFillStyleLayer.mm; sourceTree = "<group>"; };
35602BFC1D3EA9B40050646F /* MGLStyleLayer_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleLayer_Private.hpp; 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.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttribute.hpp; sourceTree = "<group>"; };
3593E5291D52A628006D9365 /* MGLStyleAttribute.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleAttribute.mm; sourceTree = "<group>"; };
3593E52C1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSColor+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
52BECB091CC5A26F009CD791 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
5548BE791D0ACBB2005DDE81 /* libmbgl-loop-darwin.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-loop-darwin.a"; path = "cmake/Debug/libmbgl-loop-darwin.a"; sourceTree = "<group>"; };
5548BE7B1D0ACBBD005DDE81 /* libmbgl-loop-darwin.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmbgl-loop-darwin.a"; path = "cmake/Debug/libmbgl-loop-darwin.a"; sourceTree = "<group>"; };
@@ -155,6 +234,9 @@
55D9B4B01D005D3900C1CCE2 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
55FE0E8D1D100A0900FD240B /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = config.xcconfig; path = ../../build/macos/config.xcconfig; sourceTree = "<group>"; };
DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; };
DA2DBBC71D51E26600D38FF9 /* MGLStyleLayerTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLStyleLayerTests.h; path = ../darwin/test/MGLStyleLayerTests.h; sourceTree = SOURCE_ROOT; };
DA2DBBC81D51E26600D38FF9 /* MGLStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLStyleLayerTests.m; path = ../darwin/test/MGLStyleLayerTests.m; sourceTree = SOURCE_ROOT; };
DA2DBBCA1D51E30A00D38FF9 /* MGLStyleLayerTests.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MGLStyleLayerTests.xib; sourceTree = "<group>"; };
DA35A2A31CC9EB1A00E826B2 /* MGLCoordinateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCoordinateFormatter.h; sourceTree = "<group>"; };
DA35A2A51CC9EB2700E826B2 /* MGLCoordinateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLCoordinateFormatter.m; sourceTree = "<group>"; };
DA35A2A71CC9F41600E826B2 /* MGLCoordinateFormatterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLCoordinateFormatterTests.m; path = ../../darwin/test/MGLCoordinateFormatterTests.m; sourceTree = "<group>"; };
@@ -181,6 +263,41 @@
DA8933AC1CCD290700E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
DA8933B41CCD2C2500E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = "<group>"; };
DA8933B71CCD2C2D00E68420 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Foundation.stringsdict; sourceTree = "<group>"; };
DA8F25741D51C5F40010E6B5 /* MGLFillStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLFillStyleLayerTests.m; path = ../../darwin/test/MGLFillStyleLayerTests.m; sourceTree = "<group>"; };
DA8F25751D51C5F40010E6B5 /* MGLRasterStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLRasterStyleLayerTests.m; path = ../../darwin/test/MGLRasterStyleLayerTests.m; sourceTree = "<group>"; };
DA8F25761D51C5F40010E6B5 /* MGLSymbolStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLSymbolStyleLayerTests.m; path = ../../darwin/test/MGLSymbolStyleLayerTests.m; sourceTree = "<group>"; };
DA8F25771D51C5F40010E6B5 /* MGLLineStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLLineStyleLayerTests.m; path = ../../darwin/test/MGLLineStyleLayerTests.m; sourceTree = "<group>"; };
DA8F25781D51C5F40010E6B5 /* MGLCircleStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLCircleStyleLayerTests.m; path = ../../darwin/test/MGLCircleStyleLayerTests.m; sourceTree = "<group>"; };
DA8F25791D51C5F40010E6B5 /* MGLBackgroundStyleLayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLBackgroundStyleLayerTests.m; path = ../../darwin/test/MGLBackgroundStyleLayerTests.m; sourceTree = "<group>"; };
DA8F257A1D51C5F40010E6B5 /* MGLRuntimeStylingHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLRuntimeStylingHelper.h; path = ../../darwin/test/MGLRuntimeStylingHelper.h; sourceTree = "<group>"; };
DA8F257B1D51C5F40010E6B5 /* MGLRuntimeStylingHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MGLRuntimeStylingHelper.m; path = ../../darwin/test/MGLRuntimeStylingHelper.m; sourceTree = "<group>"; };
DA8F25851D51C9E10010E6B5 /* MGLBackgroundStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLBackgroundStyleLayer.h; sourceTree = "<group>"; };
DA8F25861D51C9E10010E6B5 /* MGLBackgroundStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLBackgroundStyleLayer.mm; sourceTree = "<group>"; };
DA8F25891D51CA540010E6B5 /* MGLLineStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLLineStyleLayer.h; sourceTree = "<group>"; };
DA8F258A1D51CA540010E6B5 /* MGLLineStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLLineStyleLayer.mm; sourceTree = "<group>"; };
DA8F258D1D51CA600010E6B5 /* MGLRasterStyleLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLRasterStyleLayer.h; sourceTree = "<group>"; };
DA8F258E1D51CA600010E6B5 /* MGLRasterStyleLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLRasterStyleLayer.mm; sourceTree = "<group>"; };
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.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLVectorSource.m; sourceTree = "<group>"; };
DA8F25991D51CAD00010E6B5 /* MGLSource_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLSource_Private.hpp; sourceTree = "<group>"; };
DA8F259B1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLStyleAttributeValue_Private.hpp; 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.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSNumber+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
DA8F25A01D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
DA8F25A11D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSArray+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
DA8F25A21D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSArray+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
DA8F25A31D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
DA8F25A41D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSString+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
DA8F25A51D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSString+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
DA8F25A61D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+MGLStyleAttributeAdditions.h"; sourceTree = "<group>"; };
DA8F25A71D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSValue+MGLStyleAttributeAdditions.mm"; sourceTree = "<group>"; };
DA8F25A81D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = "NSValue+MGLStyleAttributeAdditions_Private.hpp"; sourceTree = "<group>"; };
DA8F25B51D51D2240010E6B5 /* MGLRuntimeStylingTests.m.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLRuntimeStylingTests.m.ejs; sourceTree = "<group>"; };
DA8F25B61D51D2240010E6B5 /* MGLStyleLayer.h.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLStyleLayer.h.ejs; sourceTree = "<group>"; };
DA8F25B71D51D2240010E6B5 /* MGLStyleLayer.mm.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = MGLStyleLayer.mm.ejs; sourceTree = "<group>"; };
DAC2ABC41CC6D343006D18C4 /* MGLAnnotationImage_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationImage_Private.h; sourceTree = "<group>"; };
DACC22121CF3D3E200D220D9 /* MGLFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLFeature.h; sourceTree = "<group>"; };
DACC22131CF3D3E200D220D9 /* MGLFeature.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLFeature.mm; sourceTree = "<group>"; };
@@ -253,9 +370,9 @@
DAE6C3A91CC31EF300DB3429 /* MGLAttributionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAttributionButton.m; sourceTree = "<group>"; };
DAE6C3AA1CC31EF300DB3429 /* MGLCompassCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLCompassCell.h; sourceTree = "<group>"; };
DAE6C3AB1CC31EF300DB3429 /* MGLCompassCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLCompassCell.m; sourceTree = "<group>"; };
DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMapView_Private.h; sourceTree = "<group>"; };
DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MGLMapView_Private.hpp; sourceTree = "<group>"; };
DAE6C3AD1CC31EF300DB3429 /* MGLMapView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLMapView.mm; sourceTree = "<group>"; };
DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MGLMapView+IBAdditions.m"; sourceTree = "<group>"; };
DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MGLMapView+IBAdditions.mm"; sourceTree = "<group>"; };
DAE6C3AF1CC31EF300DB3429 /* MGLOpenGLLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLOpenGLLayer.h; sourceTree = "<group>"; };
DAE6C3B01CC31EF300DB3429 /* MGLOpenGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLOpenGLLayer.mm; sourceTree = "<group>"; };
DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = default_marker.pdf; sourceTree = "<group>"; };
@@ -302,6 +419,85 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
35136D471D42295400C20EFD /* Layers */ = {
isa = PBXGroup;
children = (
3538AA211D542685008EC33D /* MGLBaseStyleLayer.h */,
3538AA221D542685008EC33D /* MGLBaseStyleLayer.mm */,
DA8F25851D51C9E10010E6B5 /* MGLBackgroundStyleLayer.h */,
DA8F25861D51C9E10010E6B5 /* MGLBackgroundStyleLayer.mm */,
3527428B1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h */,
3527428C1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm */,
35602BF81D3EA99F0050646F /* MGLFillStyleLayer.h */,
35602BF91D3EA99F0050646F /* MGLFillStyleLayer.mm */,
DA8F25891D51CA540010E6B5 /* MGLLineStyleLayer.h */,
DA8F258A1D51CA540010E6B5 /* MGLLineStyleLayer.mm */,
DA8F258D1D51CA600010E6B5 /* MGLRasterStyleLayer.h */,
DA8F258E1D51CA600010E6B5 /* MGLRasterStyleLayer.mm */,
35602BFD1D3EA9B40050646F /* MGLStyleLayer.h */,
35602BFC1D3EA9B40050646F /* MGLStyleLayer_Private.hpp */,
35602BFE1D3EA9B40050646F /* MGLStyleLayer.mm */,
DA8F25911D51CA750010E6B5 /* MGLSymbolStyleLayer.h */,
DA8F25921D51CA750010E6B5 /* MGLSymbolStyleLayer.mm */,
);
name = Layers;
sourceTree = "<group>";
};
352742791D4C235C00A1ECE6 /* Categories */ = {
isa = PBXGroup;
children = (
DA8F25A21D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions_Private.hpp */,
DA8F25A01D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.h */,
DA8F25A11D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.mm */,
3593E52C1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.hpp */,
3527427A1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.h */,
3527427B1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.m */,
DA8F259F1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp */,
DA8F259D1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.h */,
DA8F259E1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.mm */,
DA8F25A51D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions_Private.hpp */,
DA8F25A31D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.h */,
DA8F25A41D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.mm */,
DA8F25A81D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions_Private.hpp */,
DA8F25A61D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.h */,
DA8F25A71D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.mm */,
);
name = Categories;
sourceTree = "<group>";
};
3527427E1D4C242B00A1ECE6 /* Sources */ = {
isa = PBXGroup;
children = (
3527427F1D4C243B00A1ECE6 /* MGLSource.h */,
DA8F25991D51CAD00010E6B5 /* MGLSource_Private.hpp */,
352742801D4C243B00A1ECE6 /* MGLSource.mm */,
DA8F25951D51CAC70010E6B5 /* MGLVectorSource.h */,
DA8F25961D51CAC70010E6B5 /* MGLVectorSource.m */,
352742871D4C245800A1ECE6 /* MGLGeoJSONSource.h */,
352742881D4C245800A1ECE6 /* MGLGeoJSONSource.mm */,
352742831D4C244700A1ECE6 /* MGLRasterSource.h */,
352742841D4C244700A1ECE6 /* MGLRasterSource.mm */,
);
name = Sources;
sourceTree = "<group>";
};
3527429B1D4C259500A1ECE6 /* Styling */ = {
isa = PBXGroup;
children = (
352742791D4C235C00A1ECE6 /* Categories */,
35136D471D42295400C20EFD /* Layers */,
3527427E1D4C242B00A1ECE6 /* Sources */,
3527429D1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.h */,
3527429C1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction_Private.hpp */,
3527429E1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.mm */,
3593E5281D52A628006D9365 /* MGLStyleAttribute.hpp */,
3593E5291D52A628006D9365 /* MGLStyleAttribute.mm */,
352742771D4C220900A1ECE6 /* MGLStyleAttributeValue.h */,
DA8F259B1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.hpp */,
);
name = Styling;
sourceTree = "<group>";
};
DA839E891CC2E3400062CAFB = {
isa = PBXGroup;
children = (
@@ -380,6 +576,44 @@
path = ../../darwin/resources;
sourceTree = "<group>";
};
DA8F257C1D51C5F40010E6B5 /* Layers */ = {
isa = PBXGroup;
children = (
DA2DBBC71D51E26600D38FF9 /* MGLStyleLayerTests.h */,
DA2DBBC81D51E26600D38FF9 /* MGLStyleLayerTests.m */,
DA8F25741D51C5F40010E6B5 /* MGLFillStyleLayerTests.m */,
DA8F25751D51C5F40010E6B5 /* MGLRasterStyleLayerTests.m */,
DA8F25761D51C5F40010E6B5 /* MGLSymbolStyleLayerTests.m */,
DA8F25771D51C5F40010E6B5 /* MGLLineStyleLayerTests.m */,
DA8F25781D51C5F40010E6B5 /* MGLCircleStyleLayerTests.m */,
DA8F25791D51C5F40010E6B5 /* MGLBackgroundStyleLayerTests.m */,
DA8F257A1D51C5F40010E6B5 /* MGLRuntimeStylingHelper.h */,
DA8F257B1D51C5F40010E6B5 /* MGLRuntimeStylingHelper.m */,
DA2DBBCA1D51E30A00D38FF9 /* MGLStyleLayerTests.xib */,
);
name = Layers;
sourceTree = "<group>";
};
DA8F257D1D51C5F40010E6B5 /* Styling */ = {
isa = PBXGroup;
children = (
DA8F257C1D51C5F40010E6B5 /* Layers */,
);
name = Styling;
path = ../../ios/test;
sourceTree = "<group>";
};
DA8F25B81D51D2280010E6B5 /* Foundation Templates */ = {
isa = PBXGroup;
children = (
DA8F25B51D51D2240010E6B5 /* MGLRuntimeStylingTests.m.ejs */,
DA8F25B61D51D2240010E6B5 /* MGLStyleLayer.h.ejs */,
DA8F25B71D51D2240010E6B5 /* MGLStyleLayer.mm.ejs */,
);
name = "Foundation Templates";
path = ../../darwin/src;
sourceTree = "<group>";
};
DAD1657C1CF4CE6B001FF4B9 /* Formatters */ = {
isa = PBXGroup;
children = (
@@ -474,6 +708,7 @@
children = (
DAE6C3C11CC31F4500DB3429 /* Mapbox.h */,
DAE6C3491CC31DF500DB3429 /* Foundation */,
DA8F25B81D51D2280010E6B5 /* Foundation Templates */,
DA8933B21CCD2C0700E68420 /* Foundation Resources */,
DAE6C39E1CC31E7C00DB3429 /* Kit */,
DA8933A81CCD28D100E68420 /* Kit Resources */,
@@ -486,6 +721,7 @@
DAE6C3371CC30DB200DB3429 /* SDK Tests */ = {
isa = PBXGroup;
children = (
DA8F257D1D51C5F40010E6B5 /* Styling */,
DA35A2C11CCA9F4A00E826B2 /* MGLClockDirectionFormatterTests.m */,
DA35A2B51CCA14D700E826B2 /* MGLCompassDirectionFormatterTests.m */,
DA35A2A71CC9F41600E826B2 /* MGLCoordinateFormatterTests.m */,
@@ -504,6 +740,7 @@
DAE6C3491CC31DF500DB3429 /* Foundation */ = {
isa = PBXGroup;
children = (
3527429B1D4C259500A1ECE6 /* Styling */,
DAD1657F1CF4CF50001FF4B9 /* Categories */,
DAD1657C1CF4CE6B001FF4B9 /* Formatters */,
DAD1657D1CF4CECB001FF4B9 /* Geometry */,
@@ -514,6 +751,7 @@
DAE6C34D1CC31E0400DB3429 /* MGLMapCamera.h */,
DAE6C36E1CC31E2A00DB3429 /* MGLMapCamera.mm */,
DAE6C3571CC31E0400DB3429 /* MGLStyle.h */,
3537CA731D3F93A600380318 /* MGLStyle_Private.hpp */,
DAE6C37A1CC31E2A00DB3429 /* MGLStyle.mm */,
DAE6C3591CC31E0400DB3429 /* MGLTypes.h */,
DAE6C37C1CC31E2A00DB3429 /* MGLTypes.m */,
@@ -533,13 +771,15 @@
DAE6C3AA1CC31EF300DB3429 /* MGLCompassCell.h */,
DAE6C3AB1CC31EF300DB3429 /* MGLCompassCell.m */,
DAE6C3A01CC31E9400DB3429 /* MGLMapView.h */,
DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.h */,
DAE6C3AC1CC31EF300DB3429 /* MGLMapView_Private.hpp */,
DAE6C3AD1CC31EF300DB3429 /* MGLMapView.mm */,
DAE6C3A11CC31E9400DB3429 /* MGLMapView+IBAdditions.h */,
DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.m */,
DAE6C3AE1CC31EF300DB3429 /* MGLMapView+IBAdditions.mm */,
DAE6C3A21CC31E9400DB3429 /* MGLMapViewDelegate.h */,
DAE6C3AF1CC31EF300DB3429 /* MGLOpenGLLayer.h */,
DAE6C3B01CC31EF300DB3429 /* MGLOpenGLLayer.mm */,
355BA4EB1D41633E00CCC6D5 /* NSColor+MGLAdditions.hpp */,
355BA4EC1D41633E00CCC6D5 /* NSColor+MGLAdditions.mm */,
);
name = Kit;
path = src;
@@ -560,48 +800,79 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3593E52D1D52A680006D9365 /* NSColor+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DA8F258F1D51CA600010E6B5 /* MGLRasterStyleLayer.h in Headers */,
DAE6C38D1CC31E2A00DB3429 /* MGLOfflineRegion_Private.h in Headers */,
DA8F25AB1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DA8F259C1D51CB000010E6B5 /* MGLStyleAttributeValue_Private.hpp in Headers */,
DA8F25B41D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DAE6C35B1CC31E0400DB3429 /* MGLAnnotation.h in Headers */,
DAE6C3B61CC31EF300DB3429 /* MGLMapView_Private.h in Headers */,
DAE6C3B61CC31EF300DB3429 /* MGLMapView_Private.hpp in Headers */,
3527428D1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h in Headers */,
DAE6C3B21CC31EF300DB3429 /* MGLAttributionButton.h in Headers */,
DAE6C3A31CC31E9400DB3429 /* MGLAnnotationImage.h in Headers */,
DAE6C3A41CC31E9400DB3429 /* MGLMapView.h in Headers */,
352742A01D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.h in Headers */,
355BA4ED1D41633E00CCC6D5 /* NSColor+MGLAdditions.hpp in Headers */,
DAE6C3611CC31E0400DB3429 /* MGLOfflineStorage.h in Headers */,
352742781D4C220900A1ECE6 /* MGLStyleAttributeValue.h in Headers */,
DAE6C35E1CC31E0400DB3429 /* MGLMultiPoint.h in Headers */,
35602BFF1D3EA9B40050646F /* MGLStyleLayer_Private.hpp in Headers */,
DAE6C3971CC31E2A00DB3429 /* NSBundle+MGLAdditions.h in Headers */,
DAD165741CF4CD7A001FF4B9 /* MGLShapeCollection.h in Headers */,
DA8F25AF1D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.h in Headers */,
DAE6C3631CC31E0400DB3429 /* MGLPointAnnotation.h in Headers */,
DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */,
DAE6C35F1CC31E0400DB3429 /* MGLOfflinePack.h in Headers */,
DAE6C39C1CC31E2A00DB3429 /* NSString+MGLAdditions.h in Headers */,
DA8F25971D51CAC70010E6B5 /* MGLVectorSource.h in Headers */,
DAE6C3861CC31E2A00DB3429 /* MGLGeometry_Private.h in Headers */,
DAE6C3841CC31E2A00DB3429 /* MGLAccountManager_Private.h in Headers */,
DAE6C3691CC31E0400DB3429 /* MGLTypes.h in Headers */,
DA8F25AE1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions_Private.hpp in Headers */,
DAE6C3991CC31E2A00DB3429 /* NSException+MGLAdditions.h in Headers */,
DA8F25871D51C9E10010E6B5 /* MGLBackgroundStyleLayer.h in Headers */,
DAE6C3661CC31E0400DB3429 /* MGLShape.h in Headers */,
352742811D4C243B00A1ECE6 /* MGLSource.h in Headers */,
DAE6C3C21CC31F4500DB3429 /* Mapbox.h in Headers */,
3527427C1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.h in Headers */,
DAE6C3641CC31E0400DB3429 /* MGLPolygon.h in Headers */,
DA35A2BF1CCA9B1A00E826B2 /* MGLClockDirectionFormatter.h in Headers */,
35602BFA1D3EA99F0050646F /* MGLFillStyleLayer.h in Headers */,
DA35A2A41CC9EB1A00E826B2 /* MGLCoordinateFormatter.h in Headers */,
DA8F25B11D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions_Private.hpp in Headers */,
3593E52A1D52A628006D9365 /* MGLStyleAttribute.hpp in Headers */,
DAE6C3621CC31E0400DB3429 /* MGLOverlay.h in Headers */,
DAE6C3651CC31E0400DB3429 /* MGLPolyline.h in Headers */,
DAE6C39A1CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.h in Headers */,
DA8F258B1D51CA540010E6B5 /* MGLLineStyleLayer.h in Headers */,
DA8F25B21D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.h in Headers */,
DAE6C38E1CC31E2A00DB3429 /* MGLOfflineStorage_Private.h in Headers */,
DAE6C3601CC31E0400DB3429 /* MGLOfflineRegion.h in Headers */,
DAE6C3681CC31E0400DB3429 /* MGLTilePyramidOfflineRegion.h in Headers */,
DA8F25AC1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.h in Headers */,
3527429F1D4C25BD00A1ECE6 /* MGLStyleAttributeFunction_Private.hpp in Headers */,
DA35A2CF1CCAAED300E826B2 /* NSValue+MGLAdditions.h in Headers */,
DAE6C3A61CC31E9400DB3429 /* MGLMapViewDelegate.h in Headers */,
DAE6C38B1CC31E2A00DB3429 /* MGLOfflinePack_Private.h in Headers */,
DACC22141CF3D3E200D220D9 /* MGLFeature.h in Headers */,
3538AA231D542685008EC33D /* MGLBaseStyleLayer.h in Headers */,
DAE6C35C1CC31E0400DB3429 /* MGLGeometry.h in Headers */,
DAE6C35A1CC31E0400DB3429 /* MGLAccountManager.h in Headers */,
35602C001D3EA9B40050646F /* MGLStyleLayer.h in Headers */,
DAE6C35D1CC31E0400DB3429 /* MGLMapCamera.h in Headers */,
DAE6C3B41CC31EF300DB3429 /* MGLCompassCell.h in Headers */,
DA8F25A91D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.h in Headers */,
3537CA741D3F93A600380318 /* MGLStyle_Private.hpp in Headers */,
DA8F259A1D51CAD00010E6B5 /* MGLSource_Private.hpp in Headers */,
DA8F25931D51CA750010E6B5 /* MGLSymbolStyleLayer.h in Headers */,
DAE6C3B91CC31EF300DB3429 /* MGLOpenGLLayer.h in Headers */,
DAE6C3891CC31E2A00DB3429 /* MGLMultiPoint_Private.h in Headers */,
DAE6C3A51CC31E9400DB3429 /* MGLMapView+IBAdditions.h in Headers */,
DA35A2AD1CCA091800E826B2 /* MGLCompassDirectionFormatter.h in Headers */,
352742851D4C244700A1ECE6 /* MGLRasterSource.h in Headers */,
DACC22181CF3D4F700D220D9 /* MGLFeature_Private.h in Headers */,
352742891D4C245800A1ECE6 /* MGLGeoJSONSource.h in Headers */,
DAE6C3671CC31E0400DB3429 /* MGLStyle.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -756,6 +1027,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DA2DBBCB1D51E30A00D38FF9 /* MGLStyleLayerTests.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -782,32 +1054,52 @@
files = (
DAE6C3901CC31E2A00DB3429 /* MGLPointAnnotation.m in Sources */,
DAE6C3981CC31E2A00DB3429 /* NSBundle+MGLAdditions.m in Sources */,
DA8F25AA1D51CB270010E6B5 /* NSNumber+MGLStyleAttributeAdditions.mm in Sources */,
DAE6C3B71CC31EF300DB3429 /* MGLMapView.mm in Sources */,
DAE6C38C1CC31E2A00DB3429 /* MGLOfflinePack.mm in Sources */,
DAE6C3B11CC31EF300DB3429 /* MGLAnnotationImage.m in Sources */,
DACC22151CF3D3E200D220D9 /* MGLFeature.mm in Sources */,
355BA4EE1D41633E00CCC6D5 /* NSColor+MGLAdditions.mm in Sources */,
DAE6C3B31CC31EF300DB3429 /* MGLAttributionButton.m in Sources */,
35602BFB1D3EA99F0050646F /* MGLFillStyleLayer.mm in Sources */,
DAE6C3931CC31E2A00DB3429 /* MGLShape.m in Sources */,
352742861D4C244700A1ECE6 /* MGLRasterSource.mm in Sources */,
DAE6C39D1CC31E2A00DB3429 /* NSString+MGLAdditions.m in Sources */,
DAE6C3941CC31E2A00DB3429 /* MGLStyle.mm in Sources */,
DAE6C3871CC31E2A00DB3429 /* MGLGeometry.mm in Sources */,
DAE6C3B81CC31EF300DB3429 /* MGLMapView+IBAdditions.m in Sources */,
3527428E1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm in Sources */,
35602C011D3EA9B40050646F /* MGLStyleLayer.mm in Sources */,
3527427D1D4C238F00A1ECE6 /* NSColor+MGLStyleAttributeAdditions.m in Sources */,
DA8F25881D51C9E10010E6B5 /* MGLBackgroundStyleLayer.mm in Sources */,
DAE6C3B81CC31EF300DB3429 /* MGLMapView+IBAdditions.mm in Sources */,
DA35A2D01CCAAED300E826B2 /* NSValue+MGLAdditions.m in Sources */,
3538AA241D542685008EC33D /* MGLBaseStyleLayer.mm in Sources */,
DA35A2C01CCA9B1A00E826B2 /* MGLClockDirectionFormatter.m in Sources */,
DAE6C3BA1CC31EF300DB3429 /* MGLOpenGLLayer.mm in Sources */,
DAE6C38A1CC31E2A00DB3429 /* MGLMultiPoint.mm in Sources */,
DAE6C3961CC31E2A00DB3429 /* MGLTypes.m in Sources */,
DA35A2A61CC9EB2700E826B2 /* MGLCoordinateFormatter.m in Sources */,
352742821D4C243B00A1ECE6 /* MGLSource.mm in Sources */,
DAE6C3881CC31E2A00DB3429 /* MGLMapCamera.mm in Sources */,
DA8F25B31D51CB270010E6B5 /* NSValue+MGLStyleAttributeAdditions.mm in Sources */,
DAE6C3911CC31E2A00DB3429 /* MGLPolygon.mm in Sources */,
DAE6C39B1CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.m in Sources */,
DAE6C38F1CC31E2A00DB3429 /* MGLOfflineStorage.mm in Sources */,
DAE6C3951CC31E2A00DB3429 /* MGLTilePyramidOfflineRegion.mm in Sources */,
3593E52B1D52A628006D9365 /* MGLStyleAttribute.mm in Sources */,
DAE6C3851CC31E2A00DB3429 /* MGLAccountManager.m in Sources */,
DA8F25B01D51CB270010E6B5 /* NSString+MGLStyleAttributeAdditions.mm in Sources */,
DAE6C3921CC31E2A00DB3429 /* MGLPolyline.mm in Sources */,
3527428A1D4C245800A1ECE6 /* MGLGeoJSONSource.mm in Sources */,
DAE6C3B51CC31EF300DB3429 /* MGLCompassCell.m in Sources */,
DA8F25901D51CA600010E6B5 /* MGLRasterStyleLayer.mm in Sources */,
DAD165751CF4CD7A001FF4B9 /* MGLShapeCollection.m in Sources */,
DA35A2AE1CCA091800E826B2 /* MGLCompassDirectionFormatter.m in Sources */,
DA8F258C1D51CA540010E6B5 /* MGLLineStyleLayer.mm in Sources */,
DA8F25AD1D51CB270010E6B5 /* NSArray+MGLStyleAttributeAdditions.mm in Sources */,
DA8F25941D51CA750010E6B5 /* MGLSymbolStyleLayer.mm in Sources */,
DA8F25981D51CAC70010E6B5 /* MGLVectorSource.m in Sources */,
352742A11D4C25BD00A1ECE6 /* MGLStyleAttributeFunction.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -1,6 +1,6 @@
#import "MGLMapView+IBAdditions.h"
#import "MGLMapView_Private.h"
#import "MGLMapView_Private.hpp"
@implementation MGLMapView (IBAdditions)

View File

@@ -35,6 +35,7 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) {
@class MGLAnnotationImage;
@class MGLMapCamera;
@class MGLStyle;
@protocol MGLAnnotation;
@protocol MGLMapViewDelegate;
@@ -931,6 +932,10 @@ IB_DESIGNABLE
*/
@property (nonatomic) MGLMapDebugMaskOptions debugMask;
#pragma mark Runtime styling API
- (MGLStyle *)style;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,4 +1,4 @@
#import "MGLMapView_Private.h"
#import "MGLMapView_Private.hpp"
#import "MGLAnnotationImage_Private.h"
#import "MGLAttributionButton.h"
#import "MGLCompassCell.h"
@@ -9,6 +9,7 @@
#import "MGLGeometry_Private.h"
#import "MGLMultiPoint_Private.h"
#import "MGLOfflineStorage_Private.h"
#import "MGLStyle_Private.hpp"
#import "MGLAccountManager.h"
#import "MGLMapCamera.h"
@@ -36,6 +37,7 @@
#import "NSProcessInfo+MGLAdditions.h"
#import "NSException+MGLAdditions.h"
#import "NSString+MGLAdditions.h"
#import "NSColor+MGLAdditions.hpp"
#import <QuartzCore/QuartzCore.h>
@@ -123,16 +125,6 @@ mbgl::util::UnitBezier MGLUnitBezierForMediaTimingFunction(CAMediaTimingFunction
return { p1[0], p1[1], p2[0], p2[1] };
}
/// Converts the given color into an mbgl::Color in calibrated RGB space.
mbgl::Color MGLColorObjectFromNSColor(NSColor *color) {
if (!color) {
return { 0, 0, 0, 0 };
}
CGFloat r, g, b, a;
[[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&r green:&g blue:&b alpha:&a];
return { (float)r, (float)g, (float)b, (float)a };
}
/// Lightweight container for metadata about an annotation, including the annotation itself.
class MGLAnnotationContext {
public:
@@ -2127,6 +2119,20 @@ public:
}
}
#pragma mark - Runtime styling
- (MGLStyle *)style
{
MGLStyle *style = [[MGLStyle alloc] init];
style.mapView = self;
return style;
}
- (mbgl::Map *)mbglMap
{
return _mbglMap;
}
#pragma mark MGLMultiPointDelegate methods
- (double)alphaForShapeAnnotation:(MGLShape *)annotation {
@@ -2140,14 +2146,14 @@ public:
NSColor *color = (_delegateHasStrokeColorsForShapeAnnotations
? [self.delegate mapView:self strokeColorForShapeAnnotation:annotation]
: [NSColor selectedMenuItemColor]);
return MGLColorObjectFromNSColor(color);
return color.mbgl_color;
}
- (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation {
NSColor *color = (_delegateHasFillColorsForShapeAnnotations
? [self.delegate mapView:self fillColorForPolygonAnnotation:annotation]
: [NSColor selectedMenuItemColor]);
return MGLColorObjectFromNSColor(color);
return color.mbgl_color;
}
- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation {

View File

@@ -1,5 +1,7 @@
#import "MGLMapView.h"
#import <mbgl/mbgl.hpp>
@interface MGLMapView (Private)
/// True if the view or application is in a state where it is not expected to be
@@ -20,4 +22,6 @@
/// Synchronously render a frame of the map.
- (void)renderSync;
- (mbgl::Map *)mbglMap;
@end

View File

@@ -1,6 +1,6 @@
#import "MGLOpenGLLayer.h"
#import "MGLMapView_Private.h"
#import "MGLMapView_Private.hpp"
#import <mbgl/gl/gl.hpp>

View File

@@ -29,6 +29,25 @@ FOUNDATION_EXPORT const unsigned char MapboxVersionString[];
#import "MGLShape.h"
#import "MGLShapeCollection.h"
#import "MGLStyle.h"
#import "MGLStyleLayer.h"
#import "MGLBaseStyleLayer.h"
#import "MGLFillStyleLayer.h"
#import "MGLLineStyleLayer.h"
#import "MGLSymbolStyleLayer.h"
#import "MGLRasterStyleLayer.h"
#import "MGLCircleStyleLayer.h"
#import "MGLBackgroundStyleLayer.h"
#import "MGLSource.h"
#import "MGLVectorSource.h"
#import "MGLGeoJSONSource.h"
#import "MGLRasterSource.h"
#import "MGLTilePyramidOfflineRegion.h"
#import "MGLTypes.h"
#import "NSValue+MGLAdditions.h"
#import "MGLStyleAttributeValue.h"
#import "MGLStyleAttributeFunction.h"
#import "NSColor+MGLStyleAttributeAdditions.h"
#import "NSNumber+MGLStyleAttributeAdditions.h"
#import "NSValue+MGLStyleAttributeAdditions.h"
#import "NSString+MGLStyleAttributeAdditions.h"
#import "NSArray+MGLStyleAttributeAdditions.h"

View File

@@ -0,0 +1,20 @@
#import <Cocoa/Cocoa.h>
#include <mbgl/util/color.hpp>
#include <mbgl/style/property_value.hpp>
@interface NSColor (MGLAdditions)
/**
Converts the color into an mbgl::Color in calibrated RGB space.
*/
- (mbgl::Color)mbgl_color;
/**
Instantiates `NSColor` from an `mbgl::Color`
*/
+ (NSColor *)mbgl_colorWithColor:(mbgl::Color)color;
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue;
@end

View File

@@ -0,0 +1,29 @@
#import "NSColor+MGLAdditions.hpp"
@implementation NSColor (MGLAdditions)
- (mbgl::Color)mbgl_color
{
if (!self)
{
return { 0, 0, 0, 0 };
}
CGFloat r, g, b, a;
[[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&r green:&g blue:&b alpha:&a];
return { (float)r, (float)g, (float)b, (float)a };
}
+ (NSColor *)mbgl_colorWithColor:(mbgl::Color)color
{
return [NSColor colorWithRed:color.r green:color.g blue:color.b alpha:color.a];
}
- (mbgl::style::PropertyValue<mbgl::Color>)mbgl_colorPropertyValue
{
mbgl::Color color = self.mbgl_color;
return {{ color.r, color.g, color.b, color.a }};
}
@end