[ios, macos] Deleted iOS/macOS map SDK sources, resources, scripts

This commit is contained in:
Minh Nguyễn
2020-02-27 13:09:39 -08:00
parent bd252e16a3
commit 206b9bde5e
853 changed files with 0 additions and 306895 deletions

6
.gitmodules vendored
View File

@@ -1,9 +1,6 @@
[submodule "mapbox-gl-js"]
path = mapbox-gl-js
url = https://github.com/mapbox/mapbox-gl-js.git
[submodule "platform/ios/vendor/mapbox-events-ios"]
path = platform/ios/vendor/mapbox-events-ios
url = https://github.com/mapbox/mapbox-events-ios.git
[submodule "vendor/nunicode"]
path = vendor/nunicode
url = https://bitbucket.org/alekseyt/nunicode.git
@@ -55,9 +52,6 @@
[submodule "platform/android/vendor/mapbox-events-android"]
path = platform/android/vendor/mapbox-events-android
url = https://github.com/mapbox/mapbox-events-android.git
[submodule "platform/darwin/docs/theme"]
path = platform/darwin/docs/theme
url = https://github.com/mapbox/jazzy-theme.git
[submodule "vendor/mapbox-base"]
path = vendor/mapbox-base
url = https://github.com/mapbox/mapbox-base.git

View File

@@ -225,12 +225,6 @@ commands:
command: |
brew install cmake ccache glfw ninja pkgconfig qt chargepoint/xcparse/xcparse
brew cask install google-cloud-sdk
- run:
name: Code Generators macOS
command: |
platform/darwin/scripts/generate-style-code.js
platform/darwin/scripts/update-examples.js
git add -A && git diff --staged --exit-code | tee nitpick.patch
config:
parameters:
config_params:

View File

@@ -1,5 +0,0 @@
#import <Mapbox/Mapbox.h>
@interface LimeGreenStyleLayer : MGLOpenGLStyleLayer
@end

View File

@@ -1,58 +0,0 @@
#import "LimeGreenStyleLayer.h"
@import GLKit;
@implementation LimeGreenStyleLayer {
GLuint _program;
GLuint _vertexShader;
GLuint _fragmentShader;
GLuint _buffer;
GLuint _aPos;
}
- (void)didMoveToMapView:(MGLMapView *)mapView {
static const GLchar *vertexShaderSource = "attribute vec2 a_pos; void main() { gl_Position = vec4(a_pos, 1, 1); }";
static const GLchar *fragmentShaderSource = "void main() { gl_FragColor = vec4(0, 0.5, 0, 0.5); }";
_program = glCreateProgram();
_vertexShader = glCreateShader(GL_VERTEX_SHADER);
_fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(_vertexShader, 1, &vertexShaderSource, NULL);
glCompileShader(_vertexShader);
glAttachShader(_program, _vertexShader);
glShaderSource(_fragmentShader, 1, &fragmentShaderSource, NULL);
glCompileShader(_fragmentShader);
glAttachShader(_program, _fragmentShader);
glLinkProgram(_program);
_aPos = glGetAttribLocation(_program, "a_pos");
GLfloat triangle[] = { 0, 0.5, 0.5, -0.5, -0.5, -0.5 };
glGenBuffers(1, &_buffer);
glBindBuffer(GL_ARRAY_BUFFER, _buffer);
glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(GLfloat), triangle, GL_STATIC_DRAW);
}
- (void)drawInMapView:(MGLMapView *)mapView withContext:(MGLStyleLayerDrawingContext)context {
glUseProgram(_program);
glBindBuffer(GL_ARRAY_BUFFER, _buffer);
glEnableVertexAttribArray(_aPos);
glVertexAttribPointer(_aPos, 2, GL_FLOAT, GL_FALSE, 0, NULL);
glDisable(GL_STENCIL_TEST);
glDisable(GL_DEPTH_TEST);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
}
- (void)willMoveFromMapView:(MGLMapView *)mapView {
if (!_program) {
return;
}
glDeleteBuffers(1, &_buffer);
glDetachShader(_program, _vertexShader);
glDetachShader(_program, _fragmentShader);
glDeleteShader(_vertexShader);
glDeleteShader(_fragmentShader);
glDeleteProgram(_program);
}
@end

View File

@@ -1,446 +0,0 @@
<%
const os = locals.os;
const iOS = os === 'iOS';
const macOS = os === 'macOS';
const cocoaPrefix = iOS ? 'UI' : 'NS';
const layers = locals.layers;
const renamedProperties = locals.renamedProperties;
-%>
<!--
This file is generated.
Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
-->
# Information for Style Authors
A _style_ defines a map view’s content and appearance. If you’ve authored a
style using
[Mapbox Studio’s Styles editor](https://www.mapbox.com/studio/styles/) or as
JSON in a text editor, you can use that style in this SDK and manipulate it
afterwards in code. This document provides information you can use to ensure a
seamless transition from Mapbox Studio to your application.
<% if (iOS) { -%>
## Designing for iOS
<% } else { -%>
## Designing for macOS
<% } -%>
When designing your style, consider the context in which your application shows
the style. There are a number of considerations specific to <%- os %> that may
not be obvious when designing your style in Mapbox Studio on the Web. A map view
is essentially a graphical user interface element, so many of same issues in
user interface design also apply when designing a map style.
### Color
Ensure sufficient contrast in your application’s user interface when your map
style is present. Standard user interface elements such as toolbars, sidebars,
and sheets often overlap the map view with a translucent, blurred background, so
make sure the contents of these elements remain legible with the map view
underneath.
<% if (iOS) { -%>
The user location annotation view, the attribution button, any buttons in
callout views, and any items in the navigation bar are influenced by your
application’s tint color, so choose a tint color that contrasts well with your
map style.
<% } -%>
If you intend your style to be used in the dark, consider the impact that Night
Shift may have on your style’s colors.
### Typography and graphics
<% if (iOS) { -%>
Choose font and icon sizes appropriate to iOS devices. iPhones and iPads have
smaller screens than the typical browser window in which you would use Mapbox
Studio, especially when multitasking is enabled. Your user’s viewing distance
may be shorter than on a desktop computer. Some of your users may use the Larger
Dynamic Type and Accessibility Text features to increase the size of all text on
the device. You can use the
[runtime styling API](#manipulating-the-style-at-runtime) to adjust your style’s
font and icon sizes accordingly.
<% } -%>
Design sprite images and choose font weights that look crisp on both
standard-resolution displays and Retina displays. This SDK supports the same
resolutions as <%- os %>.
<% if (iOS) { -%>
Standard-resolution displays are limited to older devices that your application
may or may not support, depending on its minimum deployment target.
<% } else { -%>
Standard-resolution displays are often found on external monitors. Even with
built-in screens, some of your users may use the Larger Text option in Display
Preferences, which is essentially standard resolution, to make text easier to
read.
<% } -%>
Icon and text labels should be legible regardless of the map’s orientation.
<% if (iOS) { -%>
By default, this SDK makes it easy for your users to rotate or tilt the map
using multitouch gestures.
<% } else { -%>
By default, this SDK makes it easy for your users to rotate or tilt the map
using multitouch trackpad gestures or keyboard shortcuts.
<% } -%>
If you do not intend your design to accommodate rotation and tilting, disable
these gestures using the `MGLMapView.rotateEnabled` and
`MGLMapView.pitchEnabled` properties, respectively, or the corresponding
inspectables in Interface Builder.
### Interactivity
Pay attention to whether elements of your style appear to be interactive.
<% if (iOS) { -%>
A text label may look like a tappable button merely due to matching your
application’s tint color or the default blue tint color.
<% } else { -%>
An icon with a shadow or shading effect may appear to be clickable.
<% } -%>
You can make an icon or text label interactive by installing a gesture
recognizer and performing feature querying (e.g.,
`-[MGLMapView visibleFeaturesAtPoint:]`) to get details about the selected
feature.
<% if (macOS) { -%>
You can install cursor or tooltip tracking rectangles to indicate interactive
features as an alternative to prominent hover effects.
<% } -%>
<% if (iOS) { -%>
Make sure your users can easily distinguish any interactive elements from the
surrounding map, such as pins, the user location annotation view, or a route
line. Avoid relying on hover effects to indicate interactive elements. Leave
enough room between interactive elements to accommodate imprecise tapping
gestures.
<% } else { -%>
Make sure your users can easily distinguish any interactive elements from the
surrounding map, such as pins or a route line. If your application supports
printing, consider using the
[runtime styling API](#manipulating-the-style-at-runtime) to optimize your style
for ink economy before printing the map view.
<% } -%>
<% if (iOS) { -%>
For more information about user interface design, consult Apple’s
[_iOS Human Interface Guidelines_](https://developer.apple.com/ios/human-interface-guidelines/).
To learn more about designing maps for mobile devices, see [Nathaniel Slaughter's blog post](https://www.mapbox.com/blog/designing-maps-for-mobile-devices/) on
the subject.
<% } else { -%>
For more information about user interface design, consult Apple’s
[_macOS Human Interface Guidelines_](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/OSXHIGuidelines/).
<% } -%>
## Applying your style
You set an `MGLMapView` object’s style either in code, by setting the
`MGLMapView.styleURL` property, or in Interface Builder, by setting the “Style
URL” inspectable. The URL must point to a local or remote style JSON file. The
style JSON file format is defined by the
[Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/). This
SDK supports the functionality defined by version 8 of the specification unless
otherwise noted in the
[style specification documentation](https://www.mapbox.com/mapbox-gl-style-spec/).
## Manipulating the style at runtime
The _runtime styling API_ enables you to modify every aspect of a style
dynamically as a user interacts with your application. The style itself is
represented at runtime by an `MGLStyle` object, which provides access to various
`MGLSource` and `MGLStyleLayer` objects that represent content sources and style
layers, respectively.
<% if (iOS) { -%>
For more information about the capabilities exposed by the runtime styling API,
see “[Runtime Styling](https://www.mapbox.com/ios-sdk/maps/overview/runtime-styling/)”.
<% } -%>
The names of runtime styling classes and properties on <%- os %> are generally
consistent with the style specification and Mapbox Studio’s Styles editor. Any
exceptions are listed in this document.
To avoid conflicts with Objective-C keywords or Cocoa terminology, this SDK uses
the following terms for concepts defined in the style specification:
In the style specification | In the SDK
---------------------------|---------
bounds | coordinate bounds
filter | predicate
function type | interpolation mode
id | identifier
image | style image
layer | style layer
property | attribute
SDF icon | template image
source | content source
## Specifying the map’s content
Each source defined by a style JSON file is represented at runtime by a content
source object that you can use to initialize new style layers. The content
source object is a member of one of the following subclasses of `MGLSource`:
In style JSON | In the SDK
--------------|-----------
`vector` | `MGLVectorTileSource`
`raster` | `MGLRasterTileSource`
`raster-dem` | `MGLRasterDEMSource`
`geojson` | `MGLShapeSource`
`image` | `MGLImageSource`
`canvas` and `video` sources are not supported.
### Tile sources
Raster and vector tile sources may be defined in TileJSON configuration files.
This SDK supports the properties defined in the style specification, which are a
subset of the keys defined in version 2.1.0 of the
[TileJSON](https://github.com/mapbox/tilejson-spec/tree/master/2.1.0)
specification. As an alternative to authoring a custom TileJSON file, you may
supply various tile source options when creating a raster or vector tile source.
These options are detailed in the `MGLTileSourceOption` documentation:
In style JSON | In TileJSON | In the SDK
--------------|---------------|-----------
`url` | — | `configurationURL` parameter in `-[MGLTileSource initWithIdentifier:configurationURL:]`
`tiles` | `tiles` | `tileURLTemplates` parameter in `-[MGLTileSource initWithIdentifier:tileURLTemplates:options:]`
`minzoom` | `minzoom` | `MGLTileSourceOptionMinimumZoomLevel`
`maxzoom` | `maxzoom` | `MGLTileSourceOptionMaximumZoomLevel`
`bounds` | `bounds` | `MGLTileSourceOptionCoordinateBounds`
`tileSize` | — | `MGLTileSourceOptionTileSize`
`attribution` | `attribution` | `MGLTileSourceOptionAttributionHTMLString` (but consider specifying `MGLTileSourceOptionAttributionInfos` instead for improved security)
`scheme` | `scheme` | `MGLTileSourceOptionTileCoordinateSystem`
`encoding` | – | `MGLTileSourceOptionDEMEncoding`
### Shape sources
Shape sources also accept various options. These options are detailed in the
`MGLShapeSourceOption` documentation:
In style JSON | In the SDK
-----------------|-----------
`data` | `url` parameter in `-[MGLShapeSource initWithIdentifier:URL:options:]`
`maxzoom` | `MGLShapeSourceOptionMaximumZoomLevel`
`buffer` | `MGLShapeSourceOptionBuffer`
`tolerance` | `MGLShapeSourceOptionSimplificationTolerance`
`cluster` | `MGLShapeSourceOptionClustered`
`clusterRadius` | `MGLShapeSourceOptionClusterRadius`
`clusterMaxZoom` | `MGLShapeSourceOptionMaximumZoomLevelForClustering`
`lineMetrics` | `MGLShapeSourceOptionLineDistanceMetrics`
To create a shape source from local GeoJSON data, first
[convert the GeoJSON data into a shape](working-with-geojson-data.html#converting-geojson-data-into-shape-objects),
then use the `-[MGLShapeSource initWithIdentifier:shape:options:]` method.
### Image sources
Image sources accept a non-axis aligned quadrilateral as their geographic coordinates.
These coordinates, in `MGLCoordinateQuad`, are described in counterclockwise order,
in contrast to the clockwise order defined in the style specification.
## Configuring the map content’s appearance
Each layer defined by the style JSON file is represented at runtime by a style
layer object, which you can use to refine the map’s appearance. The style layer
object is a member of one of the following subclasses of `MGLStyleLayer`:
In style JSON | In the SDK
--------------|-----------
<% for (const layer of layers) { -%>
`<%- layer.type %>` | `MGL<%- camelize(layer.type) %>StyleLayer`
<% } -%>
You configure layout and paint attributes by setting properties on these style
layer objects. The property names generally correspond to the style JSON
properties, except for the use of camelCase instead of kebab-case. Properties
whose names differ from the style specification are listed below:
<% for (const type in renamedProperties) { -%>
<% if (renamedProperties.hasOwnProperty(type)) { -%>
### <%- camelize(unhyphenate(type)) %> style layers
In style JSON | In Objective-C | In Swift
--------------|----------------|---------
<% for (const name in renamedProperties[type]) { -%>
<% if (renamedProperties[type].hasOwnProperty(name)) { -%>
`<%- originalPropertyName(renamedProperties[type][name]) %>` | `MGL<%- camelize(type) %>StyleLayer.<%- objCName(renamedProperties[type][name]) %>` | `MGL<%- camelize(type) %>StyleLayer.<%- objCGetter(renamedProperties[type][name]) %>`
<% } -%>
<% } -%>
<% } -%>
<% } -%>
## Setting attribute values
Each property representing a layout or paint attribute is set to an
`NSExpression` object. `NSExpression` objects play the same role as
[expressions in the Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions),
but you create the former using a very different syntax. `NSExpression`’s format
string syntax is reminiscent of a spreadsheet formula or an expression in a
database query. See the
“[Predicates and Expressions](predicates-and-expressions.html)” guide for an
overview of the expression support in this SDK. This SDK no longer supports
style functions; use expressions instead.
### Constant values in expressions
In contrast to the JSON type that the style specification defines for each
layout or paint property, the style value object often contains a more specific
Foundation or Cocoa type. General rules for attribute types are listed below.
Pay close attention to the SDK documentation for the attribute you want to get
or set.
In style JSON | In Objective-C | In Swift
--------------|-----------------------|---------
Color | `<%- cocoaPrefix %>Color` | `<%- cocoaPrefix %>Color`
Enum | `NSString` | `String`
String | `NSString` | `String`
Boolean | `NSNumber.boolValue` | `NSNumber.boolValue`
Number | `NSNumber.floatValue` | `NSNumber.floatValue`
Array (`-dasharray`) | `NSArray<NSNumber>` | `[Float]`
Array (`-font`) | `NSArray<NSString>` | `[String]`
<% if (iOS) { -%>
Array (`-offset`, `-translate`) | `NSValue.CGVectorValue` | `NSValue.cgVectorValue`
Array (`-padding`) | `NSValue.UIEdgeInsetsValue` | `NSValue.uiEdgeInsetsValue`
<% } else { -%>
Array (`-offset`, `-translate`) | `NSValue` containing `CGVector` | `NSValue` containing `CGVector`
Array (`-padding`) | `NSValue.edgeInsetsValue` | `NSValue.edgeInsetsValue`
<% } -%>
For padding attributes, note that the arguments to
<% if (iOS) { -%>
`UIEdgeInsetsMake()` in Objective-C and `UIEdgeInsets(top:left:bottom:right:)`
in Swift
<% } else { -%>
`NSEdgeInsetsMake()` in Objective-C and `EdgeInsets(top:left:bottom:right:)` in
Swift
<% } -%>
are specified in counterclockwise order, in contrast to the clockwise order
defined by the style specification.
<% if (macOS) { -%>
Additionally, on macOS, a screen coordinate of (0, 0) is located at the
lower-left corner of the screen. Therefore, a positive `CGVector.dy` means an
offset or translation upward, while a negative `CGVector.dy` means an offset or
translation downward. This is the reverse of how `CGVector` is interpreted on
iOS.
<% } -%>
### Expression operators
Many expression operators defined in the style specification have corresponding
symbols to be used with the `+[NSExpression expressionWithFormat:]`,
`+[NSExpression expressionForFunction:arguments:]`, or
`+[NSExpression expressionForFunction:selectorName:arguments:]` method:
In style specification | Method, function, or predicate type | Format string syntax
-----------------------|-------------------------------------|---------------------
`array` | |
`boolean` | |
`collator` | `NSComparisonPredicateOptions` | `'Québec' =[cd] 'QUEBEC'`
`literal` | `+[NSExpression expressionForConstantValue:]` | `%@` representing `NSArray` or `NSDictionary`
`number` | |
`string` | |
`to-boolean` | `boolValue` |
`to-color` | | `CAST(var, '<%- cocoaPrefix %>Color')`
`to-number` | `mgl_numberWithFallbackValues:` | `CAST(zipCode, 'NSNumber')`
`to-string` | `stringValue` | `CAST(ele, 'NSString')`
`typeof` | |
`geometry-type` | `NSExpression.geometryTypeVariableExpression` | `$geometryType`
`id` | `NSExpression.featureIdentifierVariableExpression` | `$featureIdentifier`
`properties` | `NSExpression.featureAttributesVariableExpression` | `$featureAttributes`
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
`length` | `count:` | `count({1, 2, 2, 3, 4, 7, 9})`
`!` | `NSNotPredicateType` | `NOT (p0 OR … OR pn)`
`!=` | `NSNotEqualToPredicateOperatorType` | `key != value`
`<` | `NSLessThanPredicateOperatorType` | `key < value`
`<=` | `NSLessThanOrEqualToPredicateOperatorType` | `key <= value`
`==` | `NSEqualToPredicateOperatorType` | `key == value`
`>` | `NSGreaterThanPredicateOperatorType` | `key > value`
`>=` | `NSGreaterThanOrEqualToPredicateOperatorType` | `key >= value`
`all` | `NSAndPredicateType` | `p0 AND … AND pn`
`any` | `NSOrPredicateType` | `p0 OR … OR pn`
`case` | `+[NSExpression expressionForConditional:trueExpression:falseExpression:]` or `MGL_IF` or `+[NSExpression mgl_expressionForConditional:trueExpression:falseExpresssion:]` | `TERNARY(1 = 2, YES, NO)` or `MGL_IF(1 = 2, YES, 2 = 2, YES, NO)`
`coalesce` | `mgl_coalesce:` | `mgl_coalesce({x, y, z})`
`match` | `MGL_MATCH` or `+[NSExpression mgl_expressionForMatchingExpression:inDictionary:defaultExpression:]` | `MGL_MATCH(x, 0, 'zero match', 1, 'one match', 'two match', 'default')`
`interpolate` | `mgl_interpolate:withCurveType:parameters:stops:` or `+[NSExpression mgl_expressionForInterpolatingExpression:withCurveType:parameters:stops:]` |
`step` | `mgl_step:from:stops:` or `+[NSExpression mgl_expressionForSteppingExpression:fromExpression:stops:]` |
`let` | `mgl_expressionWithContext:` | `MGL_LET('ios', 11, 'macos', 10.13, $ios + $macos)`
`var` | `+[NSExpression expressionForVariable:]` | `$variable`
`concat` | `mgl_join:` or `-[NSExpression mgl_expressionByAppendingExpression:]` | `mgl_join({'Old', ' ', 'MacDonald'})`
`downcase` | `lowercase:` | `lowercase('DOWNTOWN')`
`upcase` | `uppercase:` | `uppercase('Elysian Fields')`
<% if (macOS) { -%>
`rgb` | `+[NSColor colorWithCalibratedRed:green:blue:alpha:]` |
`rgba` | `+[NSColor colorWithCalibratedRed:green:blue:alpha:]` |
<% } else { -%>
`rgb` | `+[UIColor colorWithRed:green:blue:alpha:]` |
`rgba` | `+[UIColor colorWithRed:green:blue:alpha:]` |
<% } -%>
`to-rgba` | | `CAST(noindex(var), 'NSArray')`
`-` | `from:subtract:` | `2 - 1`
`*` | `multiply:by:` | `1 * 2`
`/` | `divide:by:` | `1 / 2`
`%` | `modulus:by:` |
`^` | `raise:toPower:` | `2 ** 2`
`+` | `add:to:` | `1 + 2`
`abs` | `abs:` | `abs(-1)`
`acos` | `mgl_acos:` | `mgl_acos(1)`
`asin` | `mgl_asin:` | `mgl_asin(0)`
`atan` | `mgl_atan:` | `mgl_atan(20)`
`ceil` | `ceiling:` | `ceiling(0.99999)`
`cos` | `mgl_cos:` | `mgl_cos(0)`
`e` | | `%@` representing `NSNumber` containing `M_E`
`floor` | `floor:` | `floor(-0.99999)`
`ln` | `ln:` | `ln(2)`
`ln2` | | `%@` representing `NSNumber` containing `M_LN2`
`log10` | `log:` | `log(1)`
`log2` | `mgl_log2:` | `mgl_log2(1024)`
`max` | `max:` | `max({1, 2, 2, 3, 4, 7, 9})`
`min` | `min:` | `min({1, 2, 2, 3, 4, 7, 9})`
`pi` | | `%@` representing `NSNumber` containing `M_PI`
`round` | `mgl_round:` | `mgl_round(1.5)`
`sin` | `mgl_sin:` | `mgl_sin(0)`
`sqrt` | `sqrt:` | `sqrt(2)`
`tan` | `mgl_tan:` | `mgl_tan(0)`
`zoom` | `NSExpression.zoomLevelVariableExpression` | `$zoomLevel`
`heatmap-density` | `NSExpression.heatmapDensityVariableExpression` | `$heatmapDensity`
`line-progress` | `NSExpression.lineProgressVariableExpression` | `$lineProgress`
`format` | `+[NSExpression mgl_expressionForAttributedExpressions:]` or `mgl_attributed:` | `mgl_attributed({x, y, z})`
For operators that have no corresponding `NSExpression` symbol, use the
`MGL_FUNCTION()` format string syntax.
## Filtering sources
You can filter a shape or vector tile source by setting the
`MGLVectorStyleLayer.predicate` property to an `NSPredicate` object. Below is a
table of style JSON operators and the corresponding operators used in the
predicate format string:
In style JSON | In the format string
--------------------------|---------------------
`["has", key]` | `key != nil`
`["!has", key]` | `key == nil`
`["==", key, value]` | `key == value`
`["!=", key, value]` | `key != value`
`[">", key, value]` | `key > value`
`[">=", key, value]` | `key >= value`
`["<", key, value]` | `key < value`
`["<=", key, value]` | `key <= value`
`["in", key, v0, …, vn]` | `key IN {v0, …, vn}`
`["!in", key, v0, …, vn]` | `NOT key IN {v0, …, vn}`
`["all", f0, …, fn]` | `p0 AND … AND pn`
`["any", f0, …, fn]` | `p0 OR … OR pn`
`["none", f0, …, fn]` | `NOT (p0 OR … OR pn)`
## Specifying the text format
The following format attributes are defined as `NSString` constans that you
can use to update the formatting of `MGLSymbolStyleLayer.text` property.
In style JSON | In Objective-C | In Swift
--------------|-----------------------|---------
`text-font` | `MGLFontNamesAttribute` | `.fontNamesAttribute`
`font-scale` | `MGLFontScaleAttribute` | `.fontScaleAttribute`
`text-color` | `MGLFontColorAttribute` | `.fontColorAttribute`
See the “[Predicates and Expressions](predicates-and-expressions.html)” guide for
a full description of the supported operators and operand types.

View File

@@ -1,212 +0,0 @@
<%
const os = locals.os;
const iOS = os === 'iOS';
const macOS = os === 'macOS';
const cocoaPrefix = iOS ? 'UI' : 'NS';
const guide = 'MigratingToExpressions';
-%>
<!--
This file is generated.
Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
-->
# Migrating from Style Functions to Expressions
[Runtime Styling](https://www.mapbox.com/ios-sdk/maps/overview/runtime-styling/) enables you to modify every aspect of the map’s appearance dynamically as a user interacts with your application. Developers can specify in advance how a layout or paint attribute will vary as the zoom level changes or how the appearance of individual features vary based on metadata provided by a content source.
With Mapbox Maps SDK for <%- iOS ? 'iOS v4.0.0' : 'macOS v0.7.0' %>, style functions have been replaced with expressions. These provide even more tools for developers who want to style their maps dynamically. This guide outlines some tips for migrating from style functions to expressions, and offers an overview of some things that developers can do with expressions.
An expression is represented at runtime by the `NSExpression` class. Expressions can be used to style paint and layout properties based on zoom level, data attributes, or a combination of the two.
A constant expression can also be assigned to a style property. For example, the opacity of a fill style layer can be set to a constant value between 0 and 1.
The documentation for each individual style layer property notes which non-constant expressions are enabled for that property. Style functions supported four interpolation modes: exponential, interval, categorical, and identity.
This guide uses earthquake data from the [U.S. Geological Survey](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php). Under each interpolation mode, the style function implementation will be shown, followed by the current syntax.
For more information about how to work with GeoJSON data in our <%- os %> SDK, please see our [working with GeoJSON data](working-with-geojson-data.html) guide. To learn more about supported expressions, see our ["Predicates and Expressions"](predicates-and-expressions.html) guide. The "Predicates and Expressions" guide also outlines Mapbox custom functions that can be used to dynamically style a map.
## Stops
Stops are dictionary keys that are associated with layer attribute values. Constant values no longer need to be wrapped as style values when they are values in a stops dictionary.
Style function syntax:
```swift
let stops = [
0: MGLStyleValue<UIColor>(rawValue: .yellow),
2.5: MGLStyleValue(rawValue: .orange),
5: MGLStyleValue(rawValue: .red),
7.5: MGLStyleValue(rawValue: .blue),
10: MGLStyleValue(rawValue: .white),
]
```
Current syntax:
<%- guideExample(guide, 'Stops', os) %>
## Interpolation mode
Style functions supported four interpolation modes: exponential/linear, interval, categorical, and identity. For more information about supported custom expressions, please see the "Predicates and Expressions" guide.
### Linear
`+[NSExpression(MGLAdditions) mgl_expressionForInterpolatingExpression:withCurveType:parameters:stops:]` takes the interpolation type as a parameter. If you previously used the default interpolation base, use the curve type `MGLExpressionInterpolationMode.linear`. See the [`mgl_interpolate:withCurveType:parameters:stops:`](predicates-and-expressions.html#code-mgl_interpolate-withcurvetype-parameters-stops-code) documentation for more details.
The stops dictionary below, shows colors that continuously shift from yellow to orange to red to blue to white based on the attribute value.
Style function syntax:
```swift
let url = URL(string: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson")!
let symbolSource = MGLSource(identifier: "source")
let symbolLayer = MGLSymbolStyleLayer(identifier: "place-city-sm", source: symbolSource)
let source = MGLShapeSource(identifier: "earthquakes", url: url, options: nil)
mapView.style?.addSource(source)
let stops = [
0: MGLStyleValue<UIColor>(rawValue: .yellow),
2.5: MGLStyleValue(rawValue: .orange),
5: MGLStyleValue(rawValue: .red),
7.5: MGLStyleValue(rawValue: .blue),
10: MGLStyleValue(rawValue: .white),
]
let layer = MGLCircleStyleLayer(identifier: "circles", source: source)
layer.circleColor = MGLStyleValue(interpolationMode: .exponential,
sourceStops: stops,
attributeName: "mag",
options: [.defaultValue: MGLStyleValue<UIColor>(rawValue: .green)])
layer.circleRadius = MGLStyleValue(rawValue: 10)
mapView.style?.insertLayer(layer, below: symbolLayer)
```
Current syntax:
<%- guideExample(guide, 'Linear', os) %>
### Exponential
If you previously used an interpolation base greater than `0` (other than `1`), you can use `MGLExpressionInterpolationMode.exponential` as the curve type for `+[NSExpression(MGLAdditions) mgl_expressionForInterpolatingExpression:withCurveType:parameters:stops:]` or `'exponential'` as the curve type for [`mgl_interpolate:withCurveType:parameters:stops:`](predicates-and-expressions.html#code-mgl_interpolate-withcurvetype-parameters-stops-code). The `parameters` argument takes that interpolation base. This interpolates between values exponentially, creating an accelerated ramp effect.
Here’s a visualization from Mapbox Studio (see [Mapbox Studio and iOS](https://www.mapbox.com/ios-sdk/maps/overview/mapbox-studio/)) comparing interpolation base values of `1.5` and `0.5` based on zoom. In order to convert camera style functions, use `$zoomLevel` or `MGL_FUNCTION('zoomLevel')` as the attribute key.
<img src="img/data-driven-styling/exponential-function.png" height=344/>
<img src="img/data-driven-styling/exponential-function-1.png" height=344/>
The example below increases a layer’s `circleRadius` exponentially based on a map’s zoom level. The interpolation base is `1.5`.
Style function syntax:
```swift
let stops = [
12: MGLStyleValue<NSNumber>(rawValue: 0.5),
14: MGLStyleValue(rawValue: 2),
18: MGLStyleValue(rawValue: 18),
]
layer.circleRadius = MGLStyleValue(interpolationMode: .exponential,
cameraStops: stops,
options: [.interpolationBase: 1.5])
```
Current syntax:
<%- guideExample(guide, 'Exponential', os) %>
### Interval
Steps, or intervals, create a range using the keys from the stops dictionary. The range is from the given key to just less than the next key. The attribute values that fall into that range are then styled using the layout or paint value assigned to that key. You can use the `+[NSExpression(MGLAdditions) mgl_expressionForSteppingExpression:fromExpression:stops:]` method or the custom function [`mgl_step:from:stops:`](predicates-and-expressions.html#code-mgl_step-from-stops-code) for cases where you previously used interval interpolation mode. The first parameter takes the feature attribute name and the second parameter (`from:`) optionally takes the default or fallback value for that function. The final parameter takes a stops dictionary as an argument.
When we use the stops dictionary given above with an `'mgl_step:from:stops:'`, we create ranges where earthquakes with a magnitude of 0 to just less than 2.5 would be yellow, 2.5 to just less than 5 would be orange, and so on.
Style function syntax:
```swift
let stops = [
0: MGLStyleValue<UIColor>(rawValue: .yellow),
2.5: MGLStyleValue(rawValue: .orange),
5: MGLStyleValue(rawValue: .red),
7.5: MGLStyleValue(rawValue: .blue),
10: MGLStyleValue(rawValue: .white),
]
layer.circleColor = MGLStyleValue(interpolationMode: .interval,
sourceStops: stops,
attributeName: "mag",
options: [.defaultValue: MGLStyleValue<UIColor>(rawValue: .green)])
````
Current syntax:
<%- guideExample(guide, 'Interval', os) %>
### Categorical
Categorical interpolation mode took a stops dictionary. If the value for a specified feature attribute name matched one in that stops dictionary, the style value for that attribute value would be used. Categorical style functions can now be replaced with `MGL_MATCH`.
`MGL_MATCH` takes an initial condition, which in this case is an attribute key. This is followed by possible matches for that key and the value to assign to the layer property if there is a match. The final argument can be a default style value that is to be used if none of the specified values match.
There are three main types of events in the USGS dataset: earthquakes, explosions, and quarry blasts. In this case, the color of the circle layer will be determined by the type of event, with a default value of blue to catch any events that do not fall into any of those categories.
Style function syntax:
```swift
let categoricalStops = [
"earthquake": MGLStyleValue<UIColor>(rawValue: .orange),
"explosion": MGLStyleValue(rawValue: .red),
"quarry blast": MGLStyleValue(rawValue: .yellow),
]
layer.circleColor = MGLStyleValue(interpolationMode: .categorical,
sourceStops: categoricalStops,
attributeName: "type",
options: [.defaultValue: MGLStyleValue<UIColor>(rawValue: .blue)])
```
Current syntax:
<%- guideExample(guide, 'Categorical', os) %>
If your use case does not require a default value, you can either apply a predicate to your layer prior to styling it, or use the format string `"valueForKeyPath:"`.
### Identity
Identity interpolation mode used the attribute’s value as the style layer property value. In this example, you might set the `circleRadius` to the earthquake’s magnitude. In order to use a feature attribute value to style a layer property, set the property value to `[NSExpression expressionForKeyPath:]`, which take the feature attribute name as an argument.
Style function syntax:
```swift
layer.circleRadius = MGLStyleValue(interpolationMode: .identity,
sourceStops: nil,
attributeName: "mag",
options: [.defaultValue: MGLStyleValue<NSNumber>(rawValue: 0)])
```
Current syntax:
<%- guideExample(guide, 'Identity', os) %>
![identity mode](img/data-driven-styling/identity.png)
Some built-in functions can be applied to attribute values to style layer property values. To set the circle radius to three times the earthquake’s magnitude, create a `multiply:by:` function that takes the attribute value and the multiplier as arguments, or use a format string.
<%- guideExample(guide, 'Multiply', os) %>
![multiply magnitude](img/data-driven-styling/multiply.png)
You can also cast attribute values in order to use them. One example is to cast an integer as an `NSString` and use it as a text value.
<%- guideExample(guide, 'Cast', os) %>
![cast a value](img/data-driven-styling/cast.png)
### Constant Values
For constant values that do not necessarily change based on camera or attribute values, use `[NSExpression expressionForConstantValue:]` (previously `[MGLStyleValue valueWithRawValue:]`).
## Resources
* [USGS Earthquake Feed](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php)
* [For Style Authors](for-style-authors.html)
* [Predicates and Expressions](predicates-and-expressions.html)

View File

@@ -1,950 +0,0 @@
# Predicates and expressions
Style layers use predicates and expressions to determine what to display and how
to format it. _Predicates_ are represented by the same `NSPredicate` class that
filters results from Core Data or items in an `NSArray` in Objective-C.
Predicates are based on _expressions_, represented by the `NSExpression` class.
Somewhat unusually, style layers also use expressions on their own.
This document discusses the specific subset of the predicate and expression
syntax supported by this SDK. For a more general introduction to predicates and
expressions, consult the
_[Predicate Programming Guide](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html)_
in Apple developer documentation. For additional detail on how this SDK has
extended the `NSExpression` class, consult the [`NSExpression(MGLAdditions)`](./Categories/NSExpression(MGLAdditions).html)
section of this documentation.
## Using predicates to filter vector data
Most style layer classes display `MGLFeature` objects that you can show or hide
based on the feature’s attributes. Use the `MGLVectorStyleLayer.predicate`
property to include only the features in the source layer that satisfy a
condition that you define.
### Operators
The following comparison operators are supported:
`NSPredicateOperatorType` | Format string syntax
----------------------------------------------|---------------------
`NSEqualToPredicateOperatorType` | `key = value`<br />`key == value`
`NSGreaterThanOrEqualToPredicateOperatorType` | `key >= value`<br />`key => value`
`NSLessThanOrEqualToPredicateOperatorType` | `key <= value`<br />`key =< value`
`NSGreaterThanPredicateOperatorType` | `key > value`
`NSLessThanPredicateOperatorType` | `key < value`
`NSNotEqualToPredicateOperatorType` | `key != value`<br />`key <> value`
`NSBetweenPredicateOperatorType` | `key BETWEEN { 32, 212 }`
To test whether a feature has or lacks a specific attribute, compare the
attribute to `NULL` or `NIL`. Predicates created using the
`+[NSPredicate predicateWithValue:]` method are also supported. String
operators and custom operators are not supported.
The following compound operators are supported:
`NSCompoundPredicateType` | Format string syntax
--------------------------|---------------------
`NSAndPredicateType` | `predicate1 AND predicate2`<br />`predicate1 && predicate2`
`NSOrPredicateType` | `predicate1 OR predicate2`<br /><code>predicate1 &vert;&vert; predicate2</code>
`NSNotPredicateType` | `NOT predicate`<br />`!predicate`
The following aggregate operators are supported:
`NSPredicateOperatorType` | Format string syntax
----------------------------------|---------------------
`NSInPredicateOperatorType` | `key IN { 'iOS', 'macOS', 'tvOS', 'watchOS' }`
`NSContainsPredicateOperatorType` | `{ 'iOS', 'macOS', 'tvOS', 'watchOS' } CONTAINS key`
The following comparison predicate options are supported for comparison and
aggregate operators that are used in the predicate:
`NSComparisonPredicateOptions` | Format string syntax
----------------------------------------|---------------------
`NSCaseInsensitivePredicateOption` | `'QUEBEC' =[c] 'Quebec'`
`NSDiacriticInsensitivePredicateOption` | `'Québec' =[d] 'Quebec'`
Other comparison predicate options are unsupported, namely `l`
(for locale sensitivity) and `n` (for normalization). A comparison is
locale-sensitive as long as it is case- or diacritic-insensitive.
### Operands
Operands in predicates can be [variables](#variables), [key paths](#key-paths),
or almost anything else that can appear
[inside an expression](#using-expressions-to-configure-layout-and-paint-attributes).
Automatic type casting is not performed. Therefore, a feature only matches a
predicate if its value for the attribute in question is of the same type as the
value specified in the predicate. Use the `CAST()` operator to convert a key
path or variable into a matching type:
* To cast a value to a number, use `CAST(key, 'NSNumber')`.
* To cast a value to a string, use `CAST(key, 'NSString')`.
* To cast a value to a color, use `CAST(key, 'UIColor')` on iOS and `CAST(key, 'NSColor')` on macOS.
* To cast an `NSColor` or `UIColor` object to an array, use `CAST(noindex(color), 'NSArray')`.
For details about the predicate format string syntax, consult the “Predicate
Format String Syntax” chapter of the
_[Predicate Programming Guide](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html)_
in Apple developer documentation.
## Using expressions to configure layout and paint attributes
An expression can contain subexpressions of various types. Each of the supported
types of expressions is discussed below.
### Constant values
A constant value can be of any of the following types:
In Objective-C | In Swift
----------------------|---------
`NSColor` (macOS)<br>`UIColor` (iOS) | `NSColor` (macOS)<br>`UIColor` (iOS)
`NSString` | `String`
`NSString` | `String`
`NSNumber.boolValue` | `NSNumber.boolValue`
`NSNumber.doubleValue` | `NSNumber.doubleValue`
`NSArray<NSNumber>` | `[Float]`
`NSArray<NSString>` | `[String]`
`NSValue.CGVectorValue` (iOS)<br>`NSValue` containing `CGVector` (macOS) | `NSValue.cgVectorValue` (iOS)<br>`NSValue` containing `CGVector` (macOS)
`NSValue.UIEdgeInsetsValue` (iOS)<br>`NSValue.edgeInsetsValue` (macOS) | `NSValue.uiEdgeInsetsValue` (iOS)<br>`NSValue.edgeInsetsValue` (macOS)
For literal floating-point values, use `-[NSNumber numberWithDouble:]` instead
of `-[NSNumber numberWithFloat:]` to avoid precision issues.
### Key paths
A key path expression refers to an attribute of the `MGLFeature` object being
evaluated for display. For example, if a polygon’s `MGLFeature.attributes`
dictionary contains the `floorCount` key, then the key path `floorCount` refers
to the value of the `floorCount` attribute when evaluating that particular
polygon.
The following special attributes are also available on features that are produced
as a result of clustering multiple point features together in a shape source:
<table>
<thead>
<tr><th>Attribute</th><th>Type</th><th>Meaning</th></tr>
</thead>
<tbody>
<tr>
<td><code>cluster</code></td>
<td>Bool</td>
<td>True if the feature is a point cluster. If the attribute is false (or not present) then the feature should not be considered a cluster.</td>
</tr>
<tr>
<td><code>cluster_id</code></td>
<td>Number</td>
<td>Identifier for the point cluster.</td>
</tr>
<tr>
<td><code>point_count</code></td>
<td>Number</td>
<td>The number of point features in a given cluster.</td>
</tr>
</tbody>
</table>
Some characters may not be used directly as part of a key path in a format
string. For example, if a feature’s attribute is named `ISO 3166-1:2006`, an
expression format string of `lowercase(ISO 3166-1:2006)` or a predicate format
string of `ISO 3166-1:2006 == 'US-OH'` would raise an exception. Instead, use a
`%K` placeholder or the `+[NSExpression expressionForKeyPath:]` initializer:
```objc
[NSPredicate predicateWithFormat:@"%K == 'US-OH'", @"ISO 3166-1:2006"];
[NSExpression expressionForFunction:@"lowercase:"
arguments:@[[NSExpression expressionForKeyPath:@"ISO 3166-1:2006"]]]
```
```swift
NSPredicate(format: "%K == 'US-OH'", "ISO 3166-1:2006")
NSExpression(forFunction: "lowercase:",
arguments: [NSExpression(forKeyPath: "ISO 3166-1:2006")])
```
### Functions
Of the
[functions predefined](https://developer.apple.com/documentation/foundation/nsexpression/1413747-init#discussion)
by the
[`+[NSExpression expressionForFunction:arguments:]` method](https://developer.apple.com/documentation/foundation/nsexpression/1413747-init),
the following subset is supported in layer attribute values:
Initializer parameter | Format string syntax
----------------------|---------------------
`average:` | `average({1, 2, 2, 3, 4, 7, 9})`
`sum:` | `sum({1, 2, 2, 3, 4, 7, 9})`
`count:` | `count({1, 2, 2, 3, 4, 7, 9})`
`min:` | `min({1, 2, 2, 3, 4, 7, 9})`
`max:` | `max({1, 2, 2, 3, 4, 7, 9})`
`add:to:` | `1 + 2`
`from:subtract:` | `2 - 1`
`multiply:by:` | `1 * 2`
`divide:by:` | `1 / 2`
`modulus:by:` | `modulus:by:(1, 2)`
`sqrt:` | `sqrt(2)`
`log:` | `log(10)`
`ln:` | `ln(2)`
`raise:toPower:` | `2 ** 2`
`exp:` | `exp(0)`
`ceiling:` | `ceiling(0.99999)`
`abs:` | `abs(-1)`
`trunc:` | `trunc(6378.1370)`
`floor:` | `floor(-0.99999)`
`uppercase:` | `uppercase('Elysian Fields')`
`lowercase:` | `lowercase('DOWNTOWN')`
`noindex:` | `noindex(0 + 2 + c)`
`length:` | `length('Wapakoneta')`
`castObject:toType:` | `CAST(ele, 'NSString')`<br>`CAST(ele, 'NSNumber')`
A number of [Mapbox-specific functions](#mapbox-specific-functions) are also
available.
The following predefined functions are **not** supported:
Initializer parameter | Format string syntax
----------------------|---------------------
`median:` | `median({1, 2, 2, 3, 4, 7, 9})`
`mode:` | `mode({1, 2, 2, 3, 4, 7, 9})`
`stddev:` | `stddev({1, 2, 2, 3, 4, 7, 9})`
`random` | `random()`
`randomn:` | `randomn(10)`
`now` | `now()`
`bitwiseAnd:with:` | `bitwiseAnd:with:(5, 3)`
`bitwiseOr:with:` | `bitwiseOr:with:(5, 3)`
`bitwiseXor:with:` | `bitwiseXor:with:(5, 3)`
`leftshift:by:` | `leftshift:by:(23, 1)`
`rightshift:by:` | `rightshift:by:(23, 1)`
`onesComplement:` | `onesComplement(255)`
`distanceToLocation:fromLocation:` | `distanceToLocation:fromLocation:(there, here)`
### Conditionals
Conditionals are supported via the built-in
`+[NSExpression expressionForConditional:trueExpression:falseExpression:]`
method and `TERNARY()` operator. If you need to express multiple cases
(“else-if”), you can either nest a conditional within a conditional or use the
[`MGL_IF()`](#code-mgl_if-code) or [`MGL_MATCH()`](#code-mgl_match-code) function.
### Aggregates
Aggregate expressions can contain arrays of expressions. In some cases, it is
possible to use the array itself instead of wrapping the array in an aggregate
expression.
### Variables
The following variables are defined by this SDK for use with style layers:
<table>
<thead>
<tr><th>Variable</th><th>Type</th><th>Meaning</th></tr>
</thead>
<tbody>
<tr>
<td><code>$featureIdentifier</code></td>
<td>
Any
<a href="working-with-geojson-data.html#about-geojson-deserialization">GeoJSON data type</a>
</td>
<td>
A value that uniquely identifies the feature in the containing source.
This variable corresponds to the
<code>NSExpression.featureIdentifierVariableExpression</code> property.
</td>
</tr>
<tr>
<td><code>$geometryType</code></td>
<td>String</td>
<td>
The type of geometry represented by the feature. A feature’s type is one
of the following strings:
<ul>
<li>
<code>Point</code> for point features, corresponding to the
<code>MGLPointAnnotation</code> class
</li>
<li>
<code>LineString</code> for polyline features, corresponding to
the <code>MGLPolyline</code> class
</li>
<li>
<code>Polygon</code> for polygon features, corresponding to the
<code>MGLPolygon</code> class
</li>
</ul>
This variable corresponds to the
<code>NSExpression.geometryTypeVariableExpression</code> property.
</td>
</tr>
<tr>
<td><code>$heatmapDensity</code></td>
<td>Number</td>
<td>
The
<a href="https://en.wikipedia.org/wiki/Kernel_density_estimation">kernel density estimation</a>
of a screen point in a heatmap layer; in other words, a relative measure
of how many data points are crowded around a particular pixel. This
variable can only be used with the <code>heatmapColor</code> property.
This variable corresponds to the
<code>NSExpression.heatmapDensityVariableExpression</code> property.
</td>
</tr>
<tr>
<td><code>$zoomLevel</code></td>
<td>Number</td>
<td>
The current zoom level. In style layout and paint properties, this
variable may only appear as the target of a top-level interpolation or
step expression. This variable corresponds to the
<code>NSExpression.zoomLevelVariableExpression</code> property.
</td>
</tr>
<tr>
<td><code>$lineProgress</code></td>
<td>Number</td>
<td>
A number that indicates the relative distance along a line at a given
point along the line. This variable evaluates to 0 at the beginning of the
line and 1 at the end of the line. It can only be used with the
`MGLLineStyleLayer.lineGradient` property. It corresponds to the
<code>NSExpression.lineProgressVariableExpression</code> property.
</td>
</tr>
</tbody>
</table>
In addition to these variables, you can define your own variables and refer to
them elsewhere in the expression. The syntax for defining a variable makes use
of a [Mapbox-specific function](#mapbox-specific-functions) that takes an
`NSDictionary` as an argument:
```objc
[NSExpression expressionWithFormat:@"MGL_LET('floorCount', 2, $floorCount + 1)"];
```
```swift
NSExpression(format: "MGL_LET(floorCount, 2, $floorCount + 1)")
```
## Mapbox-specific functions
For compatibility with the Mapbox Style Specification, the following functions
are defined by this SDK. When setting a style layer property, you can call these
functions just like the predefined functions above, using either the
`+[NSExpression expressionForFunction:arguments:]` method or a convenient format
string syntax:
### `mgl_does:have:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_does:have:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_does:have:(SELF, '🧀🍔')</code> or <code>mgl_does:have:(%@, '🧀🍔')</code></dd>
</dl>
Returns a Boolean value indicating whether the dictionary has a value for the
key or whether the evaluated object (`SELF`) has a value for the feature
attribute. Compared to the [`mgl_has:`](#code-mgl_has-code) custom function,
that function’s target is instead passed in as the first argument to this
function. Both functions are equivalent to the syntax `key != NIL` or
`%@[key] != NIL` but can be used outside of a predicate.
### `mgl_interpolate:withCurveType:parameters:stops:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_interpolate:withCurveType:parameters:stops:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_interpolate:withCurveType:parameters:stops:(x, 'linear', nil, %@)</code></dd>
</dl>
Produces continuous, smooth results by interpolating between pairs of input and
output values (“stops”). Compared to the
[`mgl_interpolateWithCurveType:parameters:stops:`](#code-mgl_interpolatewithcurvetype-parameters-stops-code)
custom function, the input expression (that function’s target) is instead passed
in as the first argument to this function.
### `mgl_step:from:stops:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_step:from:stops:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_step:from:stops:(x, 11, %@)</code></dd>
</dl>
Produces discrete, stepped results by evaluating a piecewise-constant function
defined by pairs of input and output values ("stops"). Compared to the
[`mgl_stepWithMinimum:stops:`](#code-mgl_stepwithminimum-stops-code) custom
function, the input expression (that function’s target) is instead passed in as
the first argument to this function.
### `mgl_join:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_join:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_join({'Old', 'MacDonald'})</code></dd>
</dl>
Returns the result of concatenating together all the elements of an array in
order. Compared to the
[`stringByAppendingString:`](#code-stringbyappendingstring-code) custom
function, this function takes only one argument, which is an aggregate
expression containing the strings to concatenate.
### `mgl_acos:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_acos:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_acos(1)</code></dd>
</dl>
Returns the arccosine of the number.
This function corresponds to the
[`acos`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-acos)
operator in the Mapbox Style Specification.
### `mgl_asin:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_asin:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_asin(0)</code></dd>
</dl>
Returns the arcsine of the number.
This function corresponds to the
[`asin`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-asin)
operator in the Mapbox Style Specification.
### `mgl_atan:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_atan:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_atan(20)</code></dd>
</dl>
Returns the arctangent of the number.
This function corresponds to the
[`atan`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-atan)
operator in the Mapbox Style Specification.
### `mgl_cos:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_cos:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_cos(0)</code></dd>
</dl>
Returns the cosine of the number.
This function corresponds to the
[`cos`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-cos)
operator in the Mapbox Style Specification.
### `mgl_log2:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_log2:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_log2(1024)</code></dd>
</dl>
Returns the base-2 logarithm of the number.
This function corresponds to the
[`log2`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-log2)
operator in the Mapbox Style Specification.
### `mgl_round:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_round:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_round(1.5)</code></dd>
</dl>
Returns the number rounded to the nearest integer. If the number is halfway
between two integers, this function rounds it away from zero.
This function corresponds to the
[`round`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-round)
operator in the Mapbox Style Specification.
### `mgl_sin:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_sin:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_sin(0)</code></dd>
</dl>
Returns the sine of the number.
This function corresponds to the
[`sin`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-sin)
operator in the Mapbox Style Specification.
### `mgl_tan:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_tan:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_tan(0)</code></dd>
</dl>
Returns the tangent of the number.
This function corresponds to the
[`tan`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-tan)
operator in the Mapbox Style Specification.
### `mgl_coalesce:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_coalesce:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_coalesce({x, y, z})</code></dd>
</dl>
Returns the first non-`nil` value from an array of expressions.
This function corresponds to the
[`coalesce`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-coalesce)
operator in the Mapbox Style Specification.
### `mgl_attributed:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_attributed:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_attributed({x, y, z})</code></dd>
</dl>
Concatenates and returns the array of `MGLAttributedExpression` objects, for use
with the `MGLSymbolStyleLayer.text` property.
`MGLAttributedExpression.attributes` valid attributes.
Key | Value Type
--- | ---
`MGLFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
`MGLFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
`MGLFontColorAttribute` | An `NSExpression` evaluating to an `UIColor` (iOS) or `NSColor` (macOS).
This function corresponds to the
[`format`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-format)
operator in the Mapbox Style Specification.
### `MGL_LET`
<dl>
<dt>Selector:</dt>
<dd><code>MGL_LET:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>MGL_LET('age', uppercase('old'), 'name', uppercase('MacDonald'), mgl_join({$age, $name}))</code></dd>
<dt>Arguments:</dt>
<dd>
Any number of variable names interspersed with their assigned
<code>NSExpression</code> values, followed by an <code>NSExpression</code>
that may contain references to those variables.
</dd>
</dl>
Returns the result of evaluating an expression with the given variable values.
Compared to the
[`mgl_expressionWithContext:`](#code-mgl_expressionwithcontext-code) custom
function, this function takes the variable names and values inline before the
expression that contains references to those variables.
### `MGL_MATCH`
<dl>
<dt>Selector:</dt>
<dd><code>MGL_MATCH:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>MGL_MATCH(x, 0, 'zero match', 1, 'one match', 2, 'two match', 'default')</code></dd>
<dt>Arguments:</dt>
<dd>
An input expression, then any number of argument pairs, followed by a default
expression. Each argument pair consists of a constant value followed by an
expression to produce as a result of matching that constant value.
If the input value is an aggregate expression, then any of the constant values within
that aggregate expression result in the following argument. This is shorthand for
specifying an argument pair for each of the constant values within that aggregate
expression. It is not possible to match the aggregate expression itself.
</dd>
</dl>
Returns the result of matching the input expression against the given constant
values.
This function corresponds to the
`+[NSExpression(MGLAdditions) mgl_expressionForMatchingExpression:inDictionary:defaultExpression:]`
method and the
[`match`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-match)
operator in the Mapbox Style Specification.
### `MGL_IF`
<dl>
<dt>Selector:</dt>
<dd><code>MGL_IF:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>MGL_IF(1 = 2, YES, 2 = 2, YES, NO)</code></dd>
<dt>Arguments:</dt>
<dd>
Alternating <code>NSPredicate</code> conditionals and resulting expressions,
followed by a default expression.
</dd>
</dl>
Returns the first expression that meets the condition; otherwise, the default
value. Unlike
`+[NSExpression expressionForConditional:trueExpression:falseExpression:]` or
the `TERNARY()` syntax, this function can accept multiple “if else” conditions
and is supported on iOS 8._x_ and macOS 10.10._x_; however, each conditional
passed into this function must be wrapped in a constant expression.
This function corresponds to the
`+[NSExpression(MGLAdditions) mgl_expressionForConditional:trueExpression:falseExpresssion:]`
method and the
[`case`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-case)
operator in the Mapbox Style Specification.
### `MGL_FUNCTION`
<dl>
<dt>Selector:</dt>
<dd><code>MGL_FUNCTION:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>MGL_FUNCTION('typeof', mystery)</code></dd>
<dt>Arguments:</dt>
<dd>
Any arguments required by the expression operator.
</dd>
</dl>
An expression exactly as defined by the
[Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions).
## Custom functions
The following custom functions are also available with the
`+[NSExpression expressionForFunction:selectorName:arguments:]` method or the
`FUNCTION()` format string syntax.
Some of these functions are defined as methods on their respective target
classes, but you should not call them directly outside the context of an
expression, because the result may differ from the evaluated expression’s result
or may result in undefined behavior.
The Mapbox Style Specification defines some operators for which no custom
function is available. To use these operators in an `NSExpression`, call the
[`MGL_FUNCTION()`](#code-mgl_function-code) function with the same arguments
that the operator expects.
### `boolValue`
<dl>
<dt>Selector:</dt>
<dd><code>boolValue</code></dd>
<dt>Format string syntax:</dt>
<dd><code>FUNCTION(1, 'boolValue')</code></dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to a number or string.
</dd>
<dt>Arguments:</dt>
<dd>None.</dd>
</dl>
A Boolean representation of the target: <code>FALSE</code> when then input is an
empty string, 0, <code>FALSE</code>, <code>NIL</code>, or <code>NaN</code>,
otherwise <code>TRUE</code>.
### `mgl_has:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_has:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>FUNCTION($featureAttributes, 'mgl_has:', '🧀🍔')</code></dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to an <code>NSDictionary</code>
or the evaluated object (<code>SELF</code>).
</dd>
<dt>Arguments:</dt>
<dd>
An <code>NSExpression</code> that evaluates to an <code>NSString</code>
representing the key to look up in the dictionary or the feature attribute to
look up in the evaluated object (see <code>MGLFeature.attributes</code>).
</dd>
</dl>
<code>true</code> if the dictionary has a value for the key or if the evaluated
object has a value for the feature attribute.
This function corresponds to the
[`has`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-has)
operator in the Mapbox Style Specification. See also the
[`mgl_does:have:`](#code-mgl_does-have-code) function, which is used on its own
without the `FUNCTION()` operator. You can also check whether an object has an
attribute by comparing the key path to `NIL`, for example `cheeseburger != NIL`
or `burger.cheese != NIL`
### `mgl_expressionWithContext:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_expressionWithContext:</code></dd>
<dt>Format string syntax:</dt>
<dd>
<code>FUNCTION($ios + $macos, 'mgl_expressionWithContext:', %@)</code> with
a dictionary containing <code>ios</code> and <code>macos</code> keys
</dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that may contain references to the variables
defined in the context dictionary.
</dd>
<dt>Arguments:</dt>
<dd>
An <code>NSDictionary</code> with <code>NSString</code>s as keys and
<code>NSExpression</code>s as values. Each key is a variable name and each
value is the variable’s value within the target expression.
</dd>
</dl>
The target expression with variable subexpressions replaced with the values
defined in the context dictionary.
This function corresponds to the
[`let`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-let)
operator in the Mapbox Style Specification. See also the
[`MGL_LET`](#code-mgl_let-code) function, which is used on its own without the
`FUNCTION()` operator.
### `mgl_interpolateWithCurveType:parameters:stops:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_interpolateWithCurveType:parameters:stops:</code></dd>
<dt>Format string syntax:</dt>
<dd>
<code>FUNCTION($zoomLevel, 'mgl_interpolateWithCurveType:parameters:stops:', 'linear', NIL, %@)</code>
with a dictionary containing zoom levels or other constant values as keys
</dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to a number and contains a
variable or key path expression.
</dd>
<dt>Arguments:</dt>
<dd>
The first argument is one of the following strings denoting curve types:
<code>linear</code>, <code>exponential</code>, or <code>cubic-bezier</code>.
The second argument is an expression providing parameters for the curve:
<ul>
<li>If the curve type is <code>linear</code>, the argument is <code>NIL</code>.</li>
<li>
If the curve type is <code>exponential</code>, the argument is an
expression that evaluates to a number, specifying the base of the
exponential interpolation.
</li>
<li>
If the curve type is <code>cubic-bezier</code>, the argument is an
array or aggregate expression containing four expressions, each
evaluating to a number. The four numbers are control points for the
cubic Bézier curve.
</li>
</ul>
The third argument is an <code>NSDictionary</code> object representing the
interpolation’s stops, with numeric zoom levels as keys and expressions as
values.
</dd>
</dl>
A value interpolated along the continuous mathematical function defined by the
arguments, with the target as the input to the function.
The input expression is matched against the keys in the stop dictionary. The
keys may be feature attribute values, zoom levels, or heatmap densities. The
values may be constant values or `NSExpression` objects. For example, you can
use a stop dictionary with the zoom levels 0, 10, and 20 as keys and the colors
yellow, orange, and red as the values.
This function corresponds to the
`+[NSExpression(MGLAdditions) mgl_expressionForInterpolatingExpression:withCurveType:parameters:stops:]`
method and the
[`interpolate`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-interpolate)
operator in the Mapbox Style Specification. See also the
[`mgl_interpolate:withCurveType:parameters:stops:`](#code-mgl_interpolate-withcurvetype-parameters-stops-code)
function, which is used on its own without the `FUNCTION()` operator.
### `mgl_numberWithFallbackValues:`
<dl>
<dt>Selector:</dt>
<dd>
<code>mgl_numberWithFallbackValues:</code>,
<code>doubleValue</code>,
<code>floatValue</code>, or
<code>decimalValue</code>
</dd>
<dt>Format string syntax:</dt>
<dd><code>FUNCTION(ele, 'mgl_numberWithFallbackValues:', 0)</code></dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to a Boolean value, number, or
string.
</dd>
<dt>Arguments:</dt>
<dd>
Zero or more <code>NSExpression</code>s, each evaluating to a Boolean value
or string.
</dd>
</dl>
A numeric representation of the target:
* If the target is <code>NIL</code> or <code>FALSE</code>, the result is 0.
* If the target is true, the result is 1.
* If the target is a string, it is converted to a number as specified by the
“[ToNumber Applied to the String Type](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type)”
algorithm of the ECMAScript Language Specification.
* If multiple values are provided, each one is evaluated in order until the
first successful conversion is obtained.
This function corresponds to the
[`to-number`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-to-number)
operator in the Mapbox Style Specification. You can also cast a value to a
number by passing the value and the string `NSNumber` into the `CAST()`
operator.
### `mgl_stepWithMinimum:stops:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_stepWithMinimum:stops:</code></dd>
<dt>Format string syntax:</dt>
<dd>
<code>FUNCTION($zoomLevel, 'mgl_stepWithMinimum:stops:', 0, %@)</code> with
a dictionary with zoom levels or other constant values as keys
</dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to a number and contains a
variable or key path expression.
</dd>
<dt>Arguments:</dt>
<dd>
The first argument is an expression that evaluates to a number, specifying
the minimum value in case the target is less than any of the stops in the
second argument.
The second argument is an <code>NSDictionary</code> object representing the
interpolation’s stops, with numeric zoom levels as keys and expressions as
values.
</dd>
</dl>
The output value of the stop whose key is just less than the evaluated target,
or the minimum value if the target is less than the least of the stops’ keys.
The input expression is matched against the keys in the stop dictionary. The
keys may be feature attribute values, zoom levels, or heatmap densities. The
values may be constant values or `NSExpression` objects. For example, you can
use a stop dictionary with the zoom levels 0, 10, and 20 as keys and the colors
yellow, orange, and red as the values.
This function corresponds to the
`+[NSExpression(MGLAdditions) mgl_expressionForSteppingExpression:fromExpression:stops:]`
method and the
[`step`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-step)
operator in the Mapbox Style Specification.
### `stringByAppendingString:`
<dl>
<dt>Selector:</dt>
<dd><code>stringByAppendingString:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>FUNCTION('Old', 'stringByAppendingString:', 'MacDonald')</code></dd>
<dt>Target:</dt>
<dd>An <code>NSExpression</code> that evaluates to a string.</dd>
<dt>Arguments:</dt>
<dd>One or more <code>NSExpression</code>s, each evaluating to a string.</dd>
</dl>
The target string with each of the argument strings appended in order.
This function corresponds to the
`-[NSExpression(MGLAdditions) mgl_expressionByAppendingExpression:]`
method and is similar to the
[`concat`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-concat)
operator in the Mapbox Style Specification. See also the
[`mgl_join:`](#code-mgl_join-code) function, which concatenates multiple
expressions and is used on its own without the `FUNCTION()` operator.
### `stringValue`
<dl>
<dt>Selector:</dt>
<dd><code>stringValue</code></dd>
<dt>Format string syntax:</dt>
<dd><code>FUNCTION(ele, 'stringValue')</code></dd>
<dt>Target:</dt>
<dd>
An <code>NSExpression</code> that evaluates to a Boolean value, number, or
string.
</dd>
<dt>Arguments:</dt>
<dd>None.</dd>
</dl>
A string representation of the target:
* If the target is <code>NIL</code>, the result is the empty string.
* If the target is a Boolean value, the result is the string `true` or `false`.
* If the target is a number, it is converted to a string as specified by the
“[NumberToString](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type)”
algorithm of the ECMAScript Language Specification.
* If the target is a color, it is converted to a string of the form
`rgba(r,g,b,a)`, where <var>r</var>, <var>g</var>, and <var>b</var> are
numerals ranging from 0 to 255 and <var>a</var> ranges from 0 to 1.
* Otherwise, the target is converted to a string in the format specified by the
[`JSON.stringify()`](https://tc39.github.io/ecma262/#sec-json.stringify)
function of the ECMAScript Language Specification.
This function corresponds to the
[`to-string`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-to-string)
operator in the Mapbox Style Specification. You can also cast a value to a
string by passing the value and the string `NSString` into the `CAST()`
operator.

View File

@@ -1,109 +0,0 @@
<%
const os = locals.os;
const iOS = os === 'iOS';
//const macOS = os === 'macOS';
//const cocoaPrefix = iOS ? 'UI' : 'NS';
-%>
<!--
This file is generated.
Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
-->
# Tile URL Templates
`MGLTileSource` objects, specifically `MGLRasterTileSource` and
`MGLVectorTileSource` objects, can be created using an initializer that accepts
an array of tile URL templates. Tile URL templates are strings that specify the
URLs of the vector tiles or raster tile images to load. A template resembles an
absolute URL, but with any number of placeholder strings that the source
evaluates based on the tile it needs to load. For example:
* `http://www.example.com/tiles/{z}/{x}/{y}.pbf` could be
evaluated as `http://www.example.com/tiles/14/6/9.pbf`.
* `http://www.example.com/tiles/{z}/{x}/{y}{ratio}.png` could be
evaluated as `http://www.example.com/tiles/14/6/9@2x.png`.
Tile URL templates are also used to define tilesets in TileJSON manifests or
[`raster`](https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-raster-tiles)
and
[`vector`](https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-vector-tiles)
sources in style JSON files. See the
[TileJSON specification](https://github.com/mapbox/tilejson-spec/tree/master/2.2.0)
for information about tile URL templates in the context of a TileJSON or style
JSON file.
Tile sources support the following placeholder strings in tile URL templates,
all of which are optional:
<table>
<thead>
<tr><th>Placeholder string</th><th>Description</th></tr>
</thead>
<tbody>
<tr>
<td><code>{x}</code></td>
<td>The index of the tile along the map’s x axis according to Spherical
Mercator projection. If the value is 0, the tile’s left edge corresponds
to the 180th meridian west. If the value is 2<sup><var>z</var></sup>−1,
the tile’s right edge corresponds to the 180th meridian east.</td>
</tr>
<tr>
<td><code>{y}</code></td>
<td>The index of the tile along the map’s y axis according to Spherical
Mercator projection. If the value is 0, the tile’s tile edge corresponds
to arctan(sinh(π)), or approximately 85.0511 degrees north. If the value
is 2<sup><var>z</var></sup>−1, the tile’s bottom edge corresponds to
−arctan(sinh(π)), or approximately 85.0511 degrees south. The y axis is
inverted if the <code>options</code> parameter contains
<code>MGLTileSourceOptionTileCoordinateSystem</code> with a value of
<code>MGLTileCoordinateSystemTMS</code>.</td>
</tr>
<tr>
<td><code>{z}</code></td>
<td>The tile’s zoom level. At zoom level 0, each tile covers the entire
world map; at zoom level 1, it covers ¼ of the world; at zoom level 2,
<sup>1</sup>⁄<sub>16</sub> of the world, and so on. For tiles loaded by
a <code>MGLRasterTileSource</code> object, whether the tile zoom level
matches the map’s current zoom level depends on the value of the
source’s tile size as specified in the
<code>MGLTileSourceOptionTileSize</code> key of the <code>options</code>
parameter.</td>
</tr>
<tr>
<td><code>{bbox-epsg-3857}</code></td>
<td>The tile’s bounding box, expressed as a comma-separated list of the
tile’s western, southern, eastern, and northern extents according to
Spherical Mercator (EPSG:3857) projection. The bounding box is typically
used with map services conforming to the
<a href="http://www.opengeospatial.org/standards/wms">Web Map Service</a>
protocol.</td>
</tr>
<tr>
<td><code>{quadkey}</code></td>
<td>A quadkey indicating both the tile’s location and its zoom level. The
quadkey is typically used with
<a href="https://msdn.microsoft.com/en-us/library/bb259689.aspx">Bing Maps</a>.
</td>
</tr>
<tr>
<td><code>{ratio}</code></td>
<td>A suffix indicating the resolution of the tile image. The suffix is the
empty string for standard resolution displays and <code>@2x</code> for
<% if (iOS) { -%>
Retina displays, including displays for which <code>UIScreen.scale</code>
is 3.
<% } else { -%>
Retina displays.
<% } -%>
</td>
</tr>
<tr>
<td><code>{prefix}</code></td>
<td>Two hexadecimal digits chosen such that each visible tile has a
different prefix. The prefix is typically used for domain sharding.</td>
</tr>
</tbody>
</table>
For more information about the `{x}`, `{y}`, and `{z}` placeholder strings,
consult the
[OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames).

View File

@@ -1,101 +0,0 @@
# Working with GeoJSON Data
This SDK offers several ways to work with [GeoJSON](http://geojson.org/) files.
GeoJSON is a standard file format for representing geographic data.
## Adding a GeoJSON file to the map
You can use
[Mapbox Studio’s Datasets editor](https://www.mapbox.com/studio/datasets/) to
upload a GeoJSON file and include it in your custom map style. The GeoJSON data
will be hosted on Mapbox servers. When a user loads your style, the SDK
automatically loads the GeoJSON data for display.
Alternatively, if you need to host the GeoJSON file elsewhere or bundle it with
your application, you can use a GeoJSON file as the basis of an `MGLShapeSource`
object. Pass the file’s URL into the
`-[MGLShapeSource initWithIdentifier:URL:options:]` initializer and add the
shape source to the map using the `-[MGLStyle addSource:]` method. The URL may
be a local file URL, an HTTP URL, or an HTTPS URL.
Once you’ve added the GeoJSON file to the map via an `MGLShapeSource` object,
you can configure the appearance of its data and control what data is visible
using `MGLStyleLayer` objects. You can also
[access the data programmatically](#extracting-geojson-data-from-the-map).
## Converting GeoJSON data into shape objects
If you have GeoJSON data in the form of source code (also known as “GeoJSON
text”), you can convert it into an `MGLShape`, `MGLFeature`, or
`MGLShapeCollectionFeature` object that the `MGLShapeSource` class understands
natively. First, create an `NSData` object out of the source code string or file
contents, then pass that data object into the
`+[MGLShape shapeWithData:encoding:error:]` method. Finally, you can pass the
resulting shape or feature object into the
`-[MGLShapeSource initWithIdentifier:shape:options:]` initializer and add it to
the map, or you can use the object and its properties to power non-map-related
functionality in your application.
To include multiple shapes in the source, create and pass an `MGLShapeCollection` or
`MGLShapeCollectionFeature` object to
`-[MGLShapeSource initWithIdentifier:shape:options:]`. Alternatively, use the
`-[MGLShapeSource initWithIdentifier:features:options:]` or
`-[MGLShapeSource initWithIdentifier:shapes:options:]` method to create a shape source
with an array. `-[MGLShapeSource initWithIdentifier:features:options:]` accepts only `MGLFeature`
instances, such as `MGLPointFeature` objects, whose attributes you can use when
applying a predicate to `MGLVectorStyleLayer` or configuring a style layer’s
appearance.
## Extracting GeoJSON data from the map
Any `MGLShape`, `MGLFeature`, or `MGLShapeCollectionFeature` object has an
`-[MGLShape geoJSONDataUsingEncoding:]` method that you can use to create a
GeoJSON source code representation of the object. You can extract a feature
object from the map using a method such as
`-[MGLMapView visibleFeaturesAtPoint:]`.
## About GeoJSON deserialization
The process of converting GeoJSON text into `MGLShape`, `MGLFeature`, or
`MGLShapeCollectionFeature` objects is known as “GeoJSON deserialization”.
GeoJSON geometries, features, and feature collections are known in this SDK as
shapes, features, and shape collection features, respectively.
Each GeoJSON object type corresponds to a type provided by either this SDK or
the Core Location framework:
GeoJSON object type | SDK type
--------------------|---------
`Position` (longitude, latitude) | `CLLocationCoordinate2D` (latitude, longitude)
`Point` | `MGLPointAnnotation`
`MultiPoint` | `MGLPointCollection`
`LineString` | `MGLPolyline`
`MultiLineString` | `MGLMultiPolyline`
`Polygon` | `MGLPolygon`
Linear ring | `MGLPolygon.coordinates`, `MGLPolygon.interiorPolygons`
`MultiPolygon` | `MGLMultiPolygon`
`GeometryCollection` | `MGLShapeCollection`
`Feature` | `MGLFeature`
`FeatureCollection` | `MGLShapeCollectionFeature`
A `Feature` object in GeoJSON corresponds to an instance of an `MGLShape`
subclass conforming to the `MGLFeature` protocol. There is a distinct
`MGLFeature`-conforming class for each type of geometry that a GeoJSON feature
can contain. This allows features to be used as raw shapes where convenient. For
example, some features can be added to a map view as annotations. Note that
identifiers and attributes will not be available for feature querying when a
feature is used as an annotation.
In contrast to the GeoJSON standard, it is possible for `MGLShape` subclasses
other than `MGLPointAnnotation` to straddle the antimeridian.
The following GeoJSON data types correspond straightforwardly to Foundation data
types when they occur as feature identifiers or property values:
GeoJSON data type | Objective-C representation | Swift representation
-------------------|----------------------------|---------------------
`null` | `NSNull` | `NSNull`
`true`, `false` | `NSNumber.boolValue` | `Bool`
Integer | `NSNumber.unsignedLongLongValue`, `NSNumber.longLongValue` | `UInt64`, `Int64`
Floating-point number | `NSNumber.doubleValue` | `Double`
String | `NSString` | `String`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -1,306 +0,0 @@
/* User-friendly error description */
"ADD_FILE_CONTENTS_FAILED_DESC" = "Unable to add offline packs from the file at %@.";
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ o’clock";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ o’clock";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "east";
/* East, short */
"COMPASS_E_SHORT" = "E";
/* East by north, long */
"COMPASS_EbN_LONG" = "east by north";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EbN";
/* East by south, long */
"COMPASS_EbS_LONG" = "east by south";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EbS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "east-northeast";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "east-southeast";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "north";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "north by east";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NbE";
/* North by west, long */
"COMPASS_NbW_LONG" = "north by west";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NbW";
/* Northeast, long */
"COMPASS_NE_LONG" = "northeast";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "northeast by east";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEbE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "northeast by north";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEbN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "north-northeast";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "north-northwest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNW";
/* Northwest, long */
"COMPASS_NW_LONG" = "northwest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NW";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "northwest by north";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NWbN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "northwest by west";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NWbW";
/* South, long */
"COMPASS_S_LONG" = "south";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "south by east";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SbE";
/* South by west, long */
"COMPASS_SbW_LONG" = "south by west";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SbW";
/* Southeast, long */
"COMPASS_SE_LONG" = "southeast";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "southeast by east";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEbE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "southeast by south";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEbS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "south-southeast";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "south-southwest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSW";
/* Southwest, long */
"COMPASS_SW_LONG" = "southwest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SW";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "southwest by south";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SWbS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "southwest by west";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SWbW";
/* West, long */
"COMPASS_W_LONG" = "west";
/* West, short */
"COMPASS_W_SHORT" = "W";
/* West by north, long */
"COMPASS_WbN_LONG" = "west by north";
/* West by north, short */
"COMPASS_WbN_SHORT" = "WbN";
/* West by south, long */
"COMPASS_WbS_LONG" = "west by south";
/* West by south, short */
"COMPASS_WbS_SHORT" = "WbS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "west-northwest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "WNW";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "west-southwest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "WSW";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d degree(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ and %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, and %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ east";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ east";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ by %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minute(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ north";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ north";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ south";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ south";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d second(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ west";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ west";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";
/* User-friendly error description; first placeholder is the source’s identifier */
"REMOVE_SRC_FAIL_IN_USE_FMT" = "The source “%@” can’t be removed while it is in use.";
/* User-friendly error description */
"REMOVE_SRC_FAIL_MISMATCH_FMT" = "The source can’t be removed because its identifier, “%@”, belongs to a different source in this style.";

View File

@@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>0 درجة</string>
<key>one</key>
<string>درجة واحدة</string>
<key>two</key>
<string>درجتان</string>
<key>few</key>
<string>%d درجات</string>
<key>many</key>
<string>%d درجة</string>
<key>other</key>
<string>%d درجة</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>أقل من دقيقة</string>
<key>one</key>
<string>دقيقة واحدة</string>
<key>two</key>
<string>دقيقتان</string>
<key>few</key>
<string>%d دقائق</string>
<key>many</key>
<string>%d دقيقة</string>
<key>other</key>
<string>%d دقيقة</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>أقل من ثانية</string>
<key>one</key>
<string>ثانية واحدة</string>
<key>two</key>
<string>ثانيتان</string>
<key>few</key>
<string>%d ثوان</string>
<key>many</key>
<string>%d ثانية</string>
<key>other</key>
<string>%d ثانية</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,296 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ часа";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ часа";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "изток";
/* East, short */
"COMPASS_E_SHORT" = "И";
/* East by north, long */
"COMPASS_EbN_LONG" = "ийст-тен-уест";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EbN";
/* East by south, long */
"COMPASS_EbS_LONG" = "ийст-тен-саут";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EbS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "север-североизток";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ССИ";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "изток-югоизток";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ИЮИ";
/* North, long */
"COMPASS_N_LONG" = "север";
/* North, short */
"COMPASS_N_SHORT" = "С";
/* North by east, long */
"COMPASS_NbE_LONG" = "норд-тен-ийст";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NbE";
/* North by west, long */
"COMPASS_NbW_LONG" = "норд-тен-уест";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NbW";
/* Northeast, long */
"COMPASS_NE_LONG" = "североизток";
/* Northeast, short */
"COMPASS_NE_SHORT" = "СИ";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "нордийст-тен-ийст";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEbE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "нордийст-тен-норд";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEnN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "север-североизток";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "ССИ";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "север-северозапад";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "ССЗ";
/* Northwest, long */
"COMPASS_NW_LONG" = "северозапад";
/* Northwest, short */
"COMPASS_NW_SHORT" = "СЗ";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "нордуест-тен-норд";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NWbN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "нордуест-тен-уест";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NWbW";
/* South, long */
"COMPASS_S_LONG" = "юг";
/* South, short */
"COMPASS_S_SHORT" = "Ю";
/* South by east, long */
"COMPASS_SbE_LONG" = "саут-тен-ийст";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SbE";
/* South by west, long */
"COMPASS_SbW_LONG" = "саут-тен-уест";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SbW";
/* Southeast, long */
"COMPASS_SE_LONG" = "югоизток";
/* Southeast, short */
"COMPASS_SE_SHORT" = "ЮИ";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "саутийст-тен-ийст";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEbE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "саутийст-тен-саут";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEbS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "юг-югоизток";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "ЮЮИ";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "юг-югозапад";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "ЮЮЗ";
/* Southwest, long */
"COMPASS_SW_LONG" = "югозапад";
/* Southwest, short */
"COMPASS_SW_SHORT" = "ЮЗ";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "саутуест-тен-саут";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SWbS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "саутуест-тен-уест";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SWbW";
/* West, long */
"COMPASS_W_LONG" = "запад";
/* West, short */
"COMPASS_W_SHORT" = "З";
/* West by north, long */
"COMPASS_WbN_LONG" = "уест-тен-норд";
/* West by north, short */
"COMPASS_WbN_SHORT" = "WbN";
/* West by south, long */
"COMPASS_WbS_LONG" = "уест-тен-саут";
/* West by south, short */
"COMPASS_WbS_SHORT" = "WbS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "запад-северозапад";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ЗСЗ";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "запад-югозапад";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "ЗСЗ";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d градус(а)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ и %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ и %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ изток";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ изток";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@И";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ на %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d минута(и)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ север";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ север";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@С";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ юг";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ юг";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@Ю";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d секунда(и)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ запад";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ запад";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@З";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d градус</string>
<key>other</key>
<string>%d градуса</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d минута</string>
<key>other</key>
<string>%d минути</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d секунда</string>
<key>other</key>
<string>%d секунди</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "a les %@";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "a les %@";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "est";
/* East, short */
"COMPASS_E_SHORT" = "E";
/* East by north, long */
"COMPASS_EbN_LONG" = "est per nord";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EpN";
/* East by south, long */
"COMPASS_EbS_LONG" = "est per sud";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EpS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "est-nord-est";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "est-sud-est";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "nord";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "nord per est";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NpE";
/* North by west, long */
"COMPASS_NbW_LONG" = "nord per oest";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NpO";
/* Northeast, long */
"COMPASS_NE_LONG" = "nord-est";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nord-est per est";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEpE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nord-est per nord";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEpN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "nord-nord-est";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "nord-nord-oest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNO";
/* Northwest, long */
"COMPASS_NW_LONG" = "nord-oest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NO";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "nord-oest per nord";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NOpN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "nord-oest per oest";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NOpO";
/* South, long */
"COMPASS_S_LONG" = "sud";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "sud per est";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SpE";
/* South by west, long */
"COMPASS_SbW_LONG" = "sud per oest";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SpO";
/* Southeast, long */
"COMPASS_SE_LONG" = "sud-est";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sud-est per est";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEpE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sud-est per sud";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEpS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "sud-sud-est";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "sud-sud-oest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSO";
/* Southwest, long */
"COMPASS_SW_LONG" = "sud-oest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SO";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "sud-oest per sud";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SOpS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "sud-oest per oest";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SOpO";
/* West, long */
"COMPASS_W_LONG" = "oest";
/* West, short */
"COMPASS_W_SHORT" = "O";
/* West by north, long */
"COMPASS_WbN_LONG" = "oest per nord";
/* West by north, short */
"COMPASS_WbN_SHORT" = "OpN";
/* West by south, long */
"COMPASS_WbS_LONG" = "oest per sud";
/* West by south, short */
"COMPASS_WbS_SHORT" = "OpS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "oest-nord-oest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ONO";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "oest-sud-oest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "OSO";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grau(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ i %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, i %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ est";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ est";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ per %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minut(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ nord";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ nord";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ sud";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ sud";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d segon(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ oest";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ oest";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@O";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grau</string>
<key>other</key>
<string>%d graus</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minut</string>
<key>other</key>
<string>%d minuts</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d segon</string>
<key>other</key>
<string>%d segons</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,306 +0,0 @@
/* User-friendly error description */
"ADD_FILE_CONTENTS_FAILED_DESC" = "Unable to add offline packs from the file at %@.";
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ o’clock";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ o’clock";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "east";
/* East, short */
"COMPASS_E_SHORT" = "E";
/* East by north, long */
"COMPASS_EbN_LONG" = "east by north";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EbN";
/* East by south, long */
"COMPASS_EbS_LONG" = "east by south";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EbS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "east-northeast";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "east-southeast";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "north";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "north by east";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NbE";
/* North by west, long */
"COMPASS_NbW_LONG" = "north by west";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NbW";
/* Northeast, long */
"COMPASS_NE_LONG" = "northeast";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "northeast by east";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEbE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "northeast by north";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEbN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "north-northeast";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "north-northwest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNW";
/* Northwest, long */
"COMPASS_NW_LONG" = "northwest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NW";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "northwest by north";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NWbN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "northwest by west";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NWbW";
/* South, long */
"COMPASS_S_LONG" = "south";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "south by east";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SbE";
/* South by west, long */
"COMPASS_SbW_LONG" = "south by west";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SbW";
/* Southeast, long */
"COMPASS_SE_LONG" = "southeast";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "southeast by east";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEbE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "southeast by south";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEbS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "south-southeast";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "south-southwest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSW";
/* Southwest, long */
"COMPASS_SW_LONG" = "southwest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SW";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "southwest by south";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SWbS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "southwest by west";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SWbW";
/* West, long */
"COMPASS_W_LONG" = "west";
/* West, short */
"COMPASS_W_SHORT" = "W";
/* West by north, long */
"COMPASS_WbN_LONG" = "west by north";
/* West by north, short */
"COMPASS_WbN_SHORT" = "WbN";
/* West by south, long */
"COMPASS_WbS_LONG" = "west by south";
/* West by south, short */
"COMPASS_WbS_SHORT" = "WbS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "west-northwest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "WNW";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "west-southwest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "WSW";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d degree(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ and %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, and %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ east";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ east";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ by %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minute(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ north";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ north";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ south";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ south";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d second(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ west";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ west";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";
/* User-friendly error description; first placeholder is the source’s identifier */
"REMOVE_SRC_FAIL_IN_USE_FMT" = "The source “%@” can’t be removed while it is in use.";
/* User-friendly error description */
"REMOVE_SRC_FAIL_MISMATCH_FMT" = "The source can’t be removed because its identifier, “%@”, belongs to a different source in this style.";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d degree</string>
<key>other</key>
<string>%d degrees</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minute</string>
<key>other</key>
<string>%d minutes</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d second</string>
<key>other</key>
<string>%d seconds</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ klokken";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ klokken";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "øst";
/* East, short */
"COMPASS_E_SHORT" = "Ø";
/* East by north, long */
"COMPASS_EbN_LONG" = "øst via nord";
/* East by north, short */
"COMPASS_EbN_SHORT" = "ØvN";
/* East by south, long */
"COMPASS_EbS_LONG" = "øst via syd";
/* East by south, short */
"COMPASS_EbS_SHORT" = "ØvS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "øst-nordøst";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ØNØ";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "øst-sydøst";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ØSØ";
/* North, long */
"COMPASS_N_LONG" = "nord";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "nord via øst";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NvØ";
/* North by west, long */
"COMPASS_NbW_LONG" = "nord via vest";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NvV";
/* Northeast, long */
"COMPASS_NE_LONG" = "nordøst";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NØ";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nordøst via øst";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NØvØ";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nordøst via nord";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NØvN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "nord-nordøst";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNØ";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "nord-nordvest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNV";
/* Northwest, long */
"COMPASS_NW_LONG" = "nordvest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NV";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "nordvest via nord";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NVvN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "nordvest via vest";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NVvW";
/* South, long */
"COMPASS_S_LONG" = "syd";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "syd via øst";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SvØ";
/* South by west, long */
"COMPASS_SbW_LONG" = "syd via vest";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SvV";
/* Southeast, long */
"COMPASS_SE_LONG" = "sydøst";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SØ";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sydøst via øst";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SØvØ";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sydøst via syd";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SØvS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "syd-sydøst";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSØ";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "syd-sydvest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSV";
/* Southwest, long */
"COMPASS_SW_LONG" = "sydvest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SV";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "sydvest via syd";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SVvS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "sydvest via vest";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SVvV";
/* West, long */
"COMPASS_W_LONG" = "vest";
/* West, short */
"COMPASS_W_SHORT" = "V";
/* West by north, long */
"COMPASS_WbN_LONG" = "vest via nord";
/* West by north, short */
"COMPASS_WbN_SHORT" = "VvN";
/* West by south, long */
"COMPASS_WbS_LONG" = "vest via syd";
/* West by south, short */
"COMPASS_WbS_SHORT" = "VvS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "vest-nordvest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "VNV";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "vest-sydvest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "VSV";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grad(er)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ og %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, og %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ øst";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ øst";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@Ø";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ via %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minut(ter)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ nord";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ nord";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ syd";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ syd";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d sekunde(r)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ vest";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ vest";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@V";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grad</string>
<key>other</key>
<string>%d grader</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minut</string>
<key>other</key>
<string>%d minutter</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d sekund</string>
<key>other</key>
<string>%d sekunder</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ Uhr";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ Uhr";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "Osten";
/* East, short */
"COMPASS_E_SHORT" = "O";
/* East by north, long */
"COMPASS_EbN_LONG" = "Ost zu Nord";
/* East by north, short */
"COMPASS_EbN_SHORT" = "OzN";
/* East by south, long */
"COMPASS_EbS_LONG" = "Ost zu Süd";
/* East by south, short */
"COMPASS_EbS_SHORT" = "OzS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "Ostnordost";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ONO";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "Ostsüdost";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "OSO";
/* North, long */
"COMPASS_N_LONG" = "Nord";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "Nord zu Ost";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NzO";
/* North by west, long */
"COMPASS_NbW_LONG" = "Nord zu West";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NzW";
/* Northeast, long */
"COMPASS_NE_LONG" = "Nordost";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NO";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "Nordost zu Ost";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NOzO";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "Nordost zu Nord";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NOzN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "Nordnordost";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNO";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "Nordnordwest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNW";
/* Northwest, long */
"COMPASS_NW_LONG" = "Nordwest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NW";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "Nordwest zu Nord";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NWzN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "Nordwest zu West";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NWzW";
/* South, long */
"COMPASS_S_LONG" = "Süd";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "Süd zu Ost";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SzO";
/* South by west, long */
"COMPASS_SbW_LONG" = "Süd zu West";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SzW";
/* Southeast, long */
"COMPASS_SE_LONG" = "Südost";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SO";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "Südost zu Ost";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SOzO";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "Südost zu Süd";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SOzS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "Südsüdost";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSO";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "Südsüdwest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSW";
/* Southwest, long */
"COMPASS_SW_LONG" = "Südwest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SW";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "Südwest zu Süd";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SWzS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "Südwest zu West";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SWzW";
/* West, long */
"COMPASS_W_LONG" = "West";
/* West, short */
"COMPASS_W_SHORT" = "W";
/* West by north, long */
"COMPASS_WbN_LONG" = "West zu Nord";
/* West by north, short */
"COMPASS_WbN_SHORT" = "WzN";
/* West by south, long */
"COMPASS_WbS_LONG" = "West zu Süd";
/* West by south, short */
"COMPASS_WbS_SHORT" = "WzS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "Westnordwest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "WNW";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "Westsüdwest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "WSW";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d Grad";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ und %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ und %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ Ost";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ Ost";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@O";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ zu %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d Minute(n)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ Nord";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ Nord";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ Süd";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ Süd";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d Sekunde(n)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ West";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ West";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d Grad</string>
<key>other</key>
<string>%d Grad</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d Minute</string>
<key>other</key>
<string>%d Minuten</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d Sekunde</string>
<key>other</key>
<string>%d Sekunden</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d degree</string>
<key>other</key>
<string>%d degrees</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minute</string>
<key>other</key>
<string>%d minutes</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d second</string>
<key>other</key>
<string>%d seconds</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ en punto";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ en punto";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "este";
/* East, short */
"COMPASS_E_SHORT" = "E";
/* East by north, long */
"COMPASS_EbN_LONG" = "este por el norte";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EpN";
/* East by south, long */
"COMPASS_EbS_LONG" = "este por el sur";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EpS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "estenordeste";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "estesudeste";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "norte";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "norte por el este";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NpE";
/* North by west, long */
"COMPASS_NbW_LONG" = "norte por el oeste";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NpO";
/* Northeast, long */
"COMPASS_NE_LONG" = "nordeste";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nordeste por el este";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEpE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nordeste por el norte";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEpN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "nornordeste";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "nornoroeste";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNO";
/* Northwest, long */
"COMPASS_NW_LONG" = "noroeste";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NO";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "noroeste por el norte";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NOpN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "noroeste por el oeste";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NOpO";
/* South, long */
"COMPASS_S_LONG" = "sur";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "sur por el este";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SpE";
/* South by west, long */
"COMPASS_SbW_LONG" = "sur por el oeste";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SpO";
/* Southeast, long */
"COMPASS_SE_LONG" = "sudeste";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sudeste por el este";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEpE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sudeste por el sur";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEpS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "sudsudeste";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "sudsudoeste";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSO";
/* Southwest, long */
"COMPASS_SW_LONG" = "sudoeste";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SO";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "sudoeste por el sur";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SOpS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "sudoeste por el oeste";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SOpO";
/* West, long */
"COMPASS_W_LONG" = "oeste";
/* West, short */
"COMPASS_W_SHORT" = "O";
/* West by north, long */
"COMPASS_WbN_LONG" = "oeste por el norte";
/* West by north, short */
"COMPASS_WbN_SHORT" = "OpN";
/* West by south, long */
"COMPASS_WbS_LONG" = "oeste por el sur";
/* West by south, short */
"COMPASS_WbS_SHORT" = "OpS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "oesnoroeste";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ONO";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "oesudoeste";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "OSO";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grado(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ y %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ y %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ este";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ este";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ por %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minuto(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ norte";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ norte";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ sur";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ sur";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d segundo(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ oeste";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ oeste";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@O";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grado</string>
<key>other</key>
<string>%d grados</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minuto</string>
<key>other</key>
<string>%d minutos</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d segundo</string>
<key>other</key>
<string>%d segundos</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,303 +0,0 @@
/* User-friendly error description */
"ADD_FILE_CONTENTS_FAILED_DESC" = "Impossible d’ajouter le contenu hors ligne à partir du fichier %@.";
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ h";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ h";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@ h 00";
/* East, long */
"COMPASS_E_LONG" = "est";
/* East, short */
"COMPASS_E_SHORT" = "E";
/* East by north, long */
"COMPASS_EbN_LONG" = "est par le nord";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EpN";
/* East by south, long */
"COMPASS_EbS_LONG" = "est par le sud";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EpS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "est-nord-est";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "est-sud-est";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "nord";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "nord par l’est";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NpE";
/* North by west, long */
"COMPASS_NbW_LONG" = "nord par l’ouest";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NpO";
/* Northeast, long */
"COMPASS_NE_LONG" = "nord-est";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nord-est par l’est";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEpE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nord-est par le nord";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEpN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "nord-nord-est";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "nord-nord-ouest";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNO";
/* Northwest, long */
"COMPASS_NW_LONG" = "nord-ouest";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NO";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "nord-ouest par le nord";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NOpN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "nord-ouest par l’ouest";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NOpO";
/* South, long */
"COMPASS_S_LONG" = "sud";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "sud par l’est";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SpE";
/* South by west, long */
"COMPASS_SbW_LONG" = "sud par l’ouest";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SpO";
/* Southeast, long */
"COMPASS_SE_LONG" = "sud-est";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sud-est par l’est";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEpE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sud-est par le sud";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEpS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "sud-sud-est";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "sud-sud-ouest";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSO";
/* Southwest, long */
"COMPASS_SW_LONG" = "sud-ouest";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SO";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "sud-ouest par le sud";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SOpS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "sud-ouest par l’ouest";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SOpO";
/* West, long */
"COMPASS_W_LONG" = "ouest";
/* West, short */
"COMPASS_W_SHORT" = "O";
/* West by north, long */
"COMPASS_WbN_LONG" = "ouest par le nord";
/* West by north, short */
"COMPASS_WbN_SHORT" = "OpN";
/* West by south, long */
"COMPASS_WbS_LONG" = "ouest par le sud";
/* West by south, short */
"COMPASS_WbS_SHORT" = "OpS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "ouest-nord-ouest";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ONO";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "ouest-sud-ouest";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "OSO";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d degré(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ et %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ et %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@ %2$@ %3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ est";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ est";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@, %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minute(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ nord";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ nord";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ sud";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ sud";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d seconde(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ ouest";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ ouest";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@O";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";
/* User-friendly error description */
"REMOVE_SRC_FAIL_IN_USE_FMT" = "La source « %@ » est en cours d’utilisation, impossible de la supprimer.";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d degré</string>
<key>other</key>
<string>%d degrés</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minute</string>
<key>other</key>
<string>%d minutes</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d seconde</string>
<key>other</key>
<string>%d secondes</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,306 +0,0 @@
/* User-friendly error description */
"ADD_FILE_CONTENTS_FAILED_DESC" = "Non se poden engadir paquetes sen conexión dende o ficheiro en %@.";
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ en punto";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ en punto";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "leste";
/* East, short */
"COMPASS_E_SHORT" = "L";
/* East by north, long */
"COMPASS_EbN_LONG" = "leste polo norte";
/* East by north, short */
"COMPASS_EbN_SHORT" = "LpN";
/* East by south, long */
"COMPASS_EbS_LONG" = "leste polo sur";
/* East by south, short */
"COMPASS_EbS_SHORT" = "LpS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "leste-nordés";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "LNL";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "leste-sueste";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "LSL";
/* North, long */
"COMPASS_N_LONG" = "norte";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "norte polo leste";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NpL";
/* North by west, long */
"COMPASS_NbW_LONG" = "norte polo oeste";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NpO";
/* Northeast, long */
"COMPASS_NE_LONG" = "nordés";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NL";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nordés polo leste";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NLpL";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nordés polo norte";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NLpN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "norte-nordés";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNL";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "norte-noroeste";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNO";
/* Northwest, long */
"COMPASS_NW_LONG" = "noroeste";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NO";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "noroeste polo norte";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NOpN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "noroeste polo oeste";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NOpO";
/* South, long */
"COMPASS_S_LONG" = "sur";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "sur polo leste";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SpL";
/* South by west, long */
"COMPASS_SbW_LONG" = "sur polo oeste";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SpO";
/* Southeast, long */
"COMPASS_SE_LONG" = "sueste";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SL";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sueste polo leste";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SLpL";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sueste polo sur";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SLpS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "sur-sueste";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSL";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "sur-suroeste";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSO";
/* Southwest, long */
"COMPASS_SW_LONG" = "suroeste";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SO";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "suroeste polo sur";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SOpS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "suroeste polo oeste";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SOpO";
/* West, long */
"COMPASS_W_LONG" = "oeste";
/* West, short */
"COMPASS_W_SHORT" = "O";
/* West by north, long */
"COMPASS_WbN_LONG" = "oeste polo norte";
/* West by north, short */
"COMPASS_WbN_SHORT" = "OpN";
/* West by south, long */
"COMPASS_WbS_LONG" = "oeste polo sur";
/* West by south, short */
"COMPASS_WbS_SHORT" = "OpS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "oeste-noroeste";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ONO";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "oeste-suroeste";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "OSO";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grao(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ e %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ e %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ leste";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ leste";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@L";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ por %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minuto(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ norte";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ norte";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ sur";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ sur";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d segundo(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ oeste";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ oeste";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@O";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";
/* User-friendly error description; first placeholder is the source’s identifier */
"REMOVE_SRC_FAIL_IN_USE_FMT" = "A fonte “%@” non se pode eliminar mentres está en uso.";
/* User-friendly error description */
"REMOVE_SRC_FAIL_MISMATCH_FMT" = "A fonte non se pode eliminar porque o seu identificador, “%@”, pertence a unha fonte diferente neste estilo.";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grao</string>
<key>other</key>
<string>%d graos</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minuto</string>
<key>other</key>
<string>%d minutos</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d segundo</string>
<key>other</key>
<string>%d segundos</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "שעה %@";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "שעה %@";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "מזרח";
/* East, short */
"COMPASS_E_SHORT" = "מז";
/* East by north, long */
"COMPASS_EbN_LONG" = "east by north";
/* East by north, short */
"COMPASS_EbN_SHORT" = "EbN";
/* East by south, long */
"COMPASS_EbS_LONG" = "east by south";
/* East by south, short */
"COMPASS_EbS_SHORT" = "EbS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "מזרח-צפון מזרח";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "מז-צ-מז";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "מזרח-דרום מזרח";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "מז-ד-מז";
/* North, long */
"COMPASS_N_LONG" = "צפון";
/* North, short */
"COMPASS_N_SHORT" = "צ";
/* North by east, long */
"COMPASS_NbE_LONG" = "north by east";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NbE";
/* North by west, long */
"COMPASS_NbW_LONG" = "north by west";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NbW";
/* Northeast, long */
"COMPASS_NE_LONG" = "צפון מזרח";
/* Northeast, short */
"COMPASS_NE_SHORT" = "צ-מז";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "northeast by east";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEbE";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "northeast by north";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEbN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "צפון-צפון מזרח";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "צ-צ-מז";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "צפון-צפון מערב";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "צ-צ-מע";
/* Northwest, long */
"COMPASS_NW_LONG" = "צפון מערב";
/* Northwest, short */
"COMPASS_NW_SHORT" = "צ-מע";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "northwest by north";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NWbN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "northwest by west";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NWbW";
/* South, long */
"COMPASS_S_LONG" = "דרום";
/* South, short */
"COMPASS_S_SHORT" = "ד";
/* South by east, long */
"COMPASS_SbE_LONG" = "south by east";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SbE";
/* South by west, long */
"COMPASS_SbW_LONG" = "south by west";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SbW";
/* Southeast, long */
"COMPASS_SE_LONG" = "דרום מזרח";
/* Southeast, short */
"COMPASS_SE_SHORT" = "ד-מז";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "southeast by east";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEbE";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "southeast by south";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEbS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "דרום-דרום מזרח";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "ד-ד-מז";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "דרום-דרום מערב";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "ד-ד-מע";
/* Southwest, long */
"COMPASS_SW_LONG" = "דרום מערב";
/* Southwest, short */
"COMPASS_SW_SHORT" = "ד-מע";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "southwest by south";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SWbS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "southwest by west";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SWbW";
/* West, long */
"COMPASS_W_LONG" = "מערב";
/* West, short */
"COMPASS_W_SHORT" = "מע";
/* West by north, long */
"COMPASS_WbN_LONG" = "west by north";
/* West by north, short */
"COMPASS_WbN_SHORT" = "WbN";
/* West by south, long */
"COMPASS_WbS_LONG" = "west by south";
/* West by south, short */
"COMPASS_WbS_SHORT" = "WbS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "מערב-צפון מערב";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "מע-צ-מע";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "מערב-דרום מערב";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "מע-ד-מע";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d מעלה(ות)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ ו %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, ו %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ מזרחה";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ מזרחה";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@מז";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ על %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d דקה(ות)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ צפונה";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ צפונה";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@צ";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ דרומה";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ דרומה";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@ד";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d שניה(ות)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ מערב";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ מערב";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@מע";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d fok</string>
<key>other</key>
<string>%d fok</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d perc</string>
<key>other</key>
<string>%d perc</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d másodperc</string>
<key>other</key>
<string>%d másodperc</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@時方向";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@時方向";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "東";
/* East, short */
"COMPASS_E_SHORT" = "東";
/* East by north, long */
"COMPASS_EbN_LONG" = "東微北";
/* East by north, short */
"COMPASS_EbN_SHORT" = "東微北";
/* East by south, long */
"COMPASS_EbS_LONG" = "東微南";
/* East by south, short */
"COMPASS_EbS_SHORT" = "東微南";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "東北東";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "東北東";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "東南東";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "東南東";
/* North, long */
"COMPASS_N_LONG" = "北";
/* North, short */
"COMPASS_N_SHORT" = "北";
/* North by east, long */
"COMPASS_NbE_LONG" = "北微東";
/* North by east, short */
"COMPASS_NbE_SHORT" = "北微東";
/* North by west, long */
"COMPASS_NbW_LONG" = "北微西";
/* North by west, short */
"COMPASS_NbW_SHORT" = "北微西";
/* Northeast, long */
"COMPASS_NE_LONG" = "東北";
/* Northeast, short */
"COMPASS_NE_SHORT" = "東北";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "東北微東";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "東北微東";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "東北微北";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "東北微北";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "北北東";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "北北東";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "北北西";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "北北西";
/* Northwest, long */
"COMPASS_NW_LONG" = "西北";
/* Northwest, short */
"COMPASS_NW_SHORT" = "西北";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "西北微北";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "西北微北";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "西北微西";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "西北微西";
/* South, long */
"COMPASS_S_LONG" = "南";
/* South, short */
"COMPASS_S_SHORT" = "南";
/* South by east, long */
"COMPASS_SbE_LONG" = "南微東";
/* South by east, short */
"COMPASS_SbE_SHORT" = "南微東";
/* South by west, long */
"COMPASS_SbW_LONG" = "南微西";
/* South by west, short */
"COMPASS_SbW_SHORT" = "南微西";
/* Southeast, long */
"COMPASS_SE_LONG" = "東南";
/* Southeast, short */
"COMPASS_SE_SHORT" = "東南";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "東南微東";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "東南微東";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "東南微南";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "東南微南";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "南南東";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "南南東";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "南南西";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "南南西";
/* Southwest, long */
"COMPASS_SW_LONG" = "西南";
/* Southwest, short */
"COMPASS_SW_SHORT" = "西南";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "西南微南";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "西南微南";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "西南微西";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "西南微西";
/* West, long */
"COMPASS_W_LONG" = "西";
/* West, short */
"COMPASS_W_SHORT" = "西";
/* West by north, long */
"COMPASS_WbN_LONG" = "西微北";
/* West by north, short */
"COMPASS_WbN_SHORT" = "西微北";
/* West by south, long */
"COMPASS_WbS_LONG" = "西微南";
/* West by south, short */
"COMPASS_WbS_SHORT" = "西微南";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "西北西";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "西北西";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "西南西";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "西南西";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d度";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@度%2$@分";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@度%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%度2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%度2$@分%3$@秒";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "東%@";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "東%@";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@,%2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@,%2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@,%2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d分";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "北%@";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "北%@";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "南%@";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "南%@";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d秒";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "西%@";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "西%@";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ 시";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ 시";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "동쪽";
/* East, short */
"COMPASS_E_SHORT" = "동";
/* East by north, long */
"COMPASS_EbN_LONG" = "동미북쪽";
/* East by north, short */
"COMPASS_EbN_SHORT" = "동미북";
/* East by south, long */
"COMPASS_EbS_LONG" = "동미남쪽";
/* East by south, short */
"COMPASS_EbS_SHORT" = "동미남";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "동북동쪽";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "동북동";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "동남동쪽";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "동남동";
/* North, long */
"COMPASS_N_LONG" = "북쪽";
/* North, short */
"COMPASS_N_SHORT" = "북";
/* North by east, long */
"COMPASS_NbE_LONG" = "북미동쪽";
/* North by east, short */
"COMPASS_NbE_SHORT" = "북미동";
/* North by west, long */
"COMPASS_NbW_LONG" = "북미서쪽";
/* North by west, short */
"COMPASS_NbW_SHORT" = "북미서";
/* Northeast, long */
"COMPASS_NE_LONG" = "북동쪽";
/* Northeast, short */
"COMPASS_NE_SHORT" = "북동";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "북동미동쪽";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "북동미동";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "북동미북쪽";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "북동미북";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "북북동쪽";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "북북동";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "북북서쪽";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "북북서";
/* Northwest, long */
"COMPASS_NW_LONG" = "북서쪽";
/* Northwest, short */
"COMPASS_NW_SHORT" = "북서";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "북서미북쪽";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "북서미북";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "북서미서쪽";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "북서미서";
/* South, long */
"COMPASS_S_LONG" = "남쪽";
/* South, short */
"COMPASS_S_SHORT" = "남";
/* South by east, long */
"COMPASS_SbE_LONG" = "남미동쪽";
/* South by east, short */
"COMPASS_SbE_SHORT" = "남미동";
/* South by west, long */
"COMPASS_SbW_LONG" = "남미서";
/* South by west, short */
"COMPASS_SbW_SHORT" = "남미서";
/* Southeast, long */
"COMPASS_SE_LONG" = "남동쪽";
/* Southeast, short */
"COMPASS_SE_SHORT" = "남동";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "남동미동쪽";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "남동미동";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "남동미남쪽";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "남동미남";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "남남동쪽";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "남남동";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "남남서쪽";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "남남서";
/* Southwest, long */
"COMPASS_SW_LONG" = "남서쪽";
/* Southwest, short */
"COMPASS_SW_SHORT" = "남서";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "남서미남쪽";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "남서미남";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "남서미서쪽";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "남서미서";
/* West, long */
"COMPASS_W_LONG" = "서쪽";
/* West, short */
"COMPASS_W_SHORT" = "서";
/* West by north, long */
"COMPASS_WbN_LONG" = "서미북쪽";
/* West by north, short */
"COMPASS_WbN_SHORT" = "서미북";
/* West by south, long */
"COMPASS_WbS_LONG" = "서미남쪽";
/* West by south, short */
"COMPASS_WbS_SHORT" = "서미남";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "서북서쪽";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "서북서";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "서남서쪽";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "서남서";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d 도";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ 와 %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, 와 %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ 동쪽";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ 동쪽";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@동";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ by %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d 분";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ 북쪽";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ 북쪽";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@북";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ 남쪽";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ 남쪽";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@남";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d 초";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ 서쪽";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ 서쪽";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@서";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "오픈스트리트맵";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "오픈스트리트맵";

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d 도</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d 분</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d 초</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "Laikas: %@";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "Laikas: %@";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "rytai";
/* East, short */
"COMPASS_E_SHORT" = "R";
/* East by north, long */
"COMPASS_EbN_LONG" = "rytai į šiaurę";
/* East by north, short */
"COMPASS_EbN_SHORT" = "RįŠ";
/* East by south, long */
"COMPASS_EbS_LONG" = "rytai į pietus";
/* East by south, short */
"COMPASS_EbS_SHORT" = "RįP";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "rytai - šiaurės rytai";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "R-ŠR";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "rytai - pietryčiai";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "R-PR";
/* North, long */
"COMPASS_N_LONG" = "šiaurė";
/* North, short */
"COMPASS_N_SHORT" = "Š";
/* North by east, long */
"COMPASS_NbE_LONG" = "šiaurė į rytus";
/* North by east, short */
"COMPASS_NbE_SHORT" = "ŠįR";
/* North by west, long */
"COMPASS_NbW_LONG" = "šiaurė į vakarus";
/* North by west, short */
"COMPASS_NbW_SHORT" = "ŠįV";
/* Northeast, long */
"COMPASS_NE_LONG" = "šiaurės rytai";
/* Northeast, short */
"COMPASS_NE_SHORT" = "ŠR";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "šiaurės rytai į rytus";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "ŠRįR";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "šiaurės rytai į šiaurę";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "ŠRįŠ";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "šiaurė - šiaurės rytai";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "ŠŠR";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "šiaurė - šiaurės vakarai";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "ŠŠV";
/* Northwest, long */
"COMPASS_NW_LONG" = "šiaurės vakarai";
/* Northwest, short */
"COMPASS_NW_SHORT" = "ŠV";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "šiaurės vakarai į šiaurę";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "ŠVįŠ";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "šiaurės vakarai į vakarus";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "ŠVįV";
/* South, long */
"COMPASS_S_LONG" = "pietūs";
/* South, short */
"COMPASS_S_SHORT" = "P";
/* South by east, long */
"COMPASS_SbE_LONG" = "pietūs į rytus";
/* South by east, short */
"COMPASS_SbE_SHORT" = "PįR";
/* South by west, long */
"COMPASS_SbW_LONG" = "pietūs į vakarus";
/* South by west, short */
"COMPASS_SbW_SHORT" = "PįV";
/* Southeast, long */
"COMPASS_SE_LONG" = "pietryčiai";
/* Southeast, short */
"COMPASS_SE_SHORT" = "PR";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "pietryčiai į rytus";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "PRįR";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "pietryčiai į pietus";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "PRįP";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "pietūs - pietryčiai";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "PPR";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "pietūs - pietvakariai";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "PPV";
/* Southwest, long */
"COMPASS_SW_LONG" = "pietvakariai";
/* Southwest, short */
"COMPASS_SW_SHORT" = "PV";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "pietvakariai į pietus";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "PVįP";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "pietvakariai į vakarus";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "PVįV";
/* West, long */
"COMPASS_W_LONG" = "vakarai";
/* West, short */
"COMPASS_W_SHORT" = "V";
/* West by north, long */
"COMPASS_WbN_LONG" = "vakarai į šiaurę";
/* West by north, short */
"COMPASS_WbN_SHORT" = "VįŠ";
/* West by south, long */
"COMPASS_WbS_LONG" = "vakarai į pietus";
/* West by south, short */
"COMPASS_WbS_SHORT" = "VįP";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "vakarai - šiaurės vakarai";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "VŠV";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "vakarai - pietvakariai";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "VPV";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d laipsniai(-ių)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ ir %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ ir %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ ritų ilgumos";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ į rytus";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@R";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@, %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minutė(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ šiaurės platumos";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ į šiaurę";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@Š";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ pietų platumos";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ į pietus";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@P";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d sekundės(-ių)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ vakarų ilgumos";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ į vakarus";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@V";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d laipsniai</string>
<key>few</key>
<string>%d laipsniai</string>
<key>other</key>
<string>%d laipsnių</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minutė</string>
<key>few</key>
<string>%d minutės</string>
<key>other</key>
<string>%d minučių</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d sekundė</string>
<key>few</key>
<string>%d sekundės</string>
<key>other</key>
<string>%d sekundžių</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d stopień</string>
<key>few</key>
<string>%d stopnie</string>
<key>many</key>
<string>%d stopni</string>
<key>other</key>
<string>%d stopnia</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minuta</string>
<key>few</key>
<string>%d minuty</string>
<key>many</key>
<string>%d minut</string>
<key>other</key>
<string>%d minuty</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d sekunda</string>
<key>few</key>
<string>%d sekundy</string>
<key>many</key>
<string>%d sekund</string>
<key>other</key>
<string>%d sekundy</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "São %@ horas";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "São %@ horas";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "leste";
/* East, short */
"COMPASS_E_SHORT" = "L";
/* East by north, long */
"COMPASS_EbN_LONG" = "lest pelo norte";
/* East by north, short */
"COMPASS_EbN_SHORT" = "LpN";
/* East by south, long */
"COMPASS_EbS_LONG" = "leste pelo sul";
/* East by south, short */
"COMPASS_EbS_SHORT" = "LpS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "lés-nordeste";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ENE";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "lés-sudeste";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ESE";
/* North, long */
"COMPASS_N_LONG" = "norte";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "norte pelo leste";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NpL";
/* North by west, long */
"COMPASS_NbW_LONG" = "norte pelo oeste";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NpO";
/* Northeast, long */
"COMPASS_NE_LONG" = "nordeste";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NE";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "nordeste pelo leste";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NEpL";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "nordeste pelo norte";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NEpN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "nor-nordeste";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNE";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "nor-noroeste";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNO";
/* Northwest, long */
"COMPASS_NW_LONG" = "noroeste";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NO";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "noroeste pelo norte";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NOpN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "noroeste pelo oeste";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NOpO";
/* South, long */
"COMPASS_S_LONG" = "sul";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "sul pelo leste";
/* South by east, short */
"COMPASS_SbE_SHORT" = "SpL";
/* South by west, long */
"COMPASS_SbW_LONG" = "sul pelo oeste";
/* South by west, short */
"COMPASS_SbW_SHORT" = "SbO";
/* Southeast, long */
"COMPASS_SE_LONG" = "sudeste";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SE";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "sudeste pelo leste";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SEpL";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "sudeste pelo sul";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SEpS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "sul-sudeste";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSE";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "su-sudoeste";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSO";
/* Southwest, long */
"COMPASS_SW_LONG" = "sudoeste";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SO";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "sudoeste pelo sul";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SOpS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "sudoeste pelo oeste";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SOpO";
/* West, long */
"COMPASS_W_LONG" = "oeste";
/* West, short */
"COMPASS_W_SHORT" = "O";
/* West by north, long */
"COMPASS_WbN_LONG" = "oeste pelo norte";
/* West by north, short */
"COMPASS_WbN_SHORT" = "OpN";
/* West by south, long */
"COMPASS_WbS_LONG" = "oeste pelo sul";
/* West by south, short */
"COMPASS_WbS_SHORT" = "OpS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "oés-noroeste";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ONO";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "oés-sudoeste";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "OSO";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grau(s)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ e %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, e %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ leste";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ leste";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@L";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ por %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minuto(s)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ norte";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ norte";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ sul";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ sul";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d segundo(s)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ oeste";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ oeste";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@O";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grau</string>
<key>other</key>
<string>%d graus</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minuto</string>
<key>other</key>
<string>%d minutos</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d segundo</string>
<key>other</key>
<string>%d segundos</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grau</string>
<key>other</key>
<string>%d graus</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minuto</string>
<key>other</key>
<string>%d minutos</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d segundo</string>
<key>other</key>
<string>%d segundos</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ часов";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ час.";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "восток";
/* East, short */
"COMPASS_E_SHORT" = "В";
/* East by north, long */
"COMPASS_EbN_LONG" = "северо-восток";
/* East by north, short */
"COMPASS_EbN_SHORT" = "СВ";
/* East by south, long */
"COMPASS_EbS_LONG" = "юго-восток";
/* East by south, short */
"COMPASS_EbS_SHORT" = "ЮВ";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "восток-северо-восток";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ВСВ";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "юго-юго-восток";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ЮЮВ";
/* North, long */
"COMPASS_N_LONG" = "север";
/* North, short */
"COMPASS_N_SHORT" = "С";
/* North by east, long */
"COMPASS_NbE_LONG" = "северо-восток";
/* North by east, short */
"COMPASS_NbE_SHORT" = "СВ";
/* North by west, long */
"COMPASS_NbW_LONG" = "северо-запад";
/* North by west, short */
"COMPASS_NbW_SHORT" = "СЗ";
/* Northeast, long */
"COMPASS_NE_LONG" = "северо-восток";
/* Northeast, short */
"COMPASS_NE_SHORT" = "СВ";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "восток-северо-восток";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "ВСВ";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "северо-северо-восток";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "ССВ";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "северо-северо-восток";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "ССВ";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "северо-северо-запад";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "ССЗ";
/* Northwest, long */
"COMPASS_NW_LONG" = "северо-запад";
/* Northwest, short */
"COMPASS_NW_SHORT" = "СЗ";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "северо-северо-запад";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "ССЗ";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "запад-северо-запад";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "ЗСЗ";
/* South, long */
"COMPASS_S_LONG" = "юг";
/* South, short */
"COMPASS_S_SHORT" = "Ю";
/* South by east, long */
"COMPASS_SbE_LONG" = "юго-восток";
/* South by east, short */
"COMPASS_SbE_SHORT" = "ЮВ";
/* South by west, long */
"COMPASS_SbW_LONG" = "юго-запад";
/* South by west, short */
"COMPASS_SbW_SHORT" = "ЮЗ";
/* Southeast, long */
"COMPASS_SE_LONG" = "юго-восток";
/* Southeast, short */
"COMPASS_SE_SHORT" = "ЮВ";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "восток-юго-восток";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "ВЮВ";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "юго-юго-восток";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "ЮЮВ";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "юго-юго-восток";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "ЮЮВ";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "юго-юго-запад";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "ЮЮЗ";
/* Southwest, long */
"COMPASS_SW_LONG" = "юго-запад";
/* Southwest, short */
"COMPASS_SW_SHORT" = "ЮЗ";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "юго-юго-запад";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "ЮЮЗ";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "восток-юго-восток";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "ВЮВ";
/* West, long */
"COMPASS_W_LONG" = "запад";
/* West, short */
"COMPASS_W_SHORT" = "З";
/* West by north, long */
"COMPASS_WbN_LONG" = "северо-запад";
/* West by north, short */
"COMPASS_WbN_SHORT" = "СЗ";
/* West by south, long */
"COMPASS_WbS_LONG" = "юго-запад";
/* West by south, short */
"COMPASS_WbS_SHORT" = "ЮГ";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "запад-северо-запад";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "ЗСЗ";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "запад-юго-запад";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "ЗЮЗ";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d градус(ов)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ и %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, и %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@восточной долготы";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@восточной долготы";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@,%2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d минут(а)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@северной широты";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@северной широты";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@южной широты";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@южной широты";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d секунд(а)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@западной долготы";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@западной долготы";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d градус</string>
<key>few</key>
<string>%d градуса</string>
<key>many</key>
<string>%d градусов</string>
<key>other</key>
<string>%d градуса</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d минута</string>
<key>few</key>
<string>%d минуты</string>
<key>many</key>
<string>%d минут</string>
<key>other</key>
<string>%d минуты</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d секунда</string>
<key>few</key>
<string>%d секунды</string>
<key>many</key>
<string>%d секунд</string>
<key>other</key>
<string>%d секунды</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "Öst";
/* East, short */
"COMPASS_E_SHORT" = "O";
/* East by north, long */
"COMPASS_EbN_LONG" = "Ost till Nord";
/* East by north, short */
"COMPASS_EbN_SHORT" = "OtN";
/* East by south, long */
"COMPASS_EbS_LONG" = "Ost till Syd";
/* East by south, short */
"COMPASS_EbS_SHORT" = "OtS";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "Ostnordost";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ONO";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "Ostsydost";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "OSO";
/* North, long */
"COMPASS_N_LONG" = "Nord";
/* North, short */
"COMPASS_N_SHORT" = "N";
/* North by east, long */
"COMPASS_NbE_LONG" = "Nord till Ost";
/* North by east, short */
"COMPASS_NbE_SHORT" = "NtO";
/* North by west, long */
"COMPASS_NbW_LONG" = "Nord till Väst";
/* North by west, short */
"COMPASS_NbW_SHORT" = "NtV";
/* Northeast, long */
"COMPASS_NE_LONG" = "Nordost";
/* Northeast, short */
"COMPASS_NE_SHORT" = "NO";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "Nordost till ost";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "NOtO";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "Nordost till nord";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "NOtN";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "Nordnordost";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "NNO";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "Nordnordväst";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "NNV";
/* Northwest, long */
"COMPASS_NW_LONG" = "Nordväst";
/* Northwest, short */
"COMPASS_NW_SHORT" = "NV";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "Nordväst till nord";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "NVtN";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "Nordväst till väst";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "NVtV";
/* South, long */
"COMPASS_S_LONG" = "Syd";
/* South, short */
"COMPASS_S_SHORT" = "S";
/* South by east, long */
"COMPASS_SbE_LONG" = "Syd till ost";
/* South by east, short */
"COMPASS_SbE_SHORT" = "StO";
/* South by west, long */
"COMPASS_SbW_LONG" = "Syd till väst";
/* South by west, short */
"COMPASS_SbW_SHORT" = "StV";
/* Southeast, long */
"COMPASS_SE_LONG" = "Sydost";
/* Southeast, short */
"COMPASS_SE_SHORT" = "SO";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "Sydost till ost";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "SOtO";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "Sydost till syd";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "SOtS";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "Sydsydost";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "SSO";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "Sydsydväst";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "SSV";
/* Southwest, long */
"COMPASS_SW_LONG" = "Sydväst";
/* Southwest, short */
"COMPASS_SW_SHORT" = "SV";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "Sydväst till syd";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "SVtS";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "Sydväst till väst";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "SVtV";
/* West, long */
"COMPASS_W_LONG" = "Väst";
/* West, short */
"COMPASS_W_SHORT" = "V";
/* West by north, long */
"COMPASS_WbN_LONG" = "Väst till nord";
/* West by north, short */
"COMPASS_WbN_SHORT" = "VtN";
/* West by south, long */
"COMPASS_WbS_LONG" = "Väst till syd";
/* West by south, short */
"COMPASS_WbS_SHORT" = "VtS";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "Västnordväst";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "VNV";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "Västsydväst";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "VSV";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d grad(er)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ och %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@ och %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ Öst";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ Öst";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@O";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ till %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d minut(er)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%dm";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%dm";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ Nord";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ Nord";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ Syd";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ Syd";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d sekund(er)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%ds";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%ds";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ Väst";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ Väst";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d grad</string>
<key>other</key>
<string>%d grader</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minut</string>
<key>other</key>
<string>%d minuter</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d sekund</string>
<key>other</key>
<string>%d sekunder</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@год.";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@г.";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "схід";
/* East, short */
"COMPASS_E_SHORT" = "Сх";
/* East by north, long */
"COMPASS_EbN_LONG" = "північний схід";
/* East by north, short */
"COMPASS_EbN_SHORT" = "ПнСх";
/* East by south, long */
"COMPASS_EbS_LONG" = "південний схід";
/* East by south, short */
"COMPASS_EbS_SHORT" = "ПдСх";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "схід - північний схід";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "Сх-ПнСх";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "схід - південний схід";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "Сх-ПдСх";
/* North, long */
"COMPASS_N_LONG" = "північ";
/* North, short */
"COMPASS_N_SHORT" = "Пн";
/* North by east, long */
"COMPASS_NbE_LONG" = "північний схід";
/* North by east, short */
"COMPASS_NbE_SHORT" = "ПнСх";
/* North by west, long */
"COMPASS_NbW_LONG" = "північний захід";
/* North by west, short */
"COMPASS_NbW_SHORT" = "ПнЗх";
/* Northeast, long */
"COMPASS_NE_LONG" = "північний схід";
/* Northeast, short */
"COMPASS_NE_SHORT" = "ПнСх";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "північний схід - схід";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "ПнСх-Сх";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "північний счхід - північ";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "ПнСх-Пн";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "північ - північний схід";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "Пн-ПнСх";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "північ - північний захід";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "Пн-ПнЗх";
/* Northwest, long */
"COMPASS_NW_LONG" = "північний захід";
/* Northwest, short */
"COMPASS_NW_SHORT" = "ПнЗх";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "північний захід - північ";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "ПнЗх-Пн";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "північний захід - захід";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "ПнЗх-Зх";
/* South, long */
"COMPASS_S_LONG" = "південь";
/* South, short */
"COMPASS_S_SHORT" = "Пд";
/* South by east, long */
"COMPASS_SbE_LONG" = "південний схід";
/* South by east, short */
"COMPASS_SbE_SHORT" = "ПдСх";
/* South by west, long */
"COMPASS_SbW_LONG" = "південний захід";
/* South by west, short */
"COMPASS_SbW_SHORT" = "ПдЗх";
/* Southeast, long */
"COMPASS_SE_LONG" = "південний схід";
/* Southeast, short */
"COMPASS_SE_SHORT" = "ПдСх";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "південний схід - схід";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "ПдСх-Сх";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "південний схід - південь";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "ПдСх-Пд";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "південь - південний схід";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "Пд-ПдСх";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "південь - південний захід";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "Пд-ПдЗх";
/* Southwest, long */
"COMPASS_SW_LONG" = "південний захід";
/* Southwest, short */
"COMPASS_SW_SHORT" = "ПдЗх";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "південний захід - південь";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "ПдЗх-Пд";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "південний захід - захід";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "ПдЗх-Зх";
/* West, long */
"COMPASS_W_LONG" = "захід";
/* West, short */
"COMPASS_W_SHORT" = "Зх";
/* West by north, long */
"COMPASS_WbN_LONG" = "північний захід";
/* West by north, short */
"COMPASS_WbN_SHORT" = "ПнЗх";
/* West by south, long */
"COMPASS_WbS_LONG" = "південний захід";
/* West by south, short */
"COMPASS_WbS_SHORT" = "ПдЗх";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "захід - північний захід";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "Зх-ПнЗх";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "захід - південний захід";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "Зх-ПдЗх";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d градус(ів)";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ та %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, та %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ східної довготи";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ східної довготи";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@Сх";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@, %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d хвилин(а)";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ північної широти";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ північної широти";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@Пн";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ південної широти";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ південної широти";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@Пд";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d секунд(а)";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ західної довготи";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ західної довготи";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@Зх";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d градус</string>
<key>few</key>
<string>%d градуси</string>
<key>other</key>
<string>%d градусів</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d хвилина</string>
<key>few</key>
<string>%d хвилини</string>
<key>other</key>
<string>%d хвилин</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d секунда</string>
<key>few</key>
<string>%d секунди</string>
<key>other</key>
<string>%d секунд</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@ giờ";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@ giờ";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "đông";
/* East, short */
"COMPASS_E_SHORT" = "Đ";
/* East by north, long */
"COMPASS_EbN_LONG" = "đông về bắc";
/* East by north, short */
"COMPASS_EbN_SHORT" = "ĐvB";
/* East by south, long */
"COMPASS_EbS_LONG" = "đông về nam";
/* East by south, short */
"COMPASS_EbS_SHORT" = "ĐvN";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "đông đông bắc";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "ĐĐB";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "đông đông nam";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "ĐĐN";
/* North, long */
"COMPASS_N_LONG" = "bắc";
/* North, short */
"COMPASS_N_SHORT" = "B";
/* North by east, long */
"COMPASS_NbE_LONG" = "bắc về đông";
/* North by east, short */
"COMPASS_NbE_SHORT" = "BvĐ";
/* North by west, long */
"COMPASS_NbW_LONG" = "bắc về tây";
/* North by west, short */
"COMPASS_NbW_SHORT" = "BvT";
/* Northeast, long */
"COMPASS_NE_LONG" = "đông bắc";
/* Northeast, short */
"COMPASS_NE_SHORT" = "ĐB";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "đông bắc về đông";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "ĐBvĐ";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "đông bắc về bắc";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "ĐBvB";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "bắc đông bắc";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "BĐB";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "bắc tây bắc";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "BTB";
/* Northwest, long */
"COMPASS_NW_LONG" = "tây bắc";
/* Northwest, short */
"COMPASS_NW_SHORT" = "TB";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "tây bắc về bắc";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "TBvB";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "tây bắc về tây";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "TBvT";
/* South, long */
"COMPASS_S_LONG" = "nam";
/* South, short */
"COMPASS_S_SHORT" = "N";
/* South by east, long */
"COMPASS_SbE_LONG" = "nam về đông";
/* South by east, short */
"COMPASS_SbE_SHORT" = "NvĐ";
/* South by west, long */
"COMPASS_SbW_LONG" = "nam về tây";
/* South by west, short */
"COMPASS_SbW_SHORT" = "NvT";
/* Southeast, long */
"COMPASS_SE_LONG" = "đông nam";
/* Southeast, short */
"COMPASS_SE_SHORT" = "ĐN";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "đông nam về đông";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "ĐNvĐ";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "đông nam về nam";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "ĐNvN";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "nam đông nam";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "NĐN";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "nam tây nam";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "NTN";
/* Southwest, long */
"COMPASS_SW_LONG" = "tây nam";
/* Southwest, short */
"COMPASS_SW_SHORT" = "TN";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "tây nam về nam";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "TNvN";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "tây nam về tây";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "TNvT";
/* West, long */
"COMPASS_W_LONG" = "tây";
/* West, short */
"COMPASS_W_SHORT" = "T";
/* West by north, long */
"COMPASS_WbN_LONG" = "tây về bắc";
/* West by north, short */
"COMPASS_WbN_SHORT" = "TvB";
/* West by south, long */
"COMPASS_WbS_LONG" = "tây về nam";
/* West by south, short */
"COMPASS_WbS_SHORT" = "TvN";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "tây tây bắc";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "TTB";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "tây tây nam";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "TTN";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d độ";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@ %2$@";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@, %2$@, %3$@";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%2$@%3$@";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "%@ kinh độ đông";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "%@ đông";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@Đ";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@ và %2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@, %2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@, %2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d phút";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "%@ vĩ độ bắc";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "%@ bắc";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "%@ vĩ độ nam";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "%@ nam";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@N";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d giây";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "%@ kinh độ tây";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "%@ tây";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@T";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d độ</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d phút</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>other</key>
<string>%d giây</string>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@点";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@点";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "东";
/* East, short */
"COMPASS_E_SHORT" = "东";
/* East by north, long */
"COMPASS_EbN_LONG" = "东微北";
/* East by north, short */
"COMPASS_EbN_SHORT" = "东微北";
/* East by south, long */
"COMPASS_EbS_LONG" = "东微南";
/* East by south, short */
"COMPASS_EbS_SHORT" = "东微南";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "东北偏东";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "东北偏东";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "东南偏东";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "东南偏东";
/* North, long */
"COMPASS_N_LONG" = "北";
/* North, short */
"COMPASS_N_SHORT" = "北";
/* North by east, long */
"COMPASS_NbE_LONG" = "北微东";
/* North by east, short */
"COMPASS_NbE_SHORT" = "北微东";
/* North by west, long */
"COMPASS_NbW_LONG" = "北微西";
/* North by west, short */
"COMPASS_NbW_SHORT" = "北微西";
/* Northeast, long */
"COMPASS_NE_LONG" = "东北";
/* Northeast, short */
"COMPASS_NE_SHORT" = "东北";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "东北微东";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "东北微东";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "东北微北";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "东北微北";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "东北偏北";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "东北偏北";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "西北偏北";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "西北偏北";
/* Northwest, long */
"COMPASS_NW_LONG" = "西北";
/* Northwest, short */
"COMPASS_NW_SHORT" = "西北";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "西北微北";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "西北微北";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "西北微西";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "西北微西";
/* South, long */
"COMPASS_S_LONG" = "南";
/* South, short */
"COMPASS_S_SHORT" = "南";
/* South by east, long */
"COMPASS_SbE_LONG" = "南微东";
/* South by east, short */
"COMPASS_SbE_SHORT" = "南微东";
/* South by west, long */
"COMPASS_SbW_LONG" = "南微西";
/* South by west, short */
"COMPASS_SbW_SHORT" = "南微西";
/* Southeast, long */
"COMPASS_SE_LONG" = "东南";
/* Southeast, short */
"COMPASS_SE_SHORT" = "东南";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "东南微东";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "东南微东";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "东南微南";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "东南微南";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "东南偏南";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "东南偏南";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "西南偏南";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "西南偏南";
/* Southwest, long */
"COMPASS_SW_LONG" = "西南";
/* Southwest, short */
"COMPASS_SW_SHORT" = "西南";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "西南偏南";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "西南偏南";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "西南偏西";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "西南偏西";
/* West, long */
"COMPASS_W_LONG" = "西";
/* West, short */
"COMPASS_W_SHORT" = "西";
/* West by north, long */
"COMPASS_WbN_LONG" = "西微北";
/* West by north, short */
"COMPASS_WbN_SHORT" = "西微北";
/* West by south, long */
"COMPASS_WbS_LONG" = "西微南";
/* West by south, short */
"COMPASS_WbS_SHORT" = "西微南";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "西北偏西";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "西北偏西";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "西南偏西";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "西南偏西";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d度";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@度%2$@分";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@度%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%度2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%度2$@分%3$@秒";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "东经%@";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "东经%@";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@,%2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@,%2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@,%2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d分";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "北纬%@";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "北纬%@";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "南纬%@";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "南纬%@";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d秒";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "西经%@";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "西经%@";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,297 +0,0 @@
/* Clock position format, long: {hours} o’clock */
"CLOCK_FMT_LONG" = "%@點";
/* Clock position format, medium: {hours} o’clock */
"CLOCK_FMT_MEDIUM" = "%@點";
/* Clock position format, short: {hours}:00 */
"CLOCK_FMT_SHORT" = "%@:00";
/* East, long */
"COMPASS_E_LONG" = "東";
/* East, short */
"COMPASS_E_SHORT" = "東";
/* East by north, long */
"COMPASS_EbN_LONG" = "東微北";
/* East by north, short */
"COMPASS_EbN_SHORT" = "東微北";
/* East by south, long */
"COMPASS_EbS_LONG" = "東微南";
/* East by south, short */
"COMPASS_EbS_SHORT" = "東微南";
/* East-northeast, long */
"COMPASS_ENE_LONG" = "東北東";
/* East-northeast, short */
"COMPASS_ENE_SHORT" = "東北東";
/* East-southeast, long */
"COMPASS_ESE_LONG" = "東南東";
/* East-southeast, short */
"COMPASS_ESE_SHORT" = "東南東";
/* North, long */
"COMPASS_N_LONG" = "北";
/* North, short */
"COMPASS_N_SHORT" = "北";
/* North by east, long */
"COMPASS_NbE_LONG" = "北微東";
/* North by east, short */
"COMPASS_NbE_SHORT" = "北微東";
/* North by west, long */
"COMPASS_NbW_LONG" = "北微西";
/* North by west, short */
"COMPASS_NbW_SHORT" = "北微西";
/* Northeast, long */
"COMPASS_NE_LONG" = "東北";
/* Northeast, short */
"COMPASS_NE_SHORT" = "東北";
/* Northeast by east, long */
"COMPASS_NEbE_LONG" = "東北微東";
/* Northeast by east, short */
"COMPASS_NEbE_SHORT" = "東北微東";
/* Northeast by north, long */
"COMPASS_NEbN_LONG" = "東北微北";
/* Northeast by north, short */
"COMPASS_NEbN_SHORT" = "東北微北";
/* North-northeast, long */
"COMPASS_NNE_LONG" = "北北東";
/* North-northeast, short */
"COMPASS_NNE_SHORT" = "北北東";
/* North-northwest, long */
"COMPASS_NNW_LONG" = "北北西";
/* North-northwest, short */
"COMPASS_NNW_SHORT" = "北北西";
/* Northwest, long */
"COMPASS_NW_LONG" = "西北";
/* Northwest, short */
"COMPASS_NW_SHORT" = "西北";
/* Northwest by north, long */
"COMPASS_NWbN_LONG" = "西北微北";
/* Northwest by north, short */
"COMPASS_NWbN_SHORT" = "西北微北";
/* Northwest by west, long */
"COMPASS_NWbW_LONG" = "西北微西";
/* Northwest by west, short */
"COMPASS_NWbW_SHORT" = "西北微西";
/* South, long */
"COMPASS_S_LONG" = "南";
/* South, short */
"COMPASS_S_SHORT" = "南";
/* South by east, long */
"COMPASS_SbE_LONG" = "南微東";
/* South by east, short */
"COMPASS_SbE_SHORT" = "南微東";
/* South by west, long */
"COMPASS_SbW_LONG" = "南微西";
/* South by west, short */
"COMPASS_SbW_SHORT" = "南微西";
/* Southeast, long */
"COMPASS_SE_LONG" = "東南";
/* Southeast, short */
"COMPASS_SE_SHORT" = "東南";
/* Southeast by east, long */
"COMPASS_SEbE_LONG" = "東南微東";
/* Southeast by east, short */
"COMPASS_SEbE_SHORT" = "東南微東";
/* Southeast by south, long */
"COMPASS_SEbS_LONG" = "東南微南";
/* Southeast by south, short */
"COMPASS_SEbS_SHORT" = "東南微南";
/* South-southeast, long */
"COMPASS_SSE_LONG" = "南南東";
/* South-southeast, short */
"COMPASS_SSE_SHORT" = "南南東";
/* South-southwest, long */
"COMPASS_SSW_LONG" = "南南西";
/* South-southwest, short */
"COMPASS_SSW_SHORT" = "南南西";
/* Southwest, long */
"COMPASS_SW_LONG" = "西南";
/* Southwest, short */
"COMPASS_SW_SHORT" = "西南";
/* Southwest by south, long */
"COMPASS_SWbS_LONG" = "西南微南";
/* Southwest by south, short */
"COMPASS_SWbS_SHORT" = "西南微南";
/* Southwest by west, long */
"COMPASS_SWbW_LONG" = "西南微西";
/* Southwest by west, short */
"COMPASS_SWbW_SHORT" = "西南微西";
/* West, long */
"COMPASS_W_LONG" = "西";
/* West, short */
"COMPASS_W_SHORT" = "西";
/* West by north, long */
"COMPASS_WbN_LONG" = "西微北";
/* West by north, short */
"COMPASS_WbN_SHORT" = "西微北";
/* West by south, long */
"COMPASS_WbS_LONG" = "西微南";
/* West by south, short */
"COMPASS_WbS_SHORT" = "西微南";
/* West-northwest, long */
"COMPASS_WNW_LONG" = "西北西";
/* West-northwest, short */
"COMPASS_WNW_SHORT" = "西北西";
/* West-southwest, long */
"COMPASS_WSW_LONG" = "西南西";
/* West-southwest, short */
"COMPASS_WSW_SHORT" = "西南西";
/* Degrees format, long */
"COORD_DEG_LONG" = "%d度";
/* Degrees format, medium: {degrees} */
"COORD_DEG_MEDIUM" = "%d°";
/* Degrees format, short: {degrees} */
"COORD_DEG_SHORT" = "%d°";
/* Coordinate format, long: {degrees}{minutes} */
"COORD_DM_LONG" = "%1$@度%2$@分";
/* Coordinate format, medium: {degrees}{minutes} */
"COORD_DM_MEDIUM" = "%1$@度%2$@";
/* Coordinate format, short: {degrees}{minutes} */
"COORD_DM_SHORT" = "%1$@%度2$@";
/* Coordinate format, long: {degrees}{minutes}{seconds} */
"COORD_DMS_LONG" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, medium: {degrees}{minutes}{seconds} */
"COORD_DMS_MEDIUM" = "%1$@度%2$@分%3$@秒";
/* Coordinate format, short: {degrees}{minutes}{seconds} */
"COORD_DMS_SHORT" = "%1$@%度2$@分%3$@秒";
/* East longitude format, long: {longitude} */
"COORD_E_LONG" = "東經%@";
/* East longitude format, medium: {longitude} */
"COORD_E_MEDIUM" = "東經%@";
/* East longitude format, short: {longitude} */
"COORD_E_SHORT" = "%@E";
/* Coordinate pair format, long: {latitude}, {longitude} */
"COORD_FMT_LONG" = "%1$@,%2$@";
/* Coordinate pair format, medium: {latitude}, {longitude} */
"COORD_FMT_MEDIUM" = "%1$@,%2$@";
/* Coordinate pair format, short: {latitude}, {longitude} */
"COORD_FMT_SHORT" = "%1$@,%2$@";
/* Minutes format, long */
"COORD_MIN_LONG" = "%d分";
/* Minutes format, medium: {minutes} */
"COORD_MIN_MEDIUM" = "%d′";
/* Minutes format, short: {minutes} */
"COORD_MIN_SHORT" = "%d′";
/* North latitude format, long: {latitude} */
"COORD_N_LONG" = "北緯%@";
/* North latitude format, medium: {latitude} */
"COORD_N_MEDIUM" = "北緯%@";
/* North latitude format, short: {latitude} */
"COORD_N_SHORT" = "%@N";
/* South latitude format, long: {latitude} */
"COORD_S_LONG" = "南緯%@";
/* South latitude format, medium: {latitude} */
"COORD_S_MEDIUM" = "南緯%@";
/* South latitude format, short: {latitude} */
"COORD_S_SHORT" = "%@S";
/* Seconds format, long */
"COORD_SEC_LONG" = "%d秒";
/* Seconds format, medium: {seconds} */
"COORD_SEC_MEDIUM" = "%d″";
/* Seconds format, short: {seconds} */
"COORD_SEC_SHORT" = "%d″";
/* West longitude format, long: {longitude} */
"COORD_W_LONG" = "西經%@";
/* West longitude format, medium: {longitude} */
"COORD_W_MEDIUM" = "西經%@";
/* West longitude format, short: {longitude} */
"COORD_W_SHORT" = "%@W";
/* OpenStreetMap full name attribution */
"OSM_FULL_NAME" = "OpenStreetMap";
/* OpenStreetMap short name attribution */
"OSM_SHORT_NAME" = "OSM";

View File

@@ -1,83 +0,0 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const path = require('path');
const execFileSync = require('child_process').execFileSync;
const _ = require('lodash');
const keyword = /\bMGL_EXPORT\b/;
let scanned = [];
function hasMissingSymbols(os) {
let missing = false;
let sdk = os === 'iOS' ? 'iphonesimulator' : 'macosx';
let sysroot = execFileSync('xcrun', ['--show-sdk-path', '--sdk', sdk]).toString().trim();
let umbrellaPath = `platform/${os.toLowerCase()}/src/Mapbox.h`;
let docArgs = ['doc', '--objc', umbrellaPath, '--',
'-x', 'objective-c', '-I', 'platform/darwin/src/', '-isysroot', sysroot];
let docStr = execFileSync('sourcekitten', docArgs, { maxBuffer: Infinity }).toString().trim();
let docJson = JSON.parse(docStr);
_.forEach(docJson, function (result) {
_.forEach(result, function (structure, path) {
// Prevent multiple scans of the same file.
if (scanned.indexOf(path) >= 0) return;
scanned.push(path);
const src = fs.readFileSync(path, 'utf8').split('\n');
_.forEach(structure['key.substructure'], function (substructure) {
switch (substructure['key.kind']) {
case 'sourcekitten.source.lang.objc.decl.class':
if (!(keyword.test(src[substructure['key.doc.line'] - 1]) || keyword.test(src[substructure['key.doc.line'] - 2]))) {
console.warn(`- missing symbol export for class ${substructure['key.name']} in ${path}:${substructure['key.doc.line']}:${substructure['key.doc.column']}`);
missing = true;
}
break;
case 'sourcekitten.source.lang.objc.decl.constant':
if (!keyword.test(src[substructure['key.doc.line'] - 1])) {
console.warn(`- missing symbol export for constant ${substructure['key.name']} in ${path}:${substructure['key.doc.line']}:${substructure['key.doc.column']}`);
missing = true;
}
break;
}
});
});
});
return missing;
}
function ensureSourceKittenIsInstalled() {
try {
execFileSync('which', ['sourcekitten']);
} catch (e) {
console.log(`Installing SourceKitten via Homebrew…`);
execFileSync('brew', ['install', 'sourcekitten']);
}
}
if (process.argv.length < 3) {
console.warn(`Usage: ${path.relative(process.cwd(), process.argv[1])} [macOS|iOS] ...`);
process.exit(1);
}
ensureSourceKittenIsInstalled();
let missing = false;
for (var i = 2; i < process.argv.length; i++) {
let os = process.argv[i];
if (os == 'iOS' || os == 'macOS') {
missing |= hasMissingSymbols(os);
} else {
console.warn(`Argument must be one of iOS or macOS`);
process.exit(1);
}
}
if (missing) {
process.exit(1);
} else {
console.warn(`All symbols are correctly exported.`);
}

View File

@@ -1,925 +0,0 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const ejs = require('ejs');
const _ = require('lodash');
const colorParser = require('csscolorparser');
const assert = require('assert');
require('../../../scripts/style-code');
const cocoaConventions = require('./style-spec-cocoa-conventions-v8.json');
const prefix = 'MGL';
const suffix = 'StyleLayer';
let spec = _.merge(require('../../../scripts/style-spec'), require('./style-spec-overrides-v8.json'));
// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008
delete spec.layout_circle["circle-sort-key"]
delete spec.layout_line["line-sort-key"]
delete spec.layout_fill["fill-sort-key"]
class ConventionOverride {
constructor(val) {
if (typeof val === 'string') {
this.name_ = val;
this.enumName_ = null;
} else if (val instanceof Object) {
this.name_ = val.name;
this.enumName_ = val.enumName;
} else {
assert(false);
}
}
set name(name_) { this.name_ = name_; }
get name() { return this.name_; }
get enumName() { return this.enumName_ || this.name_; }
}
// Rename properties and keep `original` for use with setters and getters
_.forOwn(cocoaConventions, function (properties, kind) {
_.forOwn(properties, function (newConvention, oldName) {
let conventionOverride = new ConventionOverride(newConvention);
let property = spec[kind][oldName];
if (conventionOverride.name.startsWith('is-')) {
property.getter = conventionOverride.name;
conventionOverride.name = conventionOverride.name.substr(3);
}
// Override enum name based on style-spec-cocoa-conventions-v8.json
property.enumName = conventionOverride.enumName;
if (conventionOverride.name !== oldName) {
property.original = oldName;
delete spec[kind][oldName];
spec[kind][conventionOverride.name] = property;
}
// Update cross-references to this property in other properties'
// documentation and requirements.
let renameCrossReferences = function (property, name) {
property.doc = property.doc.replace(new RegExp('`' + oldName + '`', 'g'), '`' + conventionOverride.name + '`');
let requires = property.requires || [];
for (let i = 0; i < requires.length; i++) {
if (requires[i] === oldName) {
property.requires[i] = conventionOverride.name;
}
if (typeof requires[i] !== 'string') {
_.forOwn(requires[i], function (values, name, require) {
if (name === oldName) {
require[conventionOverride.name] = values;
delete require[name];
}
});
}
}
};
_.forOwn(spec[kind.replace(/^layout_/, 'paint_')], renameCrossReferences);
_.forOwn(spec[kind.replace(/^paint_/, 'layout_')], renameCrossReferences);
})
});
String.prototype.wrap = function (cols, indent) {
let wrapRe = new RegExp(`(.{1,${cols - indent}})(?: +|\n|$)`, "gm");
return this.replace(wrapRe, "$1\n").replace(/\s+$/, "").indent(indent);
};
String.prototype.indent = function (cols) {
return this.replace(/^|\n/g, "$&" + " ".repeat(cols));
};
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();
});
};
// Returns true only if property is an enum or if it is an array
// property with uniquely defined enum.
global.definesEnum = function(property, allProperties) {
if (property.type === "enum") {
return true;
}
if (property.type === 'array' && property.value === 'enum') {
const uniqueArrayEnum = (prop, enums) => {
if (prop.value !== 'enum') return false;
const enumsEqual = (val1, val2) => val1.length === val1.length && val1.every((val, i) => val === val2[i]);
return enums.filter(e => enumsEqual(Object.keys(prop.values).sort(), Object.keys(e.values).sort())).length == 0;
};
const allEnumProperties = _(allProperties).filter({'type': 'enum'}).value();
const uniqueArrayEnumProperties = _(allProperties).filter({'type': 'array'}).filter(prop => uniqueArrayEnum(prop, allEnumProperties)).value();
return _(uniqueArrayEnumProperties).filter({'name': property.name}).value().length != 0;
}
return false;
}
global.objCName = function (property) {
return camelizeWithLeadingLowercase(property.name);
};
global.objCGetter = function (property) {
return camelizeWithLeadingLowercase(property.getter || property.name);
};
global.objCType = function (layerType, propertyName) {
return `${prefix}${camelize(propertyName)}`;
};
global.arrayType = function (property) {
return property.type === 'array' ? originalPropertyName(property).split('-').pop() : false;
};
global.testImplementation = function (property, layerType, isFunction) {
let helperMsg = testHelperMessage(property, layerType, isFunction);
return `layer.${objCName(property)} = [MGLRuntimeStylingHelper ${helperMsg}];`;
};
global.objCTestValue = function (property, layerType, arraysAsStructs, indent) {
let propertyName = originalPropertyName(property);
switch (property.type) {
case 'boolean':
return property.default ? '@"false"' : '@"true"';
case 'number':
return '@"1"';
case 'formatted':
// Special 'string' case to handle constant expression text-field that automatically
// converts Formatted back to string.
return layerType === 'string' ?
`@"'${_.startCase(propertyName)}'"` :
`@"${_.startCase(propertyName)}"`;
case 'resolvedImage':
return layerType === 'string' ?
`@"${_.startCase(propertyName)}"` :
`@"MGL_FUNCTION('image', '${_.startCase(propertyName)}')"`;
case 'string':
return `@"'${_.startCase(propertyName)}'"`;
case 'enum':
return `@"'${_.last(_.keys(property.values))}'"`;
case 'color':
return '@"%@", [MGLColor redColor]';
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return '@"{1, 2}"';
case 'font':
return `@"{'${_.startCase(propertyName)}', '${_.startCase(_.reverse(propertyName.split('')).join(''))}'}"`;
case 'padding': {
if (arraysAsStructs) {
let iosValue = '[NSValue valueWithUIEdgeInsets:UIEdgeInsetsMake(1, 1, 1, 1)]'.indent(indent * 4);
let macosValue = '[NSValue valueWithEdgeInsets:NSEdgeInsetsMake(1, 1, 1, 1)]'.indent(indent * 4);
return `@"%@",\n#if TARGET_OS_IPHONE\n${iosValue}\n#else\n${macosValue}\n#endif\n${''.indent((indent - 1) * 4)}`;
}
return '@"{1, 1, 1, 1}"';
}
case 'offset':
case 'translate': {
if (arraysAsStructs) {
let iosValue = '[NSValue valueWithCGVector:CGVectorMake(1, 1)]'.indent(indent * 4);
let macosValue = '[NSValue valueWithMGLVector:CGVectorMake(1, -1)]'.indent(indent * 4);
return `@"%@",\n#if TARGET_OS_IPHONE\n${iosValue}\n#else\n${macosValue}\n#endif\n${''.indent((indent - 1) * 4)}`;
}
return '@"{1, 1}"';
}
case 'anchor':
return `@"{'top','bottom'}"`;
case 'mode':
return `@"{'horizontal','vertical'}"`;
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.mbglTestValue = function (property, layerType) {
let propertyName = originalPropertyName(property);
switch (property.type) {
case 'boolean':
return property.default ? 'false' : 'true';
case 'number':
return '1.0';
case 'formatted':
case 'string':
case 'resolvedImage':
return `"${_.startCase(propertyName)}"`;
case 'enum': {
let type = camelize(originalPropertyName(property));
if (/-translate-anchor$/.test(originalPropertyName(property))) {
type = 'TranslateAnchor';
}
if (/-(rotation|pitch)-alignment$/.test(originalPropertyName(property))) {
type = 'Alignment';
}
if (/^(text|icon)-anchor$/.test(originalPropertyName(property))) {
type = 'SymbolAnchor'
}
let value = camelize(_.last(_.keys(property.values)));
if (property['light-property']) {
return `mbgl::style::Light${type}Type::${value}`;
}
return `mbgl::style::${type}Type::${value}`;
}
case 'color':
return '{ 1, 0, 0, 1 }';
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return '{1, 2}';
case 'font':
return `{ "${_.startCase(propertyName)}", "${_.startCase(_.reverse(propertyName.split('')).join(''))}" }`;
case 'padding':
return '{ 1, 1, 1, 1 }';
case 'offset':
case 'translate':
return '{ 1, 1 }';
case 'anchor':
return '{ mbgl::style::SymbolAnchorType::Top, mbgl::style::SymbolAnchorType::Bottom }';
case 'mode':
return '{ mbgl::style::TextWritingModeType::Horizontal, mbgl::style::TextWritingModeType::Vertical }';
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.mbglExpressionTestValue = function (property, layerType) {
let propertyName = originalPropertyName(property);
switch (property.type) {
case 'enum':
return `"${_.last(_.keys(property.values))}"`;
case 'color':
return 'mbgl::Color(1, 0, 0, 1)';
case 'array':
switch (arrayType(property)) {
case 'anchor':
return `{"top", "bottom"}`;
case 'mode':
return `{"horizontal", "vertical"}`;
default:
break;
}
default:
return global.mbglTestValue(property, layerType);
}
};
global.testGetterImplementation = function (property, layerType, isFunction) {
let helperMsg = testHelperMessage(property, layerType, isFunction);
let value = `[MGLRuntimeStylingHelper ${helperMsg}]`;
if (property.type === 'enum') {
if (isFunction) {
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
}
return `XCTAssert([gLayer.${objCName(property)} isKindOfClass:[MGLConstantStyleValue class]]);
XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
}
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
};
global.testHelperMessage = function (property, layerType, isFunction) {
let fnSuffix = isFunction ? 'Function' : '';
switch (property.type) {
case 'boolean':
return 'testBool' + fnSuffix;
case 'number':
return 'testNumber' + fnSuffix;
case 'formatted':
case 'string':
case 'resolvedImage':
return 'testString' + fnSuffix;
case 'enum':
let objCType = global.objCType(layerType, property.name);
let objCEnum = `${objCType}${camelize(Object.keys(property.values)[Object.keys(property.values).length-1])}`;
return `testEnum${fnSuffix}:${objCEnum} type:@encode(${objCType})`;
case 'color':
return 'testColor' + fnSuffix;
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return 'testDashArray' + fnSuffix;
case 'font':
return 'testFont' + fnSuffix;
case 'padding':
return 'testPadding' + fnSuffix;
case 'offset':
case 'translate':
return 'testOffset' + fnSuffix;
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.propertyDoc = function (propertyName, property, layerType, kind) {
// Match references to other property names & values.
// Requires the format 'When `foo` is set to `bar`,'.
let doc = property.doc.replace(/`([^`]+?)` is set to `([^`]+?)`(?: or `([^`]+?)`)?/g, function (m, peerPropertyName, propertyValue, secondPropertyValue, offset, str) {
let otherProperty = camelizeWithLeadingLowercase(peerPropertyName);
let otherValue = objCType(layerType, peerPropertyName) + camelize(propertyValue);
if (property.type == 'array' && kind == 'light') {
otherValue = propertyValue;
}
const firstPropertyValue = '`' + `${otherProperty}` + '` is set to `' + `${otherValue}` + '`';
if (secondPropertyValue) {
return firstPropertyValue + ' or `' +
objCType(layerType, peerPropertyName) + camelize(secondPropertyValue) +
'`';
} else {
return firstPropertyValue;
}
});
// Match references to our own property values.
// Requires the format 'is equivalent to `bar`'.
doc = doc.replace(/is equivalent to `(.+?)`/g, function(m, propertyValue, offset, str) {
propertyValue = objCType(layerType, propertyName) + camelize(propertyValue);
return 'is equivalent to `' + propertyValue + '`';
});
// Format everything else: our property name & its possible values.
// Requires symbols to be surrounded by backticks.
doc = doc.replace(/`(.+?)`/g, function (m, symbol, offset, str) {
if (kind === 'enum') {
let layoutProperties = spec[`layout_${layerType}`] || [];
let paintProperties = spec[`paint_${layerType}`] || [];
if (symbol in layoutProperties || symbol in paintProperties) {
return '`MGL' + camelize(layerType) + 'StyleLayer.' + camelizeWithLeadingLowercase(symbol) + '`';
}
}
if ('values' in property && Object.keys(property.values).indexOf(symbol) !== -1) {
let objCType = global.objCType(layerType, property.name);
return '`' + `${objCType}${camelize(symbol)}` + '`';
}
if (str.substr(offset - 4, 3) !== 'CSS') {
symbol = camelizeWithLeadingLowercase(symbol);
}
return '`' + symbol + '`';
});
// Format references to units.
if ('units' in property) {
if (!property.units.match(/s$/)) {
property.units += 's';
}
doc += `\n\nThis property is measured in ${property.units}.`;
}
doc = doc.replace(/(p)ixel/gi, '$1oint').replace(/(\d)px\b/g, '$1pt');
if (kind !== 'enum') {
if ('default' in property) {
doc += `\n\nThe default value of this property is ${propertyDefault(property, layerType)}.`;
if (!property.required && kind != 'light') {
doc += ' Set this property to `nil` to reset it to the default value.';
}
}
if ('requires' in property) {
doc += '\n\n' + propertyReqs(property, spec[`${kind}_${layerType}`], layerType);
}
if ('original' in property) {
let anchor;
switch (kind) {
case 'layout':
anchor = `layout-${layerType}-${property.original}`;
break;
case 'paint':
anchor = `paint-${property.original}`;
break;
}
doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#${anchor}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
}
doc += '\n\nYou can set this property to an expression containing any of the following:\n\n';
doc += `* Constant ${describeType(property)} values`;
if ('minimum' in property) {
if ('maximum' in property) {
doc += ` between ${formatNumber(property.minimum)} and ${formatNumber(property.maximum)} inclusive`;
} else {
doc += ` no less than ${formatNumber(property.minimum)}`;
}
} else if ('maximum' in property) {
doc += ` no greater than ${formatNumber(property.maximum)}`;
}
doc += '\n';
if (property.type === 'enum') {
doc += '* Any of the following constant string values:\n';
doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
} else if (property.type === 'array' && property.value === 'enum') {
doc += '* Constant array, in which each element is any of the following constant string values:\n';
doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
}
if (property.type === 'formatted') {
doc += '* Formatted expressions.\n';
}
doc += '* Predefined functions, including mathematical and string operators\n' +
'* Conditional expressions\n' +
'* Variable assignments and references to assigned variables\n';
const inputVariable = property.expression && property['property-type'] === 'color-ramp' ?
'$' + camelizeWithLeadingLowercase(property.expression.parameters[0]) : '$zoomLevel';
if (isDataDriven(property)) {
doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable and/or feature attributes\n`;
} else if (property.expression && property.expression.interpolated) {
doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable\n\n` +
'This property does not support applying interpolation or step functions to feature attributes.';
} else {
doc += `* Step functions applied to the \`${inputVariable}\` variable\n\n` +
`This property does not support applying interpolation functions to the \`${inputVariable}\` variable or applying interpolation or step functions to feature attributes.`;
}
}
return doc;
};
global.propertyExample = function (property) {
return property.examples;
};
global.isDataDriven = function (property) {
return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven';
};
global.propertyReqs = function (property, propertiesByName, type) {
return 'This property is only applied to the style if ' + property.requires.map(function (req) {
if (typeof req === 'string') {
return '`' + camelizeWithLeadingLowercase(req) + '` is non-`nil`';
} else if ('!' in req) {
return '`' + camelizeWithLeadingLowercase(req['!']) + '` is set to `nil`';
} else {
let name = Object.keys(req)[0];
if (name === 'source')
return 'the data source requirements are met';
return '`' + camelizeWithLeadingLowercase(name) + '` is set to an expression that evaluates to ' + describeValue(req[name], propertiesByName[name], type);
}
}).join(', and ') + '. Otherwise, it is ignored.';
};
global.parseColor = function (str) {
let color = colorParser.parseCSSColor(str);
return {
r: color[0] / 255,
g: color[1] / 255,
b: color[2] / 255,
a: color[3],
};
};
global.describeType = function (property) {
switch (property.type) {
case 'boolean':
return 'Boolean';
case 'number':
return 'numeric';
case 'formatted':
case 'string':
case 'resolvedImage':
return 'string';
case 'enum':
return '`MGL' + camelize(property.name) + '`';
case 'color':
return '`UIColor`';
case 'array':
switch (arrayType(property)) {
case 'padding':
return '`UIEdgeInsets`';
case 'offset':
case 'translate':
return '`CGVector`';
case 'position':
return '`MGLSphericalPosition`';
case 'anchor':
return '`MGLTextAnchor` array';
case 'mode':
return '`MGLTextWritingMode` array';
default:
return 'array';
}
break;
default:
throw new Error(`unknown type for ${property.name}`);
}
}
global.describeValue = function (value, property, layerType) {
if (Array.isArray(value) && property.type !== 'array' && property.type !== 'enum') {
switch (value[0]) {
case 'interpolate': {
let curveType = value[1][0];
let minimum = describeValue(value[3 + value.length % 2], property, layerType);
let maximum = describeValue(_.last(value), property, layerType);
return `${curveType.match(/^[aeiou]/i) ? 'an' : 'a'} ${curveType} interpolation expression ranging from ${minimum} to ${maximum}`;
}
default:
throw new Error(`No description available for ${value[0]} expression in ${property.name} of ${layerType}.`);
}
}
switch (property.type) {
case 'boolean':
return value ? '`YES`' : '`NO`';
case 'number':
return 'the float ' + '`' + formatNumber(value) + '`';
case 'formatted':
case 'string':
case 'resolvedImage':
if (value === '') {
return 'the empty string';
}
return 'the string `' + value + '`';
case 'enum':
let displayValue;
if (Array.isArray(value)) {
let separator = (value.length === 2) ? ' ' : ', ';
displayValue = value.map((possibleValue, i) => {
let conjunction = '';
if (value.length === 2 && i === 0) conjunction = 'either ';
if (i === value.length - 1) conjunction = 'or ';
let objCType = global.objCType(layerType, property.name);
return `${conjunction}\`${objCType}${camelize(possibleValue)}\``;
}).join(separator);
} else {
displayValue = `\`${value}\``;
}
return displayValue;
case 'color':
let color = parseColor(value);
if (!color) {
throw new Error(`unrecognized color format in default value of ${property.name}`);
}
if (color.r === 0 && color.g === 0 && color.b === 0 && color.a === 0) {
return '`UIColor.clearColor`';
}
if (color.r === 0 && color.g === 0 && color.b === 0 && color.a === 1) {
return '`UIColor.blackColor`';
}
if (color.r === 1 && color.g === 1 && color.b === 1 && color.a === 1) {
return '`UIColor.whiteColor`';
}
return 'a `UIColor`' + ` object whose RGB value is ${formatNumber(color.r)}, ${formatNumber(color.g)}, ${formatNumber(color.b)} and whose alpha value is ${formatNumber(color.a)}`;
case 'array':
let units = property.units || '';
if (units) {
units = ` ${units}`.replace(/pixel/, 'point');
}
switch (arrayType(property)) {
case 'padding':
if (value[0] === 0 && value[1] === 0 && value[2] === 0 && value[3] === 0) {
return 'an `NSValue` object containing `UIEdgeInsetsZero`';
}
return 'an `NSValue` object containing a `UIEdgeInsets` struct set to' + ` ${formatNumber(value[0])}${units} on the top, ${formatNumber(value[3])}${units} on the left, ${formatNumber(value[2])}${units} on the bottom, and ${formatNumber(value[1])}${units} on the right`;
case 'offset':
case 'translate':
return 'an `NSValue` object containing a `CGVector` struct set to' + ` ${formatNumber(value[0])}${units} rightward and ${formatNumber(value[1])}${units} downward`;
case 'position':
return 'an `MGLSphericalPosition` struct set to' + ` ${formatNumber(value[0])} radial, ${formatNumber(value[1])} azimuthal and ${formatNumber(value[2])} polar`;
default:
return 'the array `' + value.join('`, `') + '`';
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.formatNumber = function (num) {
return num.toLocaleString().replace('-', '\u2212');
}
global.propertyDefault = function (property, layerType) {
if (property.name === 'heatmap-color') {
return 'an expression that evaluates to a rainbow color scale from blue to red';
} else {
return 'an expression that evaluates to ' + describeValue(property.default, property, layerType);
}
};
global.originalPropertyName = function (property) {
return property.original || property.name;
};
global.enumName = function (property) {
return property.enumName || property.name;
};
global.propertyType = function (property) {
switch (property.type) {
case 'boolean':
return 'NSNumber *';
case 'number':
return 'NSNumber *';
case 'formatted':
case 'string':
case 'resolvedImage':
return 'NSString *';
case 'enum':
return 'NSValue *';
case 'color':
return 'MGLColor *';
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return 'NSArray<NSNumber *> *';
case 'font':
return 'NSArray<NSString *> *';
case 'padding':
case 'position':
case 'offset':
case 'translate':
return 'NSValue *';
case 'anchor':
case 'mode':
return 'NSArray<NSValue *> *';
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.isInterpolatable = function (property) {
const type = property.type === 'array' ? property.value : property.type;
return type !== 'boolean' &&
type !== 'enum' &&
type !== 'string' &&
type !== 'resolvedImage' &&
type !== 'formatted';
};
global.valueTransformerArguments = function (property) {
let objCType = propertyType(property);
switch (property.type) {
case 'boolean':
return ['bool', objCType];
case 'number':
return ['float', objCType];
case 'formatted':
return ['mbgl::style::expression::Formatted', objCType];
case 'resolvedImage':
return ['mbgl::style::expression::Image', objCType];
case 'string':
return ['std::string', objCType];
case 'enum':
return [mbglType(property), 'NSValue *', mbglType(property), `MGL${camelize(property.name)}`];
case 'color':
return ['mbgl::Color', objCType];
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return ['std::vector<float>', objCType, 'float'];
case 'font':
return ['std::vector<std::string>', objCType, 'std::string'];
case 'padding':
return ['std::array<float, 4>', objCType];
case 'position':
return ['mbgl::style::Position', objCType];
case 'offset':
case 'translate':
return ['std::array<float, 2>', objCType];
case 'anchor':
return ['std::vector<mbgl::style::SymbolAnchorType>', objCType, 'mbgl::style::SymbolAnchorType', 'MGLTextAnchor'];
case 'mode':
return ['std::vector<mbgl::style::TextWritingModeType>', objCType, 'mbgl::style::TextWritingModeType', 'MGLTextWritingMode'];
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.mbglType = function(property) {
switch (property.type) {
case 'boolean':
return 'bool';
case 'number':
return 'float';
case 'formatted':
return 'mbgl::style::expression::Formatted';
case 'resolvedImage':
return 'mbgl::style::expression::Image';
case 'string':
return 'std::string';
case 'enum': {
let type = camelize(originalPropertyName(property));
if (property['light-property']) {
return `mbgl::style::Light${type}Type`;
}
if (/-translate-anchor$/.test(originalPropertyName(property))) {
type = 'TranslateAnchor';
}
if (/-(rotation|pitch)-alignment$/.test(originalPropertyName(property))) {
type = 'Alignment';
}
if (/^(text|icon)-anchor$/.test(originalPropertyName(property))) {
type = 'SymbolAnchor'
}
return `mbgl::style::${type}Type`;
}
case 'color':
return 'mbgl::Color';
case 'array':
switch (arrayType(property)) {
case 'dasharray':
return 'std::vector<float>';
case 'font':
return 'std::vector<std::string>';
case 'padding':
return 'std::array<float, 4>';
case 'offset':
case 'translate':
return 'std::array<float, 2>';
case 'position':
return 'mbgl::style::Position';
case 'anchor':
return 'std::vector<mbgl::style::SymbolAnchorType>';
case 'mode':
return 'std::vector<mbgl::style::TextWritingModeType>';
default:
throw new Error(`unknown array type for ${property.name}`);
}
default:
throw new Error(`unknown type for ${property.name}`);
}
};
global.initLayer = function (layerType) {
if (layerType == "background") {
return `_layer = new mbgl::style::${camelize(layerType)}Layer(identifier.UTF8String);`
} else {
return `_layer = new mbgl::style::${camelize(layerType)}Layer(identifier.UTF8String, source.identifier.UTF8String);`
}
};
global.setSourceLayer = function() {
return `_layer->setSourceLayer(sourceLayer.UTF8String);`
};
const lightProperties = Object.keys(spec['light']).reduce((memo, name) => {
var property = spec['light'][name];
property.name = name;
property['light-property'] = true;
memo.push(property);
return memo;
}, []);
const lightDoc = spec['light-cocoa-doc'];
const lightType = 'light';
const layerH = ejs.compile(fs.readFileSync('platform/darwin/src/MGLStyleLayer.h.ejs', 'utf8'), { strict: true });
const layerPrivateH = ejs.compile(fs.readFileSync('platform/darwin/src/MGLStyleLayer_Private.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/test/MGLStyleLayerTests.mm.ejs', 'utf8'), { strict: true});
const forStyleAuthorsMD = ejs.compile(fs.readFileSync('platform/darwin/docs/guides/For Style Authors.md.ejs', 'utf8'), { strict: true });
const ddsGuideMD = ejs.compile(fs.readFileSync('platform/darwin/docs/guides/Migrating to Expressions.md.ejs', 'utf8'), { strict: true });
const templatesMD = ejs.compile(fs.readFileSync('platform/darwin/docs/guides/Tile URL Templates.md.ejs', 'utf8'), { strict: true });
const lightH = ejs.compile(fs.readFileSync('platform/darwin/src/MGLLight.h.ejs', 'utf8'), {strict: true});
const lightM = ejs.compile(fs.readFileSync('platform/darwin/src/MGLLight.mm.ejs', 'utf8'), {strict: true});
const testLight = ejs.compile(fs.readFileSync('platform/darwin/test/MGLLightTest.mm.ejs', 'utf8'), { strict: true});
writeIfModified(`platform/darwin/src/MGLLight.h`, duplicatePlatformDecls(lightH({ properties: lightProperties, doc: lightDoc, type: lightType })));
writeIfModified(`platform/darwin/src/MGLLight.mm`, lightM({ properties: lightProperties, doc: lightDoc, type: lightType }));
writeIfModified(`platform/darwin/test/MGLLightTest.mm`, testLight({ properties: lightProperties, doc: lightDoc, type: lightType }));
const layers = _(spec.layer.type.values).map((value, layerType) => {
const layoutProperties = Object.keys(spec[`layout_${layerType}`]).reduce((memo, name) => {
if (name !== 'visibility') {
spec[`layout_${layerType}`][name].name = name;
memo.push(spec[`layout_${layerType}`][name]);
}
return memo;
}, []);
const paintProperties = Object.keys(spec[`paint_${layerType}`]).reduce((memo, name) => {
spec[`paint_${layerType}`][name].name = name;
memo.push(spec[`paint_${layerType}`][name]);
return memo;
}, []);
return {
doc: spec.layer.type.values[layerType].doc,
examples: spec.layer.type.values[layerType].examples,
type: layerType,
layoutProperties: _.sortBy(layoutProperties, ['name']),
paintProperties: _.sortBy(paintProperties, ['name']),
};
}).sortBy(['type']).value();
function duplicatePlatformDecls(src) {
// Look for a documentation comment that contains “MGLColor” or “UIColor”
// and the subsequent function, method, or property declaration. Try not to
// match greedily.
return src.replace(/(\/\*\*(?:\*[^\/]|[^*])*?\b(?:MGL|NS|UI)Color\b[\s\S]*?\*\/)(\s*.+?;)/g,
(match, comment, decl) => {
let macosComment = comment.replace(/\b(?:MGL|UI)Color\b/g, 'NSColor')
// Use the correct indefinite article.
.replace(/\ba(\s+`?NSColor)\b/gi, 'an$1');
let iosDecl = decl.replace(/\bMGLColor\b/g, 'UIColor');
let macosDecl = decl.replace(/\b(?:MGL|UI)Color\b/g, 'NSColor');
return `\
#if TARGET_OS_IPHONE
${comment}${iosDecl}
#else
${macosComment}${macosDecl}
#endif`;
})
// Do the same for CGVector-typed properties.
.replace(/(\/\*\*(?:\*[^\/]|[^*])*?\b(?:CGVector|UIEdgeInsets(?:Zero)?)\b[\s\S]*?\*\/)(\s*.+?;)/g,
(match, comment, decl) => {
let macosComment = comment.replace(/\bdownward\b/g, 'upward')
.replace(/\bUI(EdgeInsets(?:Zero)?)\b/g, 'NS$1');
return `\
#if TARGET_OS_IPHONE
${comment}${decl}
#else
${macosComment}${decl}
#endif`;
});
}
var renamedPropertiesByLayerType = {};
for (var layer of layers) {
layer.properties = _.concat(layer.layoutProperties, layer.paintProperties);
let enumProperties = _.filter(layer.properties, prop => definesEnum(prop, layer.properties));
if (enumProperties.length) {
layer.enumProperties = enumProperties;
}
let renamedProperties = {};
_.assign(renamedProperties, _.filter(layer.properties, prop => 'original' in prop || 'getter' in prop));
if (!_.isEmpty(renamedProperties)) {
renamedPropertiesByLayerType[layer.type] = renamedProperties;
}
writeIfModified(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.h`, duplicatePlatformDecls(layerH(layer)));
writeIfModified(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}_Private.h`, duplicatePlatformDecls(layerPrivateH(layer)));
writeIfModified(`platform/darwin/src/${prefix}${camelize(layer.type)}${suffix}.mm`, layerM(layer));
writeIfModified(`platform/darwin/test/${prefix}${camelize(layer.type)}${suffix}Tests.mm`, testLayers(layer));
}
// Extract examples for guides from unit tests.
let examplesSrc = fs.readFileSync('platform/darwin/test/MGLDocumentationGuideTests.swift', 'utf8');
const exampleRegex = /func test([\w$]+)\s*\(\)\s*\{[^]*?\n([ \t]+)\/\/#-example-code\n([^]+?)\n\2\/\/#-end-example-code\n/gm;
let examples = {};
let match;
while ((match = exampleRegex.exec(examplesSrc)) !== null) {
let testMethodName = match[1],
indentation = match[2],
exampleCode = match[3];
// Trim leading whitespace from the example code.
exampleCode = exampleCode.replace(new RegExp('^' + indentation, 'gm'), '');
examples[testMethodName] = exampleCode;
}
global.guideExample = function (guide, exampleId, os) {
// Get the contents of the test method whose name matches the symbol path.
let testMethodName = `${guide}$${exampleId}`;
let example = examples[testMethodName];
if (!example) {
console.error(`MGLDocumentationExampleTests.test${testMethodName}() not found.`);
process.exit(1);
}
// Resolve conditional compilation blocks.
example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\b\n?/gm,
function (m, indentation, ifOs, ifCase, elseCase) {
return (os === ifOs ? ifCase : elseCase).replace(new RegExp('^ ', 'gm'), '');
}).replace(/\n$/, '');
return '```swift\n' + example + '\n```';
};
writeIfModified(`platform/ios/docs/guides/For Style Authors.md`, forStyleAuthorsMD({
os: 'iOS',
renamedProperties: renamedPropertiesByLayerType,
layers: layers,
}));
writeIfModified(`platform/macos/docs/guides/For Style Authors.md`, forStyleAuthorsMD({
os: 'macOS',
renamedProperties: renamedPropertiesByLayerType,
layers: layers,
}));
writeIfModified(`platform/ios/docs/guides/Migrating to Expressions.md`, ddsGuideMD({
os: 'iOS',
}));
writeIfModified(`platform/macos/docs/guides/Migrating to Expressions.md`, ddsGuideMD({
os: 'macOS',
}));
writeIfModified(`platform/ios/docs/guides/Tile URL Templates.md`, templatesMD({
os: 'iOS',
}));
writeIfModified(`platform/macos/docs/guides/Tile URL Templates.md`, templatesMD({
os: 'macOS',
}));

View File

@@ -1,56 +0,0 @@
{
"layout_symbol": {
"icon-allow-overlap": "icon-allows-overlap",
"icon-image": "icon-image-name",
"icon-ignore-placement": "icon-ignores-placement",
"icon-keep-upright": "keeps-icon-upright",
"icon-optional": "is-icon-optional",
"icon-rotate": "icon-rotation",
"icon-size": "icon-scale",
"symbol-avoid-edges": "symbol-avoids-edges",
"text-allow-overlap": "text-allows-overlap",
"text-field": "text",
"text-font": "text-font-names",
"text-ignore-placement": "text-ignores-placement",
"text-justify": "text-justification",
"text-keep-upright": "keeps-text-upright",
"text-max-angle": "maximum-text-angle",
"text-max-width": "maximum-text-width",
"text-optional": "is-text-optional",
"text-rotate": "text-rotation",
"text-size": "text-font-size",
"text-writing-mode": {"name": "text-writing-modes", "enumName": "text-writing-mode"}
},
"paint_circle": {
"circle-pitch-scale": "circle-scale-alignment",
"circle-translate": "circle-translation",
"circle-translate-anchor": "circle-translation-anchor"
},
"paint_fill": {
"fill-antialias": "is-fill-antialiased",
"fill-translate": "fill-translation",
"fill-translate-anchor": "fill-translation-anchor"
},
"paint_fill-extrusion": {
"fill-extrusion-translate": "fill-extrusion-translation",
"fill-extrusion-translate-anchor": "fill-extrusion-translation-anchor",
"fill-extrusion-vertical-gradient": "fill-extrusion-has-vertical-gradient"
},
"paint_raster": {
"raster-brightness-min": "minimum-raster-brightness",
"raster-brightness-max": "maximum-raster-brightness",
"raster-hue-rotate": "raster-hue-rotation",
"raster-resampling": "raster-resampling-mode"
},
"paint_line": {
"line-dasharray": "line-dash-pattern",
"line-translate": "line-translation",
"line-translate-anchor": "line-translation-anchor"
},
"paint_symbol": {
"icon-translate": "icon-translation",
"icon-translate-anchor": "icon-translation-anchor",
"text-translate": "text-translation",
"text-translate-anchor": "text-translation-anchor"
}
}

View File

@@ -1,148 +0,0 @@
{
"light-cocoa-doc": "An `MGLLight` object represents the light source for extruded geometries in `MGLStyle`.\n\n### Example\n```swift\n```\n\n#### Related examples\nSee the <a href=\"https://docs.mapbox.com/ios/maps/examples/light-example/\">Adjust light of 3D buildings</a> to learn how to create and modify the light source for 3D geometries.",
"light": {
"position": {
"doc": "Position of the `MGLLight` source relative to lit (extruded) geometries, in a `MGLSphericalPosition` struct [radial coordinate, azimuthal angle, polar angle] where radial indicates the distance from the center of the base of an object to its light, azimuthal indicates the position of the light relative to 0° (0° when `MGLLight.anchor` is set to `MGLLightAnchorViewport` corresponds to the top of the viewport, or 0° when `MGLLight.anchor` is set to `MGLLightAnchorMap` corresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/light-example/\">Adjust light of 3D buildings</a> example to learn how to create and modify the position of value of an `MGLLight` object for 3D geometries."
}
},
"layer": {
"type": {
"values": {
"fill": {
"doc": "An `MGLFillStyleLayer` is a style layer that renders one or more filled (and optionally stroked) polygons on the map.\n\nUse a fill style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLPolygon`, `MGLPolygonFeature`, `MGLMultiPolygon`, or `MGLMultiPolygonFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/select-layer/\">Select a feature within a layer</a> example to learn how to use a `TERNARY` expression to modify the `fillOpacity` of an `MGLFillStyleLayer` object. See the <a href=\"https://docs.mapbox.com/ios/maps/examples/fill-pattern/\">Add a pattern to a polygon</a> example to learn how to use an image to add pattern to the features styled by a `MGLFillStyleLayer`."
},
"fill-extrusion": {
"doc": "An `MGLFillExtrusionStyleLayer` is a style layer that renders one or more 3D extruded polygons on the map.\n\nUse a fill-extrusion style layer to configure the visual appearance of polygon or multipolygon features. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLPolygon`, `MGLPolygonFeature`, `MGLMultiPolygon`, or `MGLMultiPolygonFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/extrusions/\">Display 3D buildings</a> example to learn how to add and style 3D layers on a map."
},
"line": {
"doc": "An `MGLLineStyleLayer` is a style layer that renders one or more stroked polylines on the map.\n\nUse a line style layer to configure the visual appearance of polyline or multipolyline features. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLPolyline`, `MGLPolylineFeature`, `MGLMultiPolyline`, or `MGLMultiPolylineFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/shape-collection/\">Add multiple shapes from a single shape source</a> example to learn how to add a line to your map using this style layer. See the <a href=\"https://docs.mapbox.com/ios/maps/examples/runtime-add-line/\">Add a line style layer from GeoJSON</a> example to learn how to add and style line data to an `MGLMapView` object at runtime."
},
"symbol": {
"doc": "An `MGLSymbolStyleLayer` is a style layer that renders icon and text labels at points or along lines on the map.\n\nUse a symbol style layer to configure the visual appearance of feature labels. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLShape` or `MGLFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/runtime-multiple-annotations/\">Dynamically style interactive points</a> and <a href=\"https://docs.mapbox.com/ios/maps/examples/clustering-with-images/\">Use images to cluster point data</a> examples learn how to style data on your map using this layer."
},
"circle": {
"doc": "An `MGLCircleStyleLayer` is a style layer that renders one or more filled circles on the map.\n\nUse a circle style layer to configure the visual appearance of point or point collection features. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLPointAnnotation`, `MGLPointFeature`, `MGLPointCollection`, or `MGLPointCollectionFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.\n\nA circle style layer renders circles whose radii are measured in screen units. To display circles on the map whose radii correspond to real-world distances, use many-sided regular polygons and configure their appearance using an `MGLFillStyleLayer` object.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/dds-circle-layer/\">Data-driven circles</a>, <a href=\"https://docs.mapbox.com/ios/maps/examples/shape-collection/\">Add multiple shapes from a single shape source</a>, and <a href=\"https://docs.mapbox.com/ios/maps/examples/clustering/\">Cluster point data</a> examples to learn how to add circles to your map using this style layer."
},
"heatmap": {
"doc": "An `MGLHeatmapStyleLayer` is a style layer that renders a <a href=\"https://en.wikipedia.org/wiki/Heat_map\">heatmap</a>.\n\nA heatmap visualizes the spatial distribution of a large, dense set of point data, using color to avoid cluttering the map with individual points at low zoom levels. The points are weighted by an attribute you specify. Use a heatmap style layer in conjunction with point or point collection features. These features can come from vector tiles loaded by an `MGLVectorTileSource` object, or they can be `MGLPointAnnotation`, `MGLPointFeature`, `MGLPointCollection`, or `MGLPointCollectionFeature` instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.\n\nConsider accompanying a heatmap style layer with an `MGLCircleStyleLayer` or `MGLSymbolStyleLayer` at high zoom levels. If you are unsure whether the point data in an `MGLShapeSource` is dense enough to warrant a heatmap, you can alternatively cluster the source using the `MGLShapeSourceOptionClustered` option and render the data using an `MGLCircleStyleLayer` or `MGLSymbolStyleLayer`.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/heatmap-example/\">Create a heatmap layer</a> example to learn how to add this style layer to your map."
},
"raster": {
"doc": "An `MGLRasterStyleLayer` is a style layer that renders georeferenced raster imagery on the map, especially raster tiles.\n\nUse a raster style layer to configure the color parameters of raster tiles loaded by an `MGLRasterTileSource` object or raster images loaded by an `MGLImageSource` object. For example, you could use a raster style layer to render <a href=\"https://www.mapbox.com/satellite/\">Mapbox Satellite</a> imagery, a <a href=\"https://docs.mapbox.com/help/glossary/tileset/#raster-tilesets\">raster tile set</a> uploaded to Mapbox Studio, or a raster map authored in <a href=\"https://tilemill-project.github.io/tilemill/\">TileMill</a>, the classic Mapbox Editor, or Mapbox Studio Classic.\n\nRaster images may also be used as icons or patterns in a style layer. To register an image for use as an icon or pattern, use the `-[MGLStyle setImage:forName:]` method. To configure a point annotation’s image, use the `MGLAnnotationImage` class.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/image-source/\">Add an image</a> and <a href=\"https://docs.mapbox.com/ios/maps/examples/source-custom-raster/\">Add raster imagery</a> examples to learn how to add imagery with this style layer."
},
"hillshade": {
"doc": "An `MGLHillshadeStyleLayer` is a style layer that renders raster <a href=\"https://en.wikipedia.org/wiki/Digital_elevation_model\">digital elevation model</a> (DEM) tiles on the map.\n\nUse a hillshade style layer to configure the color parameters of raster tiles loaded by an `MGLRasterDEMSource` object. For example, you could use a hillshade style layer to render <a href=\"https://docs.mapbox.com/help/troubleshooting/access-elevation-data/#mapbox-terrain-rgb\">Mapbox Terrain-RGB</a> data.\n\nTo display posterized hillshading based on vector shapes, as with the <a href=\"https://www.mapbox.com/vector-tiles/mapbox-terrain/\">Mapbox Terrain</a> source, use an `MGLVectorTileSource` object in conjunction with several `MGLFillStyleLayer` objects."
},
"background": {
"doc": "An `MGLBackgroundStyleLayer` is a style layer that covers the entire map. Use a background style layer to configure a color or pattern to show below all other map content. If the style’s other layers use the Mapbox Streets source, the background style layer is responsible for drawing land, whereas the oceans and other bodies of water are drawn by `MGLFillStyleLayer` objects.\n\nA background style layer is typically the bottommost layer in a style, because it covers the entire map and can occlude any layers below it. You can therefore access it by getting the last item in the `MGLStyle.layers` array.\n\nIf the background style layer is transparent or omitted from the style, any portion of the map view that does not show another style layer is transparent."
}
}
}
},
"layout_symbol": {
"symbol-z-order": {
"values": {
"viewport-y": {
"doc": "Specify this z order if symbols’ appearance relies on lower features overlapping higher features. For example, symbols with a pin-like appearance would require this z order."
},
"source": {
"doc": "Specify this z order if the order in which features appear in the source is significant."
}
}
},
"icon-text-fit-padding": {
"doc": "Size of the additional area added to dimensions determined by `icon-text-fit`."
},
"icon-offset": {
"doc": "Offset distance of icon from its anchor."
},
"icon-image": {
"doc": "Name of a style image to use for drawing an image background.\n\nUse the `+[MGLStyle setImage:forName:]` method to associate an image with a name that you can set this property to.\n\nWithin a constant string value, a feature attribute name enclosed in curly braces (e.g., `{token}`) is replaced with the value of the named attribute. Tokens inside non-constant expressions are ignored; instead, use `mgl_join:` and key path expressions.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/clustering-with-images/\">Use images to cluster point data</a> example to learn how to dynamically set your icons with an expression."
},
"text-field": {
"doc": "Value to use for a text label.\n\nWithin a constant string value, a feature attribute name enclosed in curly braces (e.g., `{token}`) is replaced with the value of the named attribute. Tokens inside non-constant expressions are ignored; instead, use `mgl_join:` and key path expressions.",
"examples": "See the <a href=\"https://docs.mapbox.com/ios/maps/examples/clustering/\">Cluster point data</a> and <a href=\"https://docs.mapbox.com/ios/maps/examples/clustering-with-images/\">Use images to cluster point data</a> to learn how to use an expression to set this attribute to the number of markers within a cluster."
},
"text-font": {
"doc": "An array of font face names used to display the text.\n\nEach font name must be included in the `{fontstack}` portion of the JSON stylesheet’s <a href=\"https://www.mapbox.com/mapbox-gl-style-spec/#glyphs\"><code>glyphs</code></a> property. You can register a custom font when designing the style in Mapbox Studio. Fonts installed on the system are not used.\n\nThe first font named in the array is applied to the text. For each character in the text, if the first font lacks a glyph for the character, the next font is applied as a fallback, and so on."
},
"text-offset": {
"doc": "Offset distance of text from its anchor."
},
"text-transform": {
"doc": "Specifies how to capitalize text."
}
},
"paint_background": {
"background-pattern": {
"doc": "Name of image in style images to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512)."
}
},
"paint_fill": {
"fill-pattern": {
"doc": "Name of image in style images to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512)."
}
},
"paint_fill-extrusion": {
"fill-extrusion-pattern": {
"doc": "Name of image in style images to use for drawing image fill-extrusions. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512)."
},
"fill-extrusion-translate": {
"doc": "The geometry's offset."
},
"fill-extrusion-color": {
"doc": "The base color of this layer. The extrusion's surfaces will be shaded differently based on this color in combination with the `light` settings. If this color is specified with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacityco."
}
},
"paint_heatmap": {
"heatmap-color": {
"doc": "The color of each screen point based on its density value in a heatmap. This property is normally set to an interpolation or step expression with the `$heatmapDensity` value as its input."
}
},
"paint_line": {
"line-gradient": {
"doc": "The color gradient with which the line will be drawn. This property only has an effect on lines defined by an `MGLShapeSource` whose `MGLShapeSourceOptionLineDistanceMetrics` option is set to `YES`."
},
"line-pattern": {
"doc": "Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512)."
},
"line-translate": {
"doc": "The geometry's offset."
}
},
"paint_circle": {
"circle-translate": {
"doc": "The geometry's offset."
}
},
"paint_fill": {
"fill-translate": {
"doc": "The geometry's offset."
},
"fill-color": {
"doc": "The color of the filled part of this layer."
}
},
"paint_symbol": {
"icon-color": {
"doc": "The tint color to apply to the icon. The `icon-image-name` property must be set to a template image."
},
"icon-halo-color": {
"doc": "The color of the icon’s halo. The `icon-image-name` property must be set to a template image."
},
"icon-translate": {
"doc": "Distance that the icon's anchor is moved from its original placement."
},
"text-translate": {
"doc": "Distance that the text's anchor is moved from its original placement."
}
}
}

View File

@@ -1,148 +0,0 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const execFileSync = require('child_process').execFileSync;
const _ = require('lodash');
require('../../../scripts/style-code');
const examplesSrc = fs.readFileSync('platform/darwin/test/MGLDocumentationExampleTests.swift', 'utf8');
// Regex extracts the following block
// /** Front matter to describe the example. **/
// func testMGLClass$member() {
// ...
// // #-example-code
// let sampleCode: String?
// // #-end-example-code
// ...
// }
//
// into the following regex groups:
// 1 (test method name): "MGLClass" or "MGLClass$member" or "MGLClass$initWithArg_anotherArg_"
// 2 (indentation): " "
// 3 (sample code): "let sampleCode: String?"
const exampleRegex = /func test([\w$]+)\s*\(\)\s*\{[^]*?\n([ \t]+)\/\/#-example-code\n([^]+?)\n\2\/\/#-end-example-code\n/gm;
/**
* Returns the given source with example code inserted into the documentation
* comment for the symbol at the given one-based line.
*
* @param {String} src Source code to insert the example code into.
* @param {Number} line One-based line number of the symbol being documented.
* @param {String} exampleCode Example code to insert.
* @returns {String} `src` with `exampleCode` inserted just above `line`.
*/
function completeSymbolInSource(src, line, exampleCode) {
// Split the file contents right before the symbol declaration (but after its documentation comment).
let srcUpToSymbol = src.split('\n', line - 1).join('\n');
let srcFromSymbol = src.substr(srcUpToSymbol.length);
// Match the documentation comment block that is not followed by the beginning or end of a declaration.
let commentMatch = srcUpToSymbol.match(/\/\*\*\s*(?:[^*]|\*(?!\/))+?\s*\*\/[^;{}]*?$/);
// Replace the Swift code block with the test method’s contents.
let completedComment = commentMatch[0].replace(/^([ \t]*)```swift\n[^]*?```/m, function (m, indentation) {
// Apply the original indentation to each line.
return ('```swift\n' + exampleCode + '\n```').replace(/^/gm, indentation);
});
// Splice the modified comment into the overall file contents.
srcUpToSymbol = (srcUpToSymbol.substr(0, commentMatch.index) + completedComment +
srcUpToSymbol.substr(commentMatch.index + commentMatch[0].length));
return srcUpToSymbol + srcFromSymbol;
}
let examples = {};
let match;
while ((match = exampleRegex.exec(examplesSrc)) !== null) {
let testMethodName = match[1],
indentation = match[2],
exampleCode = match[3];
// Trim leading whitespace from the example code.
exampleCode = exampleCode.replace(new RegExp('^' + indentation, 'gm'), '');
examples[testMethodName] = exampleCode;
}
function completeExamples(os) {
console.log(`Installing ${os} SDK examples…`);
let sdk = os === 'iOS' ? 'iphonesimulator' : 'macosx';
let sysroot = execFileSync('xcrun', ['--show-sdk-path', '--sdk', sdk]).toString().trim();
let umbrellaPath = `platform/${os.toLowerCase()}/src/Mapbox.h`;
let docArgs = ['doc', '--objc', umbrellaPath, '--',
'-x', 'objective-c', '-I', 'platform/darwin/src/', '-isysroot', sysroot];
let docStr = execFileSync('sourcekitten', docArgs, { maxBuffer: Infinity }).toString().trim();
let docJson = JSON.parse(docStr);
_.forEach(docJson, function (result) {
_.forEach(result, function (structure, path) {
let src;
let newSrc;
// Recursively search for code blocks in documentation comments and populate
// them with example code from the test methods. Find and replace the code
// blocks in reverse to keep the SourceKitten line numbers accurate.
_.forEachRight(structure['key.substructure'], function completeSubstructure(substructure, idx, substructures, symbolPath) {
if (!symbolPath) {
symbolPath = [substructure['key.name']];
}
_.forEachRight(substructure['key.substructure'], function (substructure, idx, substructures) {
completeSubstructure(substructure, idx, substructures, _.concat(symbolPath, substructure['key.name']));
});
let comment = substructure['key.doc.comment'];
if (!comment || !comment.match(/^(?:\s*)```swift\n/m)) {
return;
}
// Lazily read in the existing file.
if (!src) {
newSrc = src = fs.readFileSync(path, 'utf8');
}
// Get the contents of the test method whose name matches the symbol path.
let testMethodName = symbolPath.join('$').replace(/\$[+-]/, '$').replace(/:/g, '_');
let example = examples[testMethodName];
if (!example) {
console.error(`MGLDocumentationExampleTests.test${testMethodName}() not found.`);
process.exit(1);
}
// Resolve conditional compilation blocks.
example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\b\n?/gm,
function (m, indentation, ifOs, ifCase, elseCase) {
return (os === ifOs ? ifCase : elseCase).replace(new RegExp('^ ', 'gm'), '');
}).replace(/\n$/, '');
// Insert the test method contents into the documentation comment just
// above the substructure.
let startLine = substructure['key.parsed_scope.start'];
newSrc = completeSymbolInSource(newSrc, startLine, example);
});
if (!src) {
return;
}
// Write out the modified file contents.
writeIfModified(path, newSrc)
});
});
}
function ensureSourceKittenIsInstalled() {
try {
execFileSync('which', ['sourcekitten']);
} catch (e) {
console.log(`Installing SourceKitten via Homebrew…`);
execFileSync('brew', ['install', 'sourcekitten']);
}
}
ensureSourceKittenIsInstalled();
// Where a particular comment is part of both SDKs, prefer the iOS example.
completeExamples('macOS');
completeExamples('iOS');

View File

@@ -1,41 +0,0 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLAccountManager` object provides a global way to set a Mapbox API access
token.
*/
MGL_EXPORT
@interface MGLAccountManager : NSObject
#pragma mark Authorizing Access
/**
The
<a href="https://docs.mapbox.com/help/glossary/access-token/">Mapbox access token</a>
used by all instances of `MGLMapView` in the current application.
Mapbox-hosted vector tiles and styles require an API access token, which you
can obtain from the
<a href="https://www.mapbox.com/studio/account/tokens/">Mapbox account page</a>.
Access tokens associate requests to Mapbox’s vector tile and style APIs with
your Mapbox account. They also deter other developers from using your styles
without your permission.
Setting this property to a value of `nil` has no effect.
@note You must set the access token before attempting to load any Mapbox-hosted
style. Therefore, you should generally set it before creating an instance of
`MGLMapView`. The recommended way to set an access token is to add an entry
to your application’s Info.plist file with the key `MGLMapboxAccessToken`
and the type `String`. Alternatively, you may call this method from your
application delegate’s `-applicationDidFinishLaunching:` method.
*/
@property (class, assign, nullable) NSString *accessToken;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,112 +0,0 @@
#import "MGLAccountManager_Private.h"
#import "NSBundle+MGLAdditions.h"
#if TARGET_OS_OSX
#import "NSProcessInfo+MGLAdditions.h"
#endif
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLMapboxEvents.h"
#import "MBXSKUToken.h"
static NSString * const MGLAccountManagerExternalClassName = @"MBXAccounts";
static NSString * const MGLAccountManagerExternalMethodName = @"skuToken";
#endif
NSString * const MGLMapboxAccountTypeKey = @"MGLMapboxAccountType";
@interface MGLAccountManager ()
@property (atomic) NSString *accessToken;
@property (nonatomic) NSURL *apiBaseURL;
@end
@implementation MGLAccountManager
#pragma mark - Internal
+ (void)load {
// Read the initial configuration from Info.plist.
NSString *accessToken = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMapboxAccessToken"];
if (accessToken.length) {
self.accessToken = accessToken;
}
NSString *apiBaseURL = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMapboxAPIBaseURL"];
// If apiBaseURL is not a valid URL, [NSURL URLWithString:] will be `nil`.
if (apiBaseURL.length && [NSURL URLWithString:apiBaseURL]) {
[self setAPIBaseURL:[NSURL URLWithString:apiBaseURL]];
}
}
+ (instancetype)sharedManager {
#if TARGET_OS_OSX
if (NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) {
return nil;
}
#endif
static dispatch_once_t onceToken;
static MGLAccountManager *_sharedManager;
void (^setupBlock)(void) = ^{
dispatch_once(&onceToken, ^{
_sharedManager = [[self alloc] init];
});
};
if (![[NSThread currentThread] isMainThread]) {
dispatch_sync(dispatch_get_main_queue(), ^{
setupBlock();
});
} else {
setupBlock();
}
return _sharedManager;
}
+ (void)setAccessToken:(NSString *)accessToken {
accessToken = [accessToken stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (!accessToken.length) {
return;
}
[MGLAccountManager sharedManager].accessToken = accessToken;
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
dispatch_async(dispatch_get_main_queue(), ^{
[MGLMapboxEvents setupWithAccessToken:accessToken];
});
#endif
}
+ (NSString *)accessToken {
return [MGLAccountManager sharedManager].accessToken;
}
+ (void)setAPIBaseURL:(NSURL *)apiBaseURL {
[MGLAccountManager sharedManager].apiBaseURL = apiBaseURL;
}
+ (NSURL *)apiBaseURL {
return [MGLAccountManager sharedManager].apiBaseURL;
}
#pragma mark - SKU Tokens
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+ (NSString *)skuToken {
Class mbx = NSClassFromString(MGLAccountManagerExternalClassName);
if ([mbx respondsToSelector:NSSelectorFromString(MGLAccountManagerExternalMethodName)]) {
return (NSString *)[mbx valueForKeyPath:MGLAccountManagerExternalMethodName];
}
return MBXSKUToken.skuToken;
}
#endif
@end

View File

@@ -1,26 +0,0 @@
#import "MGLAccountManager.h"
NS_ASSUME_NONNULL_BEGIN
/// NSUserDefaults key that controls developer account type
FOUNDATION_EXTERN NSString * const MGLMapboxAccountTypeKey;
@interface MGLAccountManager (Private)
/// Returns the shared instance of the `MGLAccountManager` class.
@property (class, nonatomic, readonly) MGLAccountManager *sharedManager;
/// The current global access token.
@property (atomic, nullable) NSString *accessToken;
/// The API base URL that is used to access Mapbox resources. The default base URL is `https://api.mapbox.com`. If `nil`, the Mapbox default base API URL is in use.
@property (atomic, readwrite, nullable) NSURL *apiBaseURL;
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
/// The current global SKU.
@property (class, atomic, readonly) NSString *skuToken;
#endif
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,65 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <TargetConditionals.h>
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLAnnotation` protocol is used to provide annotation-related information
to a map view. To use this protocol, you adopt it in any custom objects that
store or represent annotation data. Each object then serves as the source of
information about a single map annotation and provides critical information,
such as the annotation’s location on the map. Annotation objects do not provide
the visual representation of the annotation but typically coordinate (in
conjunction with the map view’s delegate) the creation of an appropriate
objects to handle the display.
An object that adopts this protocol must implement the `coordinate` property.
The other methods of this protocol are optional.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/annotation-models/">
Annotation models</a> and <a href="https://docs.mapbox.com/ios/maps/examples/annotation-views/">
Annotation views</a> examples to learn how to add objects that follow the
`MGLAnnotation` protocol.
*/
@protocol MGLAnnotation <NSObject>
#pragma mark Position Attributes
/**
The center point (specified as a map coordinate) of the annotation. (required)
(read-only)
*/
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@optional
#pragma mark Title Attributes
/**
The string containing the annotation’s title.
Although this property is optional, if you support the selection of annotations
in your map view, you are expected to provide this property. This string is
displayed in the callout for the associated annotation.
*/
@property (nonatomic, readonly, copy, nullable) NSString *title;
/**
The string containing the annotation’s subtitle.
This string is displayed in the callout for the associated annotation.
*/
@property (nonatomic, readonly, copy, nullable) NSString *subtitle;
#if !TARGET_OS_IPHONE
/** The string containing the annotation’s tooltip. */
@property (nonatomic, readonly, copy, nullable) NSString *toolTip;
#endif
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,87 +0,0 @@
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/** Options for `MGLAttributedExpression.attributes`. */
typedef NSString * MGLAttributedExpressionKey NS_TYPED_ENUM;
/** The font name string array expression used to format the text. */
FOUNDATION_EXTERN MGL_EXPORT MGLAttributedExpressionKey const MGLFontNamesAttribute;
/** The font scale number expression relative to `MGLSymbolStyleLayer.textFontSize` used to format the text. */
FOUNDATION_EXTERN MGL_EXPORT MGLAttributedExpressionKey const MGLFontScaleAttribute;
/** The font color expression used to format the text. */
FOUNDATION_EXTERN MGL_EXPORT MGLAttributedExpressionKey const MGLFontColorAttribute;
/**
An `MGLAttributedExpression` object associates text formatting attibutes (such as font size or
font names) to an `NSExpression`.
### Example
```swift
let redColor = UIColor.red
let expression = NSExpression(forConstantValue: "Foo")
let attributes: [MGLAttributedExpressionKey: NSExpression] = [.fontNamesAttribute : NSExpression(forConstantValue: ["DIN Offc Pro Italic",
"Arial Unicode MS Regular"]),
.fontScaleAttribute: NSExpression(forConstantValue: 1.2),
.fontColorAttribute: NSExpression(forConstantValue: redColor)]
let attributedExpression = MGLAttributedExpression(expression, attributes:attributes)
```
*/
MGL_EXPORT
@interface MGLAttributedExpression : NSObject
/**
The expression content of the receiver as `NSExpression`.
*/
@property (strong, nonatomic) NSExpression *expression;
#if TARGET_OS_IPHONE
/**
The formatting attributes dictionary.
Key | Value Type
--- | ---
`MGLFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
`MGLFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
`MGLFontColorAttribute` | An `NSExpression` evaluating to an `UIColor`.
*/
@property (strong, nonatomic, readonly) NSDictionary<MGLAttributedExpressionKey, NSExpression *> *attributes;
#else
/**
The formatting attributes dictionary.
Key | Value Type
--- | ---
`MGLFontNamesAttribute` | An `NSExpression` evaluating to an `NSString` array.
`MGLFontScaleAttribute` | An `NSExpression` evaluating to an `NSNumber` value.
`MGLFontColorAttribute` | An `NSExpression` evaluating to an `NSColor` on macos.
*/
@property (strong, nonatomic, readonly) NSDictionary<MGLAttributedExpressionKey, NSExpression *> *attributes;
#endif
/**
Returns an `MGLAttributedExpression` object initialized with an expression and no attribute information.
*/
- (instancetype)initWithExpression:(NSExpression *)expression;
/**
Returns an `MGLAttributedExpression` object initialized with an expression and text format attributes.
*/
- (instancetype)initWithExpression:(NSExpression *)expression attributes:(nonnull NSDictionary <MGLAttributedExpressionKey, NSExpression *> *)attrs;
/**
Creates an `MGLAttributedExpression` object initialized with an expression and the format attributes for font names and font size.
*/
+ (instancetype)attributedExpression:(NSExpression *)expression fontNames:(nullable NSArray<NSString*> *)fontNames fontScale:(nullable NSNumber *)fontScale;
/**
Creates an `MGLAttributedExpression` object initialized with an expression and the format attributes dictionary.
*/
+ (instancetype)attributedExpression:(NSExpression *)expression attributes:(nonnull NSDictionary <MGLAttributedExpressionKey, NSExpression *> *)attrs;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,68 +0,0 @@
#import "MGLAttributedExpression.h"
#import "MGLLoggingConfiguration_Private.h"
const MGLAttributedExpressionKey MGLFontNamesAttribute = @"text-font";
const MGLAttributedExpressionKey MGLFontScaleAttribute = @"font-scale";
const MGLAttributedExpressionKey MGLFontColorAttribute = @"text-color";
@implementation MGLAttributedExpression
- (instancetype)initWithExpression:(NSExpression *)expression {
self = [self initWithExpression:expression attributes:@{}];
return self;
}
+ (instancetype)attributedExpression:(NSExpression *)expression fontNames:(nullable NSArray<NSString *> *)fontNames fontScale:(nullable NSNumber *)fontScale {
MGLAttributedExpression *attributedExpression;
NSMutableDictionary *attrs = [NSMutableDictionary dictionary];
if (fontNames && fontNames.count > 0) {
attrs[MGLFontNamesAttribute] = [NSExpression expressionForConstantValue:fontNames];
}
if (fontScale) {
attrs[MGLFontScaleAttribute] = [NSExpression expressionForConstantValue:fontScale];
}
attributedExpression = [[self alloc] initWithExpression:expression attributes:attrs];
return attributedExpression;
}
+ (instancetype)attributedExpression:(NSExpression *)expression attributes:(nonnull NSDictionary<MGLAttributedExpressionKey, NSExpression *> *)attrs {
MGLAttributedExpression *attributedExpression;
attributedExpression = [[self alloc] initWithExpression:expression attributes:attrs];
return attributedExpression;
}
- (instancetype)initWithExpression:(NSExpression *)expression attributes:(nonnull NSDictionary<MGLAttributedExpressionKey, NSExpression *> *)attrs {
if (self = [super init])
{
MGLLogInfo(@"Starting %@ initialization.", NSStringFromClass([self class]));
_expression = expression;
_attributes = attrs;
MGLLogInfo(@"Finalizing %@ initialization.", NSStringFromClass([self class]));
}
return self;
}
- (BOOL)isEqual:(id)object {
BOOL result = NO;
if ([object isKindOfClass:[self class]]) {
MGLAttributedExpression *otherObject = object;
result = [self.expression isEqual:otherObject.expression] &&
[_attributes isEqual:otherObject.attributes];
}
return result;
}
- (NSString *)description {
return [NSString stringWithFormat:@"MGLAttributedExpression<Expression: %@ Attributes: %@>", self.expression, self.attributes];
}
@end

View File

@@ -1,94 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLFoundation.h"
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
/**
The attribution info is represented in the longest format available.
*/
typedef NS_ENUM(NSUInteger, MGLAttributionInfoStyle) {
/**
Specifies a short attribution info style.
*/
MGLAttributionInfoStyleShort = 1,
/**
Specifies a medium attribution info style.
*/
MGLAttributionInfoStyleMedium,
/**
Specifies a long attribution info style.
*/
MGLAttributionInfoStyleLong
};
/**
Information about an attribution statement, usually a copyright or trademark
statement, associated with a map content source.
*/
MGL_EXPORT
@interface MGLAttributionInfo : NSObject
/**
Returns an initialized attribution info object with the given title and URL.
@param title The attribution statement’s title.
@param URL A URL to more information about the entity named in the attribution.
@return An initialized attribution info object.
*/
- (instancetype)initWithTitle:(NSAttributedString *)title URL:(nullable NSURL *)URL;
/**
The attribution statement’s attributed title text.
*/
@property (nonatomic) NSAttributedString *title;
/**
The URL to more information about the entity named in the attribution.
If this property is set, the attribution statement should be displayed as a
hyperlink or action button. Otherwise, if it is `nil`, the attribution
statement should be displayed as plain text.
*/
@property (nonatomic, nullable) NSURL *URL;
/**
A Boolean value indicating whether the attribution statement is a shortcut to a
feedback tool.
If this property is set, the statement should be treated as a way for the user
to provide feedback rather than an attribution statement.
*/
@property (nonatomic, getter=isFeedbackLink) BOOL feedbackLink;
/**
Returns a copy of the `URL` property modified to account for the given center
coordinate and zoom level.
@param centerCoordinate The map’s center coordinate.
@param zoomLevel The map’s zoom level. See the `MGLMapView.zoomLevel` property
for more information.
@return A modified URL containing a fragment that points to the specified
viewport. If the `feedbackLink` property is set to `NO`, this method returns
`nil`.
*/
- (nullable NSURL *)feedbackURLAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel;
/**
Returns a copy of the current `title` formatted accordingly to `style`.
Example: If the `style` property is set to `MGLAttributionInfoStyleShort` and the
`title` property is set to `OpenStreetMap`, then this method returns `OSM`.
@param style The attribution info style.
@return The `NSAttributedString` styled title.
*/
- (NSAttributedString *)titleWithStyle:(MGLAttributionInfoStyle)style;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,279 +0,0 @@
#import "MGLAttributionInfo_Private.h"
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
#import "MGLAccountManager.h"
#import "MGLMapCamera.h"
#import "NSArray+MGLAdditions.h"
#import "NSBundle+MGLAdditions.h"
#import "NSString+MGLAdditions.h"
#import "MGLLoggingConfiguration_Private.h"
#include <string>
@implementation MGLAttributionInfo
+ (NSArray<MGLAttributionInfo *> *)attributionInfosFromHTMLString:(nullable NSString *)htmlString fontSize:(CGFloat)fontSize linkColor:(nullable MGLColor *)linkColor {
if (!htmlString) {
return @[];
}
NSDictionary *options = @{
NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType,
NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding),
};
// Apply a bogus, easily detectable style rule to any feedback link, since
// NSAttributedString doesn’t preserve the class attribute.
NSMutableString *css = [NSMutableString stringWithString:
@"html { font-family: -apple-system, -apple-system-font, sans-serif; }"
@".mapbox-improve-map { -webkit-text-stroke-width: 1000px; }"];
if (fontSize) {
NSString *sizeRule = [NSString stringWithFormat:@"font-size: %.1fpx;", fontSize];
#if !TARGET_OS_IPHONE
if (fontSize == [NSFont systemFontSizeForControlSize:NSMiniControlSize]) {
sizeRule = @"font: -webkit-mini-control";
} else if (fontSize == [NSFont systemFontSizeForControlSize:NSSmallControlSize]) {
sizeRule = @"font: -webkit-small-control";
} else if (fontSize == [NSFont systemFontSizeForControlSize:NSRegularControlSize]) {
sizeRule = @"font: -webkit-control";
}
#endif
[css appendFormat:@"html { %@ }", sizeRule];
}
if (linkColor) {
CGFloat red;
CGFloat green;
CGFloat blue;
CGFloat alpha;
#if !TARGET_OS_IPHONE
// CSS uses the sRGB color space.
if ([NSColor redColor].colorSpaceName == NSCalibratedRGBColorSpace) {
linkColor = [linkColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
} else {
linkColor = [linkColor colorUsingColorSpace:[NSColorSpace sRGBColorSpace]];
}
#endif
[linkColor getRed:&red green:&green blue:&blue alpha:&alpha];
[css appendFormat:
@"a:link { color: rgba(%f%%, %f%%, %f%%, %f); }",
red * 100, green * 100, blue * 100, alpha];
}
NSString *styledHTML = [NSString stringWithFormat:@"<style type='text/css'>%@</style>%@", css, htmlString];
NSData *htmlData = [styledHTML dataUsingEncoding:NSUTF8StringEncoding];
#if TARGET_OS_IPHONE
__block NSMutableAttributedString *attributedString;
dispatch_block_t initialization = ^{
// This initializer should be called from a global or main queue. https://developer.apple.com/documentation/foundation/nsattributedstring/1524613-initwithdata
attributedString = [[NSMutableAttributedString alloc] initWithData:htmlData
options:options
documentAttributes:nil
error:NULL];
};
if (![[NSThread currentThread] isMainThread]) {
dispatch_sync(dispatch_get_main_queue(), initialization);
} else {
initialization();
}
#else
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithHTML:htmlData
options:options
documentAttributes:nil];
#endif
NSMutableArray *infos = [NSMutableArray array];
[attributedString enumerateAttribute:NSLinkAttributeName
inRange:attributedString.mgl_wholeRange
options:0
usingBlock:
^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) {
MGLCAssert(!value || [value isKindOfClass:[NSURL class]], @"If present, URL attribute must be an NSURL.");
// Detect feedback links by the bogus style rule applied above.
NSNumber *strokeWidth = [attributedString attribute:NSStrokeWidthAttributeName
atIndex:range.location
effectiveRange:NULL];
BOOL isFeedbackLink = NO;
if ([strokeWidth floatValue] > 100) {
isFeedbackLink = YES;
[attributedString removeAttribute:NSStrokeWidthAttributeName range:range];
}
// Omit whitespace-only strings.
NSAttributedString *title = [[attributedString attributedSubstringFromRange:range]
mgl_attributedStringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (!title.length) {
return;
}
// Remove the link, because it forces the text to be blue on macOS 10.12
// and above.
NSMutableAttributedString *unlinkedTitle = [title mutableCopy];
[unlinkedTitle removeAttribute:NSLinkAttributeName range:unlinkedTitle.mgl_wholeRange];
MGLAttributionInfo *info = [[MGLAttributionInfo alloc] initWithTitle:unlinkedTitle URL:value];
info.feedbackLink = isFeedbackLink;
[infos addObject:info];
}];
return infos;
}
+ (NSAttributedString *)attributedStringForAttributionInfos:(NSArray<MGLAttributionInfo *> *)attributionInfos {
NSMutableArray *titles = [NSMutableArray arrayWithCapacity:attributionInfos.count];
for (MGLAttributionInfo *info in attributionInfos) {
NSMutableAttributedString *title = info.title.mutableCopy;
if (info.URL) {
[title addAttribute:NSLinkAttributeName value:info.URL range:title.mgl_wholeRange];
}
[titles addObject:title];
}
return [titles mgl_attributedComponentsJoinedByString:@" "];
}
- (instancetype)initWithTitle:(NSAttributedString *)title URL:(NSURL *)URL {
if (self = [super init]) {
_title = title;
_URL = URL;
}
return self;
}
- (id)copyWithZone:(nullable NSZone *)zone
{
MGLAttributionInfo *info = [[[self class] allocWithZone:zone] initWithTitle:_title
URL:_URL];
info.feedbackLink = _feedbackLink;
return info;
}
- (nullable NSURL *)feedbackURLAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel {
return [self feedbackURLForStyleURL:nil atCenterCoordinate:centerCoordinate zoomLevel:zoomLevel direction:0 pitch:0];
}
- (nullable NSURL *)feedbackURLForStyleURL:(nullable NSURL *)styleURL atCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel direction:(CLLocationDirection)direction pitch:(CGFloat)pitch {
if (!self.feedbackLink) {
return nil;
}
NSURLComponents *components = [NSURLComponents componentsWithString:@"https://apps.mapbox.com/feedback/"];
components.fragment = [NSString stringWithFormat:@"/%.5f/%.5f/%.2f/%.1f/%i",
centerCoordinate.longitude, centerCoordinate.latitude, zoomLevel,
direction, (int)round(pitch)];
NSURLQueryItem *referrerQueryItem = [NSURLQueryItem queryItemWithName:@"referrer"
value:[NSBundle mgl_applicationBundleIdentifier]];
NSMutableArray<NSURLQueryItem *> *queryItems = [NSMutableArray arrayWithObject:referrerQueryItem];
if ([styleURL.scheme isEqualToString:@"mapbox"] && [styleURL.host isEqualToString:@"styles"]) {
NSArray<NSString *> *stylePathComponents = styleURL.pathComponents;
if (stylePathComponents.count >= 3) {
[queryItems addObjectsFromArray:@[
[NSURLQueryItem queryItemWithName:@"owner" value:stylePathComponents[1]],
[NSURLQueryItem queryItemWithName:@"id" value:stylePathComponents[2]],
[NSURLQueryItem queryItemWithName:@"access_token" value:[MGLAccountManager accessToken]],
[NSURLQueryItem queryItemWithName:@"map_sdk_version" value:[NSBundle mgl_frameworkInfoDictionary][@"MGLSemanticVersionString"]],
]];
}
}
components.queryItems = queryItems;
return components.URL;
}
- (NSAttributedString *)titleWithStyle:(MGLAttributionInfoStyle)style
{
NSString *openStreetMap = NSLocalizedStringWithDefaultValue(@"OSM_FULL_NAME", @"Foundation", nil, @"OpenStreetMap", @"OpenStreetMap full name attribution");
NSString *OSM = NSLocalizedStringWithDefaultValue(@"OSM_SHORT_NAME", @"Foundation", nil, @"OSM", @"OpenStreetMap short name attribution");
NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithAttributedString:self.title];
[title removeAttribute:NSUnderlineStyleAttributeName range:NSMakeRange(0, [title.string length])];
BOOL isAbbreviated = (style == MGLAttributionInfoStyleShort);
if ([title.string rangeOfString:@"OpenStreetMap"].location != NSNotFound) {
[title.mutableString replaceOccurrencesOfString:@"OpenStreetMap" withString:isAbbreviated ? OSM : openStreetMap
options:NSCaseInsensitiveSearch
range:NSMakeRange(0, [title.mutableString length])];
}
return title;
}
- (BOOL)isEqual:(id)object {
return [object isKindOfClass:[self class]] && [[object title] isEqual:self.title] && [[object URL] isEqual:self.URL];
}
- (NSUInteger)hash {
return self.title.hash + self.URL.hash;
}
/**
Returns whether the given attribution info object overlaps with the receiver by
its plain text title.
@return `NSOrderedAscending` if the given object is a superset of the receiver,
`NSOrderedDescending` if it is a subset of the receiver, or `NSOrderedSame`
if there is no overlap.
*/
- (NSComparisonResult)subsetCompare:(MGLAttributionInfo *)otherInfo {
NSString *title = self.title.string;
NSString *otherTitle = otherInfo.title.string;
if ([title containsString:otherTitle]) {
return NSOrderedDescending;
}
if ([otherTitle containsString:title]) {
return NSOrderedAscending;
}
return NSOrderedSame;
}
@end
@implementation NSMutableArray (MGLAttributionInfoAdditions)
- (void)growArrayByAddingAttributionInfo:(MGLAttributionInfo *)info {
__block BOOL didInsertInfo = NO;
__block BOOL shouldAddInfo = YES;
[self enumerateObjectsUsingBlock:^(MGLAttributionInfo * _Nonnull existingInfo, NSUInteger idx, BOOL * _Nonnull stop) {
switch ([info subsetCompare:existingInfo]) {
case NSOrderedDescending:
// The existing info object is a subset of the one we’re adding.
// Replace the existing object the first time we find a subset;
// remove the existing object every time after that.
if (didInsertInfo) {
[self removeObjectAtIndex:idx];
} else {
[self replaceObjectAtIndex:idx withObject:info];
didInsertInfo = YES;
}
break;
case NSOrderedAscending:
// The info object we’re adding is a subset of the existing one.
// Don’t add the object and stop looking.
shouldAddInfo = NO;
*stop = YES;
break;
default:
break;
}
}];
if (shouldAddInfo && !didInsertInfo) {
// No overlapping infos were found, so append the info object.
[self addObject:info];
}
}
- (void)growArrayByAddingAttributionInfosFromArray:(NSArray<MGLAttributionInfo *> *)infos {
for (MGLAttributionInfo *info in infos) {
[self growArrayByAddingAttributionInfo:info];
}
}
@end

View File

@@ -1,65 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLAttributionInfo.h"
NS_ASSUME_NONNULL_BEGIN
@interface MGLAttributionInfo (Private)
/**
Parses and returns the attribution infos contained in the given HTML source
code string.
@param htmlString The HTML source code to parse.
@param fontSize The default text size in points.
@param linkColor The default link color.
*/
+ (NSArray<MGLAttributionInfo *> *)attributionInfosFromHTMLString:(nullable NSString *)htmlString fontSize:(CGFloat)fontSize linkColor:(nullable MGLColor *)linkColor;
+ (NSAttributedString *)attributedStringForAttributionInfos:(NSArray<MGLAttributionInfo *> *)attributionInfos;
/**
Returns a copy of the `URL` property modified to account for the given style
URL, center coordinate, and zoom level.
@param styleURL The map’s style URL.
@param centerCoordinate The map’s center coordinate.
@param zoomLevel The map’s zoom level. See the `MGLMapView.zoomLevel` property
for more information.
@param direction The heading of the map, measured in degrees clockwise from
true north.
@param pitch Pitch toward the horizon measured in degrees, with 0 degrees
resulting in a two-dimensional map.
@return A modified URL containing a fragment that points to the specified
viewport. If the `feedbackLink` property is set to `NO`, this method returns
`nil`.
*/
- (nullable NSURL *)feedbackURLForStyleURL:(nullable NSURL *)styleURL atCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel direction:(CLLocationDirection)direction pitch:(CGFloat)pitch;
@end
@interface NSMutableArray (MGLAttributionInfoAdditions)
/**
Adds the given attribution info object to the receiver as long as it isn’t
redundant to any object already in the receiver. Any existing object that is
redundant to the given object is replaced by the given object.
@param info The info object to add to the receiver.
*/
- (void)growArrayByAddingAttributionInfo:(MGLAttributionInfo *)info;
/**
Adds each of the given attribution info objects to the receiver as long as it
isn’t redundant to any object already in the receiver. Any existing object that
is redundant to the given object is replaced by the given object.
@param infos An array of info objects to add to the receiver.
*/
- (void)growArrayByAddingAttributionInfosFromArray:(NSArray<MGLAttributionInfo *> *)infos;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,149 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLFoundation.h"
#import "MGLStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
/**
An `MGLBackgroundStyleLayer` is a style layer that covers the entire map. Use a
background style layer to configure a color or pattern to show below all other
map content. If the style’s other layers use the Mapbox Streets source, the
background style layer is responsible for drawing land, whereas the oceans and
other bodies of water are drawn by `MGLFillStyleLayer` objects.
A background style layer is typically the bottommost layer in a style, because
it covers the entire map and can occlude any layers below it. You can therefore
access it by getting the last item in the `MGLStyle.layers` array.
If the background style layer is transparent or omitted from the style, any
portion of the map view that does not show another style layer is transparent.
*/
MGL_EXPORT
@interface MGLBackgroundStyleLayer : MGLStyleLayer
/**
Returns a background style layer initialized with an identifier.
After initializing and configuring the style layer, add it to a map view’s
style using the `-[MGLStyle addLayer:]` or
`-[MGLStyle insertLayer:belowLayer:]` method.
@param identifier A string that uniquely identifies the source in the style to
which it is added.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier;
#pragma mark - Accessing the Paint Attributes
#if TARGET_OS_IPHONE
/**
The color with which the background will be drawn.
The default value of this property is an expression that evaluates to
`UIColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `backgroundPattern` is set to
`nil`. Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *backgroundColor;
#else
/**
The color with which the background will be drawn.
The default value of this property is an expression that evaluates to
`NSColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `backgroundPattern` is set to
`nil`. Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *backgroundColor;
#endif
/**
The transition affecting any changes to this layer’s `backgroundColor` property.
This property corresponds to the `background-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundColorTransition;
/**
The opacity at which the background will be drawn.
The default value of this property is an expression that evaluates to the float
`1`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values between 0 and 1 inclusive
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *backgroundOpacity;
/**
The transition affecting any changes to this layer’s `backgroundOpacity` property.
This property corresponds to the `background-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundOpacityTransition;
/**
Name of image in style images to use for drawing an image background. For
seamless patterns, image width and height must be a factor of two (2, 4, 8,
..., 512).
You can set this property to an expression containing any of the following:
* Constant string values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *backgroundPattern;
/**
The transition affecting any changes to this layer’s `backgroundPattern` property.
This property corresponds to the `background-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundPatternTransition;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,146 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLSource.h"
#import "NSPredicate+MGLPrivateAdditions.h"
#import "NSDate+MGLAdditions.h"
#import "MGLStyleLayer_Private.h"
#import "MGLStyleValue_Private.h"
#import "MGLBackgroundStyleLayer.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLBackgroundStyleLayer_Private.h"
#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/style/transition_options.hpp>
@interface MGLBackgroundStyleLayer ()
@property (nonatomic, readonly) mbgl::style::BackgroundLayer *rawLayer;
@end
@implementation MGLBackgroundStyleLayer
- (instancetype)initWithIdentifier:(NSString *)identifier
{
MGLLogDebug(@"Initializing %@ with identifier: %@", NSStringFromClass([self class]), identifier);
auto layer = std::make_unique<mbgl::style::BackgroundLayer>(identifier.UTF8String);
return self = [super initWithPendingLayer:std::move(layer)];
}
- (mbgl::style::BackgroundLayer *)rawLayer
{
return (mbgl::style::BackgroundLayer *)super.rawLayer;
}
#pragma mark - Accessing the Paint Attributes
- (void)setBackgroundColor:(NSExpression *)backgroundColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundColor: %@", backgroundColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(backgroundColor, false);
self.rawLayer->setBackgroundColor(mbglValue);
}
- (NSExpression *)backgroundColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getBackgroundColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultBackgroundColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setBackgroundColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setBackgroundColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)backgroundColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getBackgroundColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setBackgroundOpacity:(NSExpression *)backgroundOpacity {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundOpacity: %@", backgroundOpacity);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(backgroundOpacity, false);
self.rawLayer->setBackgroundOpacity(mbglValue);
}
- (NSExpression *)backgroundOpacity {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getBackgroundOpacity();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultBackgroundOpacity();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setBackgroundOpacityTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundOpacityTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setBackgroundOpacityTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)backgroundOpacityTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getBackgroundOpacityTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setBackgroundPattern:(NSExpression *)backgroundPattern {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundPattern: %@", backgroundPattern);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::expression::Image>>(backgroundPattern, false);
self.rawLayer->setBackgroundPattern(mbglValue);
}
- (NSExpression *)backgroundPattern {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getBackgroundPattern();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultBackgroundPattern();
}
return MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toExpression(propertyValue);
}
- (void)setBackgroundPatternTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting backgroundPatternTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setBackgroundPatternTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)backgroundPatternTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getBackgroundPatternTransition();
return MGLTransitionFromOptions(transitionOptions);
}
@end
namespace mbgl {
MGLStyleLayer* BackgroundStyleLayerPeerFactory::createPeer(style::Layer* rawLayer) {
return [[MGLBackgroundStyleLayer alloc] initWithRawLayer:rawLayer];
}
} // namespace mbgl

View File

@@ -1,17 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#pragma once
#include "MGLStyleLayer_Private.h"
#include <mbgl/layermanager/background_layer_factory.hpp>
namespace mbgl {
class BackgroundStyleLayerPeerFactory : public LayerPeerFactory, public mbgl::BackgroundLayerFactory {
// LayerPeerFactory overrides.
LayerFactory* getCoreLayerFactory() final { return this; }
virtual MGLStyleLayer* createPeer(style::Layer*) final;
};
} // namespace mbgl

View File

@@ -1,540 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLFoundation.h"
#import "MGLVectorStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
/**
Orientation of circle when map is pitched.
Values of this type are used in the `MGLCircleStyleLayer.circlePitchAlignment`
property.
*/
typedef NS_ENUM(NSUInteger, MGLCirclePitchAlignment) {
/**
The circle is aligned to the plane of the map.
*/
MGLCirclePitchAlignmentMap,
/**
The circle is aligned to the plane of the viewport.
*/
MGLCirclePitchAlignmentViewport,
};
/**
Controls the scaling behavior of the circle when the map is pitched.
Values of this type are used in the `MGLCircleStyleLayer.circleScaleAlignment`
property.
*/
typedef NS_ENUM(NSUInteger, MGLCircleScaleAlignment) {
/**
Circles are scaled according to their apparent distance to the camera.
*/
MGLCircleScaleAlignmentMap,
/**
Circles are not scaled.
*/
MGLCircleScaleAlignmentViewport,
};
/**
Controls the frame of reference for `MGLCircleStyleLayer.circleTranslation`.
Values of this type are used in the `MGLCircleStyleLayer.circleTranslationAnchor`
property.
*/
typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
/**
The circle is translated relative to the map.
*/
MGLCircleTranslationAnchorMap,
/**
The circle is translated relative to the viewport.
*/
MGLCircleTranslationAnchorViewport,
};
/**
An `MGLCircleStyleLayer` is a style layer that renders one or more filled
circles on the map.
Use a circle style layer to configure the visual appearance of point or point
collection features. These features can come from vector tiles loaded by an
`MGLVectorTileSource` object, or they can be `MGLPointAnnotation`,
`MGLPointFeature`, `MGLPointCollection`, or `MGLPointCollectionFeature`
instances in an `MGLShapeSource` or `MGLComputedShapeSource` object.
A circle style layer renders circles whose radii are measured in screen units.
To display circles on the map whose radii correspond to real-world distances,
use many-sided regular polygons and configure their appearance using an
`MGLFillStyleLayer` object.
You can access an existing circle style layer using the
`-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
otherwise, find it using the `MGLStyle.layers` property. You can also create a
new circle style layer and add it to the style using a method such as
`-[MGLStyle addLayer:]`.
#### Related examples
See the <a
href="https://docs.mapbox.com/ios/maps/examples/dds-circle-layer/">Data-driven
circles</a>, <a
href="https://docs.mapbox.com/ios/maps/examples/shape-collection/">Add multiple
shapes from a single shape source</a>, and <a
href="https://docs.mapbox.com/ios/maps/examples/clustering/">Cluster point
data</a> examples to learn how to add circles to your map using this style
layer.
### Example
```swift
let layer = MGLCircleStyleLayer(identifier: "circles", source: population)
layer.sourceLayerIdentifier = "population"
layer.circleColor = NSExpression(forConstantValue: UIColor.green)
layer.circleRadius = NSExpression(format: "mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'exponential', 1.75, %@)",
[12: 2,
22: 180])
layer.circleOpacity = NSExpression(forConstantValue: 0.7)
layer.predicate = NSPredicate(format: "%K == %@", "marital-status", "married")
mapView.style?.addLayer(layer)
```
*/
MGL_EXPORT
@interface MGLCircleStyleLayer : MGLVectorStyleLayer
/**
Returns a circle style layer initialized with an identifier and source.
After initializing and configuring the style layer, add it to a map view’s
style using the `-[MGLStyle addLayer:]` or
`-[MGLStyle insertLayer:belowLayer:]` method.
@param identifier A string that uniquely identifies the source in the style to
which it is added.
@param source The source from which to obtain the data to style. If the source
has not yet been added to the current style, the behavior is undefined.
@return An initialized foreground style layer.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source;
#pragma mark - Accessing the Paint Attributes
/**
Amount to blur the circle. 1 blurs the circle such that only the centerpoint is
full opacity.
The default value of this property is an expression that evaluates to the float
`0`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleBlur;
/**
The transition affecting any changes to this layer’s `circleBlur` property.
This property corresponds to the `circle-blur-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleBlurTransition;
#if TARGET_OS_IPHONE
/**
The fill color of the circle.
The default value of this property is an expression that evaluates to
`UIColor.blackColor`. Set this property to `nil` to reset it to the default
value.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleColor;
#else
/**
The fill color of the circle.
The default value of this property is an expression that evaluates to
`NSColor.blackColor`. Set this property to `nil` to reset it to the default
value.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleColor;
#endif
/**
The transition affecting any changes to this layer’s `circleColor` property.
This property corresponds to the `circle-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleColorTransition;
/**
The opacity at which the circle will be drawn.
The default value of this property is an expression that evaluates to the float
`1`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values between 0 and 1 inclusive
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleOpacity;
/**
The transition affecting any changes to this layer’s `circleOpacity` property.
This property corresponds to the `circle-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleOpacityTransition;
/**
Orientation of circle when map is pitched.
The default value of this property is an expression that evaluates to
`viewport`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant `MGLCirclePitchAlignment` values
* Any of the following constant string values:
* `map`: The circle is aligned to the plane of the map.
* `viewport`: The circle is aligned to the plane of the viewport.
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *circlePitchAlignment;
/**
Circle radius.
This property is measured in points.
The default value of this property is an expression that evaluates to the float
`5`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values no less than 0
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleRadius;
/**
The transition affecting any changes to this layer’s `circleRadius` property.
This property corresponds to the `circle-radius-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleRadiusTransition;
/**
Controls the scaling behavior of the circle when the map is pitched.
The default value of this property is an expression that evaluates to `map`.
Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-pitch-scale"><code>circle-pitch-scale</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `MGLCircleScaleAlignment` values
* Any of the following constant string values:
* `map`: Circles are scaled according to their apparent distance to the
camera.
* `viewport`: Circles are not scaled.
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *circleScaleAlignment;
@property (nonatomic, null_resettable) NSExpression *circlePitchScale __attribute__((unavailable("Use circleScaleAlignment instead.")));
#if TARGET_OS_IPHONE
/**
The stroke color of the circle.
The default value of this property is an expression that evaluates to
`UIColor.blackColor`. Set this property to `nil` to reset it to the default
value.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleStrokeColor;
#else
/**
The stroke color of the circle.
The default value of this property is an expression that evaluates to
`NSColor.blackColor`. Set this property to `nil` to reset it to the default
value.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleStrokeColor;
#endif
/**
The transition affecting any changes to this layer’s `circleStrokeColor` property.
This property corresponds to the `circle-stroke-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeColorTransition;
/**
The opacity of the circle's stroke.
The default value of this property is an expression that evaluates to the float
`1`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values between 0 and 1 inclusive
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleStrokeOpacity;
/**
The transition affecting any changes to this layer’s `circleStrokeOpacity` property.
This property corresponds to the `circle-stroke-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeOpacityTransition;
/**
The width of the circle's stroke. Strokes are placed outside of the
`circleRadius`.
This property is measured in points.
The default value of this property is an expression that evaluates to the float
`0`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values no less than 0
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *circleStrokeWidth;
/**
The transition affecting any changes to this layer’s `circleStrokeWidth` property.
This property corresponds to the `circle-stroke-width-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeWidthTransition;
#if TARGET_OS_IPHONE
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points downward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate"><code>circle-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *circleTranslation;
#else
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points upward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate"><code>circle-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *circleTranslation;
#endif
/**
The transition affecting any changes to this layer’s `circleTranslation` property.
This property corresponds to the `circle-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleTranslationTransition;
@property (nonatomic, null_resettable) NSExpression *circleTranslate __attribute__((unavailable("Use circleTranslation instead.")));
/**
Controls the frame of reference for `circleTranslation`.
The default value of this property is an expression that evaluates to `map`.
Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `circleTranslation` is non-`nil`.
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate-anchor"><code>circle-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `MGLCircleTranslationAnchor` values
* Any of the following constant string values:
* `map`: The circle is translated relative to the map.
* `viewport`: The circle is translated relative to the viewport.
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *circleTranslationAnchor;
@property (nonatomic, null_resettable) NSExpression *circleTranslateAnchor __attribute__((unavailable("Use circleTranslationAnchor instead.")));
@end
/**
Methods for wrapping an enumeration value for a style layer attribute in an
`MGLCircleStyleLayer` object and unwrapping its raw value.
*/
@interface NSValue (MGLCircleStyleLayerAdditions)
#pragma mark Working with Circle Style Layer Attribute Values
/**
Creates a new value object containing the given `MGLCirclePitchAlignment` enumeration.
@param circlePitchAlignment The value for the new object.
@return A new value object that contains the enumeration value.
*/
+ (instancetype)valueWithMGLCirclePitchAlignment:(MGLCirclePitchAlignment)circlePitchAlignment;
/**
The `MGLCirclePitchAlignment` enumeration representation of the value.
*/
@property (readonly) MGLCirclePitchAlignment MGLCirclePitchAlignmentValue;
/**
Creates a new value object containing the given `MGLCircleScaleAlignment` enumeration.
@param circleScaleAlignment The value for the new object.
@return A new value object that contains the enumeration value.
*/
+ (instancetype)valueWithMGLCircleScaleAlignment:(MGLCircleScaleAlignment)circleScaleAlignment;
/**
The `MGLCircleScaleAlignment` enumeration representation of the value.
*/
@property (readonly) MGLCircleScaleAlignment MGLCircleScaleAlignmentValue;
/**
Creates a new value object containing the given `MGLCircleTranslationAnchor` enumeration.
@param circleTranslationAnchor The value for the new object.
@return A new value object that contains the enumeration value.
*/
+ (instancetype)valueWithMGLCircleTranslationAnchor:(MGLCircleTranslationAnchor)circleTranslationAnchor;
/**
The `MGLCircleTranslationAnchor` enumeration representation of the value.
*/
@property (readonly) MGLCircleTranslationAnchor MGLCircleTranslationAnchorValue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,477 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLSource.h"
#import "NSPredicate+MGLPrivateAdditions.h"
#import "NSDate+MGLAdditions.h"
#import "MGLStyleLayer_Private.h"
#import "MGLStyleValue_Private.h"
#import "MGLCircleStyleLayer.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLCircleStyleLayer_Private.h"
#include <mbgl/style/layers/circle_layer.hpp>
#include <mbgl/style/transition_options.hpp>
namespace mbgl {
MBGL_DEFINE_ENUM(MGLCirclePitchAlignment, {
{ MGLCirclePitchAlignmentMap, "map" },
{ MGLCirclePitchAlignmentViewport, "viewport" },
});
MBGL_DEFINE_ENUM(MGLCircleScaleAlignment, {
{ MGLCircleScaleAlignmentMap, "map" },
{ MGLCircleScaleAlignmentViewport, "viewport" },
});
MBGL_DEFINE_ENUM(MGLCircleTranslationAnchor, {
{ MGLCircleTranslationAnchorMap, "map" },
{ MGLCircleTranslationAnchorViewport, "viewport" },
});
}
@interface MGLCircleStyleLayer ()
@property (nonatomic, readonly) mbgl::style::CircleLayer *rawLayer;
@end
@implementation MGLCircleStyleLayer
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source
{
MGLLogDebug(@"Initializing %@ with identifier: %@ source: %@", NSStringFromClass([self class]), identifier, source);
auto layer = std::make_unique<mbgl::style::CircleLayer>(identifier.UTF8String, source.identifier.UTF8String);
return self = [super initWithPendingLayer:std::move(layer)];
}
- (mbgl::style::CircleLayer *)rawLayer
{
return (mbgl::style::CircleLayer *)super.rawLayer;
}
- (NSString *)sourceIdentifier
{
MGLAssertStyleLayerIsValid();
return @(self.rawLayer->getSourceID().c_str());
}
- (NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
auto layerID = self.rawLayer->getSourceLayer();
return layerID.empty() ? nil : @(layerID.c_str());
}
- (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting sourceLayerIdentifier: %@", sourceLayerIdentifier);
self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: "");
}
- (void)setPredicate:(NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting predicate: %@", predicate);
self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::Filter());
}
- (NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()];
}
#pragma mark - Accessing the Paint Attributes
- (void)setCircleBlur:(NSExpression *)circleBlur {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleBlur: %@", circleBlur);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(circleBlur, true);
self.rawLayer->setCircleBlur(mbglValue);
}
- (NSExpression *)circleBlur {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleBlur();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleBlur();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setCircleBlurTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleBlurTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleBlurTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleBlurTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleBlurTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleColor:(NSExpression *)circleColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleColor: %@", circleColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(circleColor, true);
self.rawLayer->setCircleColor(mbglValue);
}
- (NSExpression *)circleColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setCircleColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleOpacity:(NSExpression *)circleOpacity {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleOpacity: %@", circleOpacity);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(circleOpacity, true);
self.rawLayer->setCircleOpacity(mbglValue);
}
- (NSExpression *)circleOpacity {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleOpacity();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleOpacity();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setCircleOpacityTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleOpacityTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleOpacityTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleOpacityTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleOpacityTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCirclePitchAlignment:(NSExpression *)circlePitchAlignment {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circlePitchAlignment: %@", circlePitchAlignment);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLCirclePitchAlignment>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::AlignmentType>>(circlePitchAlignment, false);
self.rawLayer->setCirclePitchAlignment(mbglValue);
}
- (NSExpression *)circlePitchAlignment {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCirclePitchAlignment();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCirclePitchAlignment();
}
return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLCirclePitchAlignment>().toExpression(propertyValue);
}
- (void)setCircleRadius:(NSExpression *)circleRadius {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleRadius: %@", circleRadius);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(circleRadius, true);
self.rawLayer->setCircleRadius(mbglValue);
}
- (NSExpression *)circleRadius {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleRadius();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleRadius();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setCircleRadiusTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleRadiusTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleRadiusTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleRadiusTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleRadiusTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleScaleAlignment:(NSExpression *)circleScaleAlignment {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleScaleAlignment: %@", circleScaleAlignment);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCircleScaleAlignment>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::CirclePitchScaleType>>(circleScaleAlignment, false);
self.rawLayer->setCirclePitchScale(mbglValue);
}
- (NSExpression *)circleScaleAlignment {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCirclePitchScale();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCirclePitchScale();
}
return MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCircleScaleAlignment>().toExpression(propertyValue);
}
- (void)setCirclePitchScale:(NSExpression *)circlePitchScale {
}
- (NSExpression *)circlePitchScale {
return self.circleScaleAlignment;
}
- (void)setCircleStrokeColor:(NSExpression *)circleStrokeColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeColor: %@", circleStrokeColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(circleStrokeColor, true);
self.rawLayer->setCircleStrokeColor(mbglValue);
}
- (NSExpression *)circleStrokeColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleStrokeColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleStrokeColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setCircleStrokeColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleStrokeColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleStrokeColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleStrokeColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleStrokeOpacity:(NSExpression *)circleStrokeOpacity {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeOpacity: %@", circleStrokeOpacity);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(circleStrokeOpacity, true);
self.rawLayer->setCircleStrokeOpacity(mbglValue);
}
- (NSExpression *)circleStrokeOpacity {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleStrokeOpacity();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleStrokeOpacity();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setCircleStrokeOpacityTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeOpacityTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleStrokeOpacityTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleStrokeOpacityTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleStrokeOpacityTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleStrokeWidth:(NSExpression *)circleStrokeWidth {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeWidth: %@", circleStrokeWidth);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(circleStrokeWidth, true);
self.rawLayer->setCircleStrokeWidth(mbglValue);
}
- (NSExpression *)circleStrokeWidth {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleStrokeWidth();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleStrokeWidth();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setCircleStrokeWidthTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleStrokeWidthTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleStrokeWidthTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleStrokeWidthTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleStrokeWidthTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleTranslation:(NSExpression *)circleTranslation {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleTranslation: %@", circleTranslation);
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue<mbgl::style::PropertyValue<std::array<float, 2>>>(circleTranslation, false);
self.rawLayer->setCircleTranslate(mbglValue);
}
- (NSExpression *)circleTranslation {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleTranslate();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleTranslate();
}
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toExpression(propertyValue);
}
- (void)setCircleTranslationTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleTranslationTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setCircleTranslateTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)circleTranslationTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getCircleTranslateTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setCircleTranslate:(NSExpression *)circleTranslate {
}
- (NSExpression *)circleTranslate {
return self.circleTranslation;
}
- (void)setCircleTranslationAnchor:(NSExpression *)circleTranslationAnchor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting circleTranslationAnchor: %@", circleTranslationAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLCircleTranslationAnchor>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>>(circleTranslationAnchor, false);
self.rawLayer->setCircleTranslateAnchor(mbglValue);
}
- (NSExpression *)circleTranslationAnchor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getCircleTranslateAnchor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultCircleTranslateAnchor();
}
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLCircleTranslationAnchor>().toExpression(propertyValue);
}
- (void)setCircleTranslateAnchor:(NSExpression *)circleTranslateAnchor {
}
- (NSExpression *)circleTranslateAnchor {
return self.circleTranslationAnchor;
}
@end
@implementation NSValue (MGLCircleStyleLayerAdditions)
+ (NSValue *)valueWithMGLCirclePitchAlignment:(MGLCirclePitchAlignment)circlePitchAlignment {
return [NSValue value:&circlePitchAlignment withObjCType:@encode(MGLCirclePitchAlignment)];
}
- (MGLCirclePitchAlignment)MGLCirclePitchAlignmentValue {
MGLCirclePitchAlignment circlePitchAlignment;
[self getValue:&circlePitchAlignment];
return circlePitchAlignment;
}
+ (NSValue *)valueWithMGLCircleScaleAlignment:(MGLCircleScaleAlignment)circleScaleAlignment {
return [NSValue value:&circleScaleAlignment withObjCType:@encode(MGLCircleScaleAlignment)];
}
- (MGLCircleScaleAlignment)MGLCircleScaleAlignmentValue {
MGLCircleScaleAlignment circleScaleAlignment;
[self getValue:&circleScaleAlignment];
return circleScaleAlignment;
}
+ (NSValue *)valueWithMGLCircleTranslationAnchor:(MGLCircleTranslationAnchor)circleTranslationAnchor {
return [NSValue value:&circleTranslationAnchor withObjCType:@encode(MGLCircleTranslationAnchor)];
}
- (MGLCircleTranslationAnchor)MGLCircleTranslationAnchorValue {
MGLCircleTranslationAnchor circleTranslationAnchor;
[self getValue:&circleTranslationAnchor];
return circleTranslationAnchor;
}
@end
namespace mbgl {
MGLStyleLayer* CircleStyleLayerPeerFactory::createPeer(style::Layer* rawLayer) {
return [[MGLCircleStyleLayer alloc] initWithRawLayer:rawLayer];
}
} // namespace mbgl

View File

@@ -1,17 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#pragma once
#include "MGLStyleLayer_Private.h"
#include <mbgl/layermanager/circle_layer_factory.hpp>
namespace mbgl {
class CircleStyleLayerPeerFactory : public LayerPeerFactory, public mbgl::CircleLayerFactory {
// LayerPeerFactory overrides.
LayerFactory* getCoreLayerFactory() final { return this; }
virtual MGLStyleLayer* createPeer(style::Layer*) final;
};
} // namespace mbgl

View File

@@ -1,46 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLClockDirectionFormatter` class provides properly formatted descriptions
of headings relative to the user, known as <i>clock positions</i>. For
example, a value of `90` may be formatted as “3 o’clock”, depending on the
locale.
Use this class to create localized heading strings when displaying directions
relative to the user’s current location and heading. To format a direction
irrespective of the user’s orientation, use `MGLCompassDirectionFormatter`
instead.
*/
MGL_EXPORT
@interface MGLClockDirectionFormatter : NSFormatter
/**
The unit style used by this formatter.
This property defaults to `NSFormattingUnitStyleMedium`.
*/
@property (nonatomic) NSFormattingUnitStyle unitStyle;
/**
Returns a clock position string for the provided value.
@param direction The heading, measured in degrees, where 0° means “straight
ahead” and 90° means “directly to your right”.
@return The clock position string appropriately formatted for the receiver’s
locale.
*/
- (NSString *)stringFromDirection:(CLLocationDirection)direction;
/**
This method is not supported for the `MGLDirectionFormatter` class.
*/
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,60 +0,0 @@
#import "MGLClockDirectionFormatter.h"
#import "NSBundle+MGLAdditions.h"
#import "MGLLoggingConfiguration_Private.h"
#define wrap(value, min, max) \
(fmod((fmod((value - min), (max - min)) + (max - min)), (max - min)) + min)
@implementation MGLClockDirectionFormatter {
NSNumberFormatter *_numberFormatter;
}
- (instancetype)init {
if (self = [super init]) {
_unitStyle = NSFormattingUnitStyleMedium;
_numberFormatter = [[NSNumberFormatter alloc] init];
_numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;
}
return self;
}
- (NSString *)stringFromDirection:(CLLocationDirection)direction {
NSInteger hour = round(wrap(direction, 0, 360) / 360 * 12);
if (hour == 0) {
hour = 12;
}
NSString *format;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_SHORT", @"Foundation", nil, @"%@:00", @"Clock position format, short: {hours}:00");
break;
case NSFormattingUnitStyleMedium:
format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_MEDIUM", @"Foundation", nil, @"%@ o’clock", @"Clock position format, medium: {hours} o’clock");
break;
case NSFormattingUnitStyleLong:
format = NSLocalizedStringWithDefaultValue(@"CLOCK_FMT_LONG", @"Foundation", nil, @"%@ o’clock", @"Clock position format, long: {hours} o’clock");
break;
default:
break;
}
return [NSString stringWithFormat:format, [_numberFormatter stringFromNumber:@(hour)]];
}
- (nullable NSString *)stringForObjectValue:(id)obj {
if (![obj isKindOfClass:[NSValue class]]) {
return nil;
}
return [self stringFromDirection:[obj doubleValue]];
}
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error {
MGLAssert(NO, @"-getObjectValue:forString:errorDescription: has not been implemented");
return NO;
}
@end

View File

@@ -1,53 +0,0 @@
#import "MGLFoundation.h"
@protocol MGLFeature;
NS_ASSUME_NONNULL_BEGIN
/**
An `NSUInteger` constant used to indicate an invalid cluster identifier.
This indicates a missing cluster feature.
*/
FOUNDATION_EXTERN MGL_EXPORT const NSUInteger MGLClusterIdentifierInvalid;
/**
A protocol that feature subclasses (i.e. those already conforming to
the `MGLFeature` protocol) conform to if they represent clusters.
Currently the only class that conforms to `MGLCluster` is
`MGLPointFeatureCluster` (a subclass of `MGLPointFeature`).
To check if a feature is a cluster, check conformity to `MGLCluster`, for
example:
```swift
let shape = try! MGLShape(data: clusterShapeData, encoding: String.Encoding.utf8.rawValue)
guard let pointFeature = shape as? MGLPointFeature else {
throw ExampleError.unexpectedFeatureType
}
// Check for cluster conformance
guard let cluster = pointFeature as? MGLCluster else {
throw ExampleError.featureIsNotACluster
}
// Currently the only supported class that conforms to `MGLCluster` is
// `MGLPointFeatureCluster`
guard cluster is MGLPointFeatureCluster else {
throw ExampleError.unexpectedFeatureType
}
```
*/
MGL_EXPORT
@protocol MGLCluster <MGLFeature>
/** The identifier for the cluster. */
@property (nonatomic, readonly) NSUInteger clusterIdentifier;
/** The number of points within this cluster */
@property (nonatomic, readonly) NSUInteger clusterPointCount;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,43 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLCompassDirectionFormatter` class provides properly formatted
descriptions of absolute headings. For example, a value of `90` may be
formatted as “east”, depending on the locale.
Use this class to create localized heading strings when displaying directions
irrespective of the user’s current location. To format a direction relative to
the user’s current location, use `MGLClockDirectionFormatter` instead.
*/
MGL_EXPORT
@interface MGLCompassDirectionFormatter : NSFormatter
/**
The unit style used by this formatter.
This property defaults to `NSFormattingUnitStyleMedium`.
*/
@property (nonatomic) NSFormattingUnitStyle unitStyle;
/**
Returns a heading string for the provided value.
@param direction The heading, measured in degrees, where 0° means “due north”
and 90° means “due east”.
@return The heading string appropriately formatted for the formatter’s locale.
*/
- (NSString *)stringFromDirection:(CLLocationDirection)direction;
/**
This method is not supported for the `MGLDirectionFormatter` class.
*/
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,125 +0,0 @@
#import "MGLCompassDirectionFormatter.h"
#import "NSBundle+MGLAdditions.h"
#import "MGLLoggingConfiguration_Private.h"
#define wrap(value, min, max) \
(fmod((fmod((value - min), (max - min)) + (max - min)), (max - min)) + min)
@implementation MGLCompassDirectionFormatter
- (instancetype)init {
if (self = [super init]) {
_unitStyle = NSFormattingUnitStyleMedium;
}
return self;
}
- (NSString *)stringFromDirection:(CLLocationDirection)direction {
static NSArray<NSString *> *shortStrings;
static NSArray<NSString *> *longStrings;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
shortStrings = @[
NSLocalizedStringWithDefaultValue(@"COMPASS_N_SHORT", @"Foundation", nil, @"N", @"North, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NbE_SHORT", @"Foundation", nil, @"NbE", @"North by east, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NNE_SHORT", @"Foundation", nil, @"NNE", @"North-northeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NEbN_SHORT", @"Foundation", nil, @"NEbN", @"Northeast by north, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NE_SHORT", @"Foundation", nil, @"NE", @"Northeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NEbE_SHORT", @"Foundation", nil, @"NEbE", @"Northeast by east, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_ENE_SHORT", @"Foundation", nil, @"ENE", @"East-northeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_EbN_SHORT", @"Foundation", nil, @"EbN", @"East by north, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_E_SHORT", @"Foundation", nil, @"E", @"East, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_EbS_SHORT", @"Foundation", nil, @"EbS", @"East by south, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_ESE_SHORT", @"Foundation", nil, @"ESE", @"East-southeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SEbE_SHORT", @"Foundation", nil, @"SEbE", @"Southeast by east, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SE_SHORT", @"Foundation", nil, @"SE", @"Southeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SEbS_SHORT", @"Foundation", nil, @"SEbS", @"Southeast by south, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SSE_SHORT", @"Foundation", nil, @"SSE", @"South-southeast, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SbE_SHORT", @"Foundation", nil, @"SbE", @"South by east, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_S_SHORT", @"Foundation", nil, @"S", @"South, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SbW_SHORT", @"Foundation", nil, @"SbW", @"South by west, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SSW_SHORT", @"Foundation", nil, @"SSW", @"South-southwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SWbS_SHORT", @"Foundation", nil, @"SWbS", @"Southwest by south, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SW_SHORT", @"Foundation", nil, @"SW", @"Southwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SWbW_SHORT", @"Foundation", nil, @"SWbW", @"Southwest by west, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WSW_SHORT", @"Foundation", nil, @"WSW", @"West-southwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WbS_SHORT", @"Foundation", nil, @"WbS", @"West by south, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_W_SHORT", @"Foundation", nil, @"W", @"West, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WbN_SHORT", @"Foundation", nil, @"WbN", @"West by north, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WNW_SHORT", @"Foundation", nil, @"WNW", @"West-northwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NWbW_SHORT", @"Foundation", nil, @"NWbW", @"Northwest by west, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NW_SHORT", @"Foundation", nil, @"NW", @"Northwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NWbN_SHORT", @"Foundation", nil, @"NWbN", @"Northwest by north, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NNW_SHORT", @"Foundation", nil, @"NNW", @"North-northwest, short"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NbW_SHORT", @"Foundation", nil, @"NbW", @"North by west, short"),
];
longStrings = @[
NSLocalizedStringWithDefaultValue(@"COMPASS_N_LONG", @"Foundation", nil, @"north", @"North, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NbE_LONG", @"Foundation", nil, @"north by east", @"North by east, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NNE_LONG", @"Foundation", nil, @"north-northeast", @"North-northeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NEbN_LONG", @"Foundation", nil, @"northeast by north", @"Northeast by north, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NE_LONG", @"Foundation", nil, @"northeast", @"Northeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NEbE_LONG", @"Foundation", nil, @"northeast by east", @"Northeast by east, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_ENE_LONG", @"Foundation", nil, @"east-northeast", @"East-northeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_EbN_LONG", @"Foundation", nil, @"east by north", @"East by north, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_E_LONG", @"Foundation", nil, @"east", @"East, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_EbS_LONG", @"Foundation", nil, @"east by south", @"East by south, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_ESE_LONG", @"Foundation", nil, @"east-southeast", @"East-southeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SEbE_LONG", @"Foundation", nil, @"southeast by east", @"Southeast by east, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SE_LONG", @"Foundation", nil, @"southeast", @"Southeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SEbS_LONG", @"Foundation", nil, @"southeast by south", @"Southeast by south, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SSE_LONG", @"Foundation", nil, @"south-southeast", @"South-southeast, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SbE_LONG", @"Foundation", nil, @"south by east", @"South by east, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_S_LONG", @"Foundation", nil, @"south", @"South, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SbW_LONG", @"Foundation", nil, @"south by west", @"South by west, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SSW_LONG", @"Foundation", nil, @"south-southwest", @"South-southwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SWbS_LONG", @"Foundation", nil, @"southwest by south", @"Southwest by south, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SW_LONG", @"Foundation", nil, @"southwest", @"Southwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_SWbW_LONG", @"Foundation", nil, @"southwest by west", @"Southwest by west, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WSW_LONG", @"Foundation", nil, @"west-southwest", @"West-southwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WbS_LONG", @"Foundation", nil, @"west by south", @"West by south, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_W_LONG", @"Foundation", nil, @"west", @"West, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WbN_LONG", @"Foundation", nil, @"west by north", @"West by north, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_WNW_LONG", @"Foundation", nil, @"west-northwest", @"West-northwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NWbW_LONG", @"Foundation", nil, @"northwest by west", @"Northwest by west, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NW_LONG", @"Foundation", nil, @"northwest", @"Northwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NWbN_LONG", @"Foundation", nil, @"northwest by north", @"Northwest by north, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NNW_LONG", @"Foundation", nil, @"north-northwest", @"North-northwest, long"),
NSLocalizedStringWithDefaultValue(@"COMPASS_NbW_LONG", @"Foundation", nil, @"north by west", @"North by west, long"),
];
MGLAssert(shortStrings.count == longStrings.count, @"Long and short compass direction string arrays must have the same size.");
});
NSInteger cardinalPoint = wrap(round(wrap(direction, 0, 360) / 360 * shortStrings.count), 0, shortStrings.count);
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
return shortStrings[cardinalPoint];
case NSFormattingUnitStyleMedium:
case NSFormattingUnitStyleLong:
return longStrings[cardinalPoint];
}
}
- (nullable NSString *)stringForObjectValue:(id)obj {
if (![obj isKindOfClass:[NSValue class]]) {
return nil;
}
return [self stringFromDirection:[obj doubleValue]];
}
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error {
MGLAssert(NO, @"-getObjectValue:forString:errorDescription: has not been implemented");
return NO;
}
@end

View File

@@ -1,167 +0,0 @@
#import "MGLFoundation.h"
#import "MGLGeometry.h"
#import "MGLTypes.h"
#import "MGLShapeSource.h"
NS_ASSUME_NONNULL_BEGIN
@protocol MGLFeature;
/**
An `NSNumber` object containing a Boolean value; specifies whether the shape of
an `MGLComputedShapeSource` should be wrapped to accomodate coordinates with
longitudes beyond −180 and 180. The default value is `NO`.
Setting this option to `YES` affects rendering performance.
This option is used with the `MGLComputedShapeSource` class; it is ignored when
creating an `MGLShapeSource` object.
*/
FOUNDATION_EXTERN MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionWrapsCoordinates;
/**
An `NSNumber` object containing a Boolean value; specifies whether the shape of
an `MGLComputedShapeSource` should be clipped at the edge of each tile. The
default value is `NO`.
Setting this option to `YES` affects rendering performance. Use this option to
clip `MGLPolyline`s and `MGLPolygon`s at tile boundaries without artifacts.
This option is used with the `MGLComputedShapeSource` class; it is ignored when
creating an `MGLShapeSource` object.
*/
FOUNDATION_EXTERN MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClipsCoordinates;
FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidDatasourceException;
/**
Data source for `MGLComputedShapeSource`. This protocol defines two optional methods for fetching
data, one based on tile coordinates, and one based on a bounding box. Classes that implement this
protocol must implement one, and only one of the methods. Methods on this protocol will not be
called on main thread, they will be called on the caller's `requestQueue`.
*/
@protocol MGLComputedShapeSourceDataSource <NSObject>
@optional
/**
Fetch features for a tile. This method will not be invoked on the main queue, it
will be invoked on the caller's `requestQueue`.
@param x Tile X coordinate.
@param y Tile Y coordinate.
@param zoomLevel Tile zoom level.
*/
- (NSArray<MGLShape <MGLFeature> *>*)featuresInTileAtX:(NSUInteger)x y:(NSUInteger)y zoomLevel:(NSUInteger)zoomLevel;
/**
Fetch features for a tile. This method will not be invoked on the main queue, it
will be invoked on the caller's `requestQueue`.
@param bounds The bounds to fetch data for.
@param zoomLevel Tile zoom level.
*/
- (NSArray<MGLShape <MGLFeature> *>*)featuresInCoordinateBounds:(MGLCoordinateBounds)bounds zoomLevel:(NSUInteger)zoomLevel;
@end
/**
`MGLComputedShapeSource` is a map content source that supplies vector shapes,
one tile at a time, to be shown on the map on demand. You implement a class
conforming to the `MGLComputedShapeSourceDataSource` protocol that returns
instances of `MGLShape` or `MGLFeature`, then add a computed shape source to an
`MGLStyle` object along with an `MGLVectorStyleLayer` object. The vector style
layer defines the appearance of any content supplied by the computed shape
source.
`MGLComputedShapeSource` is similar to `MGLShapeSource` but is optimized for
data sets that change dynamically or are too large to fit completely in memory.
It is also useful for data that is divided into tiles in a format other than
<a href="https://www.mapbox.com/vector-tiles/">Mapbox Vector Tiles</a>. For
<a href="http://geojson.org/">GeoJSON</a> data, use the `MGLShapeSource` class.
For static tiles or Mapbox Vector Tiles, use the `MGLVectorTileSource` class.
You can add and remove sources dynamically using methods such as
`-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`. This class
cannot be represented in a style JSON file; you must add it ot the style at
runtime.
*/
MGL_EXPORT
@interface MGLComputedShapeSource : MGLSource
/**
Returns a custom shape data source initialized with an identifier, and a
dictionary of options for the source according to the
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">style
specification</a>.
This class supports the following options:
`MGLShapeSourceOptionMinimumZoomLevel`, `MGLShapeSourceOptionMaximumZoomLevel`,
`MGLShapeSourceOptionBuffer`,
`MGLShapeSourceOptionSimplificationTolerance`,
`MGLShapeSourceOptionWrapsCoordinates`, and
`MGLShapeSourceOptionClipsCoordinates`. Shapes provided by a computed
shape source cannot be clustered.
@param identifier A string that uniquely identifies the source.
@param options An `NSDictionary` of options for this source.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier options:(nullable NSDictionary<MGLShapeSourceOption, id> *)options NS_DESIGNATED_INITIALIZER;
/**
Returns a custom shape data source initialized with an identifier, data source, and a
dictionary of options for the source according to the
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">style
specification</a>.
This class supports the following options:
`MGLShapeSourceOptionMinimumZoomLevel`, `MGLShapeSourceOptionMaximumZoomLevel`,
`MGLShapeSourceOptionBuffer`,
`MGLShapeSourceOptionSimplificationTolerance`,
`MGLShapeSourceOptionWrapsCoordinates`, and
`MGLShapeSourceOptionClipsCoordinates`. Shapes provided by a computed shape
source cannot be clustered.
@param identifier A string that uniquely identifies the source.
@param options An `NSDictionary` of options for this source.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier dataSource:(id<MGLComputedShapeSourceDataSource>)dataSource options:(nullable NSDictionary<MGLShapeSourceOption, id> *)options;
/**
Invalidates all the features and properties intersecting with or contained in
the specified bounds. New fetch requests will immediately be invoked on the
`MGLComputedShapeSourceDataSource`.
@param bounds Coordinate bounds to invalidate.
*/
- (void) invalidateBounds:(MGLCoordinateBounds)bounds;
/**
Invalidates all the feautres and properties of a given tile. A new fetch request
will immediately be invoked on the `MGLComputedShapeSourceDataSource`.
@param x Tile X coordinate.
@param y Tile Y coordinate.
@param zoomLevel Tile zoom level.
*/
- (void) invalidateTileAtX:(NSUInteger)x y:(NSUInteger)y zoomLevel:(NSUInteger)zoomLevel;
/**
Set a new set of features for a tile. This method can be invkoed from background threads.
For best performance, use this method only to update tiles that have already been requested
through `MGLComputedShapeSourceDataSource.`
@param features Features for the tile.
@param x Tile X coordinate.
@param y Tile Y coordinate.
@param zoomLevel Tile zoom level.
*/
- (void) setFeatures:(NSArray<MGLShape <MGLFeature> *>*)features inTileAtX:(NSUInteger)x y:(NSUInteger)y zoomLevel:(NSUInteger)zoomLevel;
/**
An object that implements the `MGLComputedShapeSourceDataSource` protocol that will be queried for tile data.
*/
@property (nonatomic, weak, nullable) id<MGLComputedShapeSourceDataSource> dataSource;
/**
A queue that calls to the data source will be made on.
*/
@property (nonatomic, readonly) NSOperationQueue *requestQueue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,249 +0,0 @@
#import "MGLComputedShapeSource_Private.h"
#import "MGLMapView_Private.h"
#import "MGLSource_Private.h"
#import "MGLShape_Private.h"
#import "MGLGeometry_Private.h"
#import "MGLShapeCollection.h"
#include <mbgl/map/map.hpp>
#include <mbgl/style/sources/custom_geometry_source.hpp>
#include <mbgl/tile/tile_id.hpp>
#include <mbgl/util/geojson.hpp>
const MGLExceptionName MGLInvalidDatasourceException = @"MGLInvalidDatasourceException";
const MGLShapeSourceOption MGLShapeSourceOptionWrapsCoordinates = @"MGLShapeSourceOptionWrapsCoordinates";
const MGLShapeSourceOption MGLShapeSourceOptionClipsCoordinates = @"MGLShapeSourceOptionClipsCoordinates";
mbgl::style::CustomGeometrySource::Options MBGLCustomGeometrySourceOptionsFromDictionary(NSDictionary<MGLShapeSourceOption, id> *options) {
mbgl::style::CustomGeometrySource::Options sourceOptions;
if (NSNumber *value = options[MGLShapeSourceOptionMinimumZoomLevel]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionMinimumZoomLevel must be an NSNumber."];
}
sourceOptions.zoomRange.min = value.integerValue;
}
if (NSNumber *value = options[MGLShapeSourceOptionMaximumZoomLevel]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionMaximumZoomLevel must be an NSNumber."];
}
sourceOptions.zoomRange.max = value.integerValue;
}
if (NSNumber *value = options[MGLShapeSourceOptionBuffer]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionBuffer must be an NSNumber."];
}
sourceOptions.tileOptions.buffer = value.integerValue;
}
if (NSNumber *value = options[MGLShapeSourceOptionSimplificationTolerance]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionSimplificationTolerance must be an NSNumber."];
}
sourceOptions.tileOptions.tolerance = value.doubleValue;
}
if (NSNumber *value = options[MGLShapeSourceOptionWrapsCoordinates]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionWrapsCoordinates must be an NSNumber."];
}
sourceOptions.tileOptions.wrap = value.boolValue;
}
if (NSNumber *value = options[MGLShapeSourceOptionClipsCoordinates]) {
if (![value isKindOfClass:[NSNumber class]]) {
[NSException raise:NSInvalidArgumentException
format:@"MGLShapeSourceOptionClipsCoordinates must be an NSNumber."];
}
sourceOptions.tileOptions.clip = value.boolValue;
}
return sourceOptions;
}
@interface MGLComputedShapeSource () {
std::unique_ptr<mbgl::style::CustomGeometrySource> _pendingSource;
}
@property (nonatomic, readwrite) NSDictionary *options;
@property (nonatomic, assign) BOOL dataSourceImplementsFeaturesForTile;
@property (nonatomic, assign) BOOL dataSourceImplementsFeaturesForBounds;
@end
@interface MGLComputedShapeSourceFetchOperation : NSOperation
@property (nonatomic, readonly) uint8_t z;
@property (nonatomic, readonly) uint32_t x;
@property (nonatomic, readonly) uint32_t y;
@property (nonatomic, assign) BOOL dataSourceImplementsFeaturesForTile;
@property (nonatomic, assign) BOOL dataSourceImplementsFeaturesForBounds;
@property (nonatomic, weak, nullable) id<MGLComputedShapeSourceDataSource> dataSource;
@property (nonatomic, nullable) mbgl::style::CustomGeometrySource *rawSource;
- (instancetype)initForSource:(MGLComputedShapeSource*)source tile:(const mbgl::CanonicalTileID&)tileId;
@end
@implementation MGLComputedShapeSourceFetchOperation
- (instancetype)initForSource:(MGLComputedShapeSource*)source tile:(const mbgl::CanonicalTileID&)tileID {
self = [super init];
_z = tileID.z;
_x = tileID.x;
_y = tileID.y;
_dataSourceImplementsFeaturesForTile = source.dataSourceImplementsFeaturesForTile;
_dataSourceImplementsFeaturesForBounds = source.dataSourceImplementsFeaturesForBounds;
_dataSource = source.dataSource;
mbgl::style::CustomGeometrySource *rawSource = static_cast<mbgl::style::CustomGeometrySource *>(source.rawSource);
_rawSource = rawSource;
return self;
}
- (void)main {
if ([self isCancelled]) {
return;
}
NSArray<MGLShape <MGLFeature> *> *data;
if(!self.dataSource) {
data = nil;
} else if(self.dataSourceImplementsFeaturesForTile) {
data = [self.dataSource featuresInTileAtX:self.x
y:self.y
zoomLevel:self.z];
} else {
mbgl::CanonicalTileID tileID = mbgl::CanonicalTileID(self.z, self.x, self.y);
mbgl::LatLngBounds tileBounds = mbgl::LatLngBounds(tileID);
data = [self.dataSource featuresInCoordinateBounds:MGLCoordinateBoundsFromLatLngBounds(tileBounds)
zoomLevel:self.z];
}
if(![self isCancelled]) {
mbgl::FeatureCollection featureCollection;
featureCollection.reserve(data.count);
for (MGLShape <MGLFeature> * feature in data) {
if ([feature isMemberOfClass:[MGLShapeCollection class]]) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSLog(@"MGLShapeCollection initialized with MGLFeatures will not retain attributes."
@"Use MGLShapeCollectionFeature to retain attributes instead."
@"This will be logged only once.");
});
}
mbgl::GeoJSONFeature geoJsonObject = [feature geoJSONObject].get<mbgl::GeoJSONFeature>();
featureCollection.push_back(geoJsonObject);
}
const auto geojson = mbgl::GeoJSON{featureCollection};
if(![self isCancelled] && self.rawSource) {
self.rawSource->setTileData(mbgl::CanonicalTileID(self.z, self.x, self.y), geojson);
}
}
}
- (void)cancel {
[super cancel];
self.rawSource = NULL;
}
@end
@implementation MGLComputedShapeSource
- (instancetype)initWithIdentifier:(NSString *)identifier options:(NSDictionary<MGLShapeSourceOption, id> *)options {
NSOperationQueue *requestQueue = [[NSOperationQueue alloc] init];
requestQueue.name = [NSString stringWithFormat:@"mgl.MGLComputedShapeSource.%@", identifier];
requestQueue.qualityOfService = NSQualityOfServiceUtility;
requestQueue.maxConcurrentOperationCount = 4;
auto sourceOptions = MBGLCustomGeometrySourceOptionsFromDictionary(options);
sourceOptions.fetchTileFunction = ^void(const mbgl::CanonicalTileID& tileID) {
NSOperation *operation = [[MGLComputedShapeSourceFetchOperation alloc] initForSource:self tile:tileID];
[requestQueue addOperation:operation];
};
sourceOptions.cancelTileFunction = ^void(const mbgl::CanonicalTileID& tileID) {
for (MGLComputedShapeSourceFetchOperation *operation in requestQueue.operations) {
if (operation.x == tileID.x && operation.y == tileID.y && operation.z == tileID.z) {
[operation cancel];
}
}
};
auto source = std::make_unique<mbgl::style::CustomGeometrySource>(identifier.UTF8String, sourceOptions);
if (self = [super initWithPendingSource:std::move(source)]) {
_requestQueue = requestQueue;
}
return self;
}
- (instancetype)initWithIdentifier:(NSString *)identifier dataSource:(id<MGLComputedShapeSourceDataSource>)dataSource options:(NSDictionary<MGLShapeSourceOption, id> *)options {
if (self = [self initWithIdentifier:identifier options:options]) {
[self setDataSource:dataSource];
}
return self;
}
- (void)dealloc {
[self.requestQueue cancelAllOperations];
}
- (void)setFeatures:(NSArray<MGLShape <MGLFeature> *>*)features inTileAtX:(NSUInteger)x y:(NSUInteger)y zoomLevel:(NSUInteger)zoomLevel {
MGLAssertStyleSourceIsValid();
mbgl::CanonicalTileID tileID = mbgl::CanonicalTileID((uint8_t)zoomLevel, (uint32_t)x, (uint32_t)y);
mbgl::FeatureCollection featureCollection;
featureCollection.reserve(features.count);
for (MGLShape <MGLFeature> * feature in features) {
mbgl::GeoJSONFeature geoJsonObject = [feature geoJSONObject].get<mbgl::GeoJSONFeature>();
featureCollection.push_back(geoJsonObject);
if ([feature isMemberOfClass:[MGLShapeCollection class]]) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSLog(@"MGLShapeCollection initialized with MGLFeatures will not retain attributes."
@"Use MGLShapeCollectionFeature to retain attributes instead."
@"This will be logged only once.");
});
}
}
const auto geojson = mbgl::GeoJSON{featureCollection};
static_cast<mbgl::style::CustomGeometrySource *>(self.rawSource)->setTileData(tileID, geojson);
}
- (void)setDataSource:(id<MGLComputedShapeSourceDataSource>)dataSource {
[self.requestQueue cancelAllOperations];
// Check which method the datasource implements, to avoid having to check for each tile
self.dataSourceImplementsFeaturesForTile = [dataSource respondsToSelector:@selector(featuresInTileAtX:y:zoomLevel:)];
self.dataSourceImplementsFeaturesForBounds = [dataSource respondsToSelector:@selector(featuresInCoordinateBounds:zoomLevel:)];
if (!self.dataSourceImplementsFeaturesForBounds && !self.dataSourceImplementsFeaturesForTile) {
[NSException raise:MGLInvalidDatasourceException
format:@"Datasource does not implement any MGLComputedShapeSourceDataSource methods"];
} else if (self.dataSourceImplementsFeaturesForBounds && self.dataSourceImplementsFeaturesForTile) {
[NSException raise:MGLInvalidDatasourceException
format:@"Datasource implements multiple MGLComputedShapeSourceDataSource methods"];
}
_dataSource = dataSource;
}
- (void) invalidateBounds:(MGLCoordinateBounds)bounds {
MGLAssertStyleSourceIsValid();
((mbgl::style::CustomGeometrySource *)self.rawSource)->invalidateRegion(MGLLatLngBoundsFromCoordinateBounds(bounds));
}
- (void) invalidateTileAtX:(NSUInteger)x y:(NSUInteger)y zoomLevel:(NSUInteger)z {
MGLAssertStyleSourceIsValid();
((mbgl::style::CustomGeometrySource *)self.rawSource)->invalidateTile(mbgl::CanonicalTileID(z, (unsigned int)x, (unsigned int)y));
}
@end

View File

@@ -1,12 +0,0 @@
#import "MGLFoundation.h"
#import "MGLTypes.h"
#import "MGLComputedShapeSource.h"
#include <mbgl/style/sources/custom_geometry_source.hpp>
NS_ASSUME_NONNULL_BEGIN
MGL_EXPORT
mbgl::style::CustomGeometrySource::Options MBGLCustomGeometrySourceOptionsFromDictionary(NSDictionary<MGLShapeSourceOption, id> *options);
NS_ASSUME_NONNULL_END

View File

@@ -1,159 +0,0 @@
#include <mbgl/style/conversion_impl.hpp>
NS_ASSUME_NONNULL_BEGIN
namespace mbgl {
namespace style {
namespace conversion {
// A wrapper class for `id`, so as not to confuse ARC.
class Holder {
public:
Holder(const id v) : value(v) {}
const id value;
};
template <>
class ConversionTraits<Holder> {
public:
static bool isUndefined(const Holder& holder) {
const id value = holder.value;
return !value || value == [NSNull null];
}
static bool isArray(const Holder& holder) {
const id value = holder.value;
return [value isKindOfClass:[NSArray class]];
}
static bool isObject(const Holder& holder) {
const id value = holder.value;
return [value isKindOfClass:[NSDictionary class]];
}
static std::size_t arrayLength(const Holder& holder) {
const id value = holder.value;
NSCAssert([value isKindOfClass:[NSArray class]], @"Value must be an NSArray for getLength().");
NSArray *array = value;
auto length = [array count];
NSCAssert(length <= std::numeric_limits<size_t>::max(), @"Array length out of bounds.");
return length;
}
static Holder arrayMember(const Holder& holder, std::size_t i) {
const id value = holder.value;
NSCAssert([value isKindOfClass:[NSArray class]], @"Value must be an NSArray for get(int).");
NSCAssert(i < NSUIntegerMax, @"Index must be less than NSUIntegerMax");
return {[value objectAtIndex: i]};
}
static optional<Holder> objectMember(const Holder& holder, const char *key) {
const id value = holder.value;
NSCAssert([value isKindOfClass:[NSDictionary class]], @"Value must be an NSDictionary for get(string).");
NSObject *member = [value objectForKey: @(key)];
if (member && member != [NSNull null]) {
return {member};
} else {
return {};
}
}
// Compiler is wrong about `Fn` parameter missing a nullability specifier.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability-completeness"
template <class Fn>
static optional<Error> eachMember(const Holder& holder, Fn&& visit) {
#pragma clang diagnostic pop
[holder.value enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
auto result = visit(std::string(static_cast<const char *>([key UTF8String])), obj);
if (result) {
*stop = YES;
}
}];
return {};
}
static optional<bool> toBool(const Holder& holder) {
const id value = holder.value;
if (_isBool(value)) {
return ((NSNumber *)value).boolValue;
} else {
return {};
}
}
static optional<float> toNumber(const Holder& holder) {
const id value = holder.value;
if (_isNumber(value)) {
return ((NSNumber *)value).floatValue;
} else {
return {};
}
}
static optional<double> toDouble(const Holder& holder) {
const id value = holder.value;
if (_isNumber(value)) {
return ((NSNumber *)value).doubleValue;
} else {
return {};
}
}
static optional<std::string> toString(const Holder& holder) {
const id value = holder.value;
if (_isString(value)) {
return std::string(static_cast<const char *>([value UTF8String]));
} else {
return {};
}
}
static optional<mbgl::Value> toValue(const Holder& holder) {
const id value = holder.value;
if (isUndefined(value)) {
return {};
} else if (_isBool(value)) {
return { *toBool(holder) };
} else if ( _isString(value)) {
return { *toString(holder) };
} else if (_isNumber(value)) {
return { *toDouble(holder) };
} else {
return {};
}
}
static optional<GeoJSON> toGeoJSON(const Holder&, Error& error) {
error = { "toGeoJSON not implemented" };
return {};
}
private:
static bool _isBool(const id value) {
if (![value isKindOfClass:[NSNumber class]]) return false;
// char: 32-bit boolean
// BOOL: 64-bit boolean
NSNumber *number = value;
return ((strcmp([number objCType], @encode(char)) == 0) ||
(strcmp([number objCType], @encode(BOOL)) == 0));
}
static bool _isNumber(const id value) {
return [value isKindOfClass:[NSNumber class]] && !_isBool(value);
}
static bool _isString(const id value) {
return [value isKindOfClass:[NSString class]];
}
};
inline Convertible makeConvertible(const id value) {
return Convertible(Holder(value));
}
} // namespace conversion
} // namespace style
} // namespace mbgl
NS_ASSUME_NONNULL_END

View File

@@ -1,56 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLCoordinateFormatter` class provides properly formatted descriptions of
geographic coordinate pairs. Use this class to create localized coordinate
strings when displaying location information to users.
*/
MGL_EXPORT
@interface MGLCoordinateFormatter : NSFormatter
/**
Determines whether the output may contain minutes of arc when nonzero.
The default value of this property is `YES`, causing the receiver to include
minutes of arc in its output. If `allowsSeconds` is `YES`, this property is
ignored and the output always includes minutes of arc.
*/
@property (nonatomic) BOOL allowsMinutes;
/**
Determines whether the output may contain seconds of arc when nonzero.
The default value of this property is `YES`, causing the receiver to include
seconds of arc in its output.
*/
@property (nonatomic) BOOL allowsSeconds;
/**
The unit style used by this formatter.
The default value of this property is `NSFormattingUnitStyleMedium`.
*/
@property (nonatomic) NSFormattingUnitStyle unitStyle;
/**
Returns a coordinate string for the provided value.
@param coordinate The coordinate’s value.
@return The coordinate string appropriately formatted for the formatter’s
locale.
*/
- (NSString *)stringFromCoordinate:(CLLocationCoordinate2D)coordinate;
/**
This method is not supported for the `MGLCoordinateFormatter` class.
*/
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,127 +0,0 @@
#import "MGLCoordinateFormatter.h"
#import "NSBundle+MGLAdditions.h"
#import "NSValue+MGLAdditions.h"
#import "MGLLoggingConfiguration_Private.h"
@implementation MGLCoordinateFormatter
- (instancetype)init {
if (self = [super init]) {
_allowsMinutes = YES;
_allowsSeconds = YES;
_unitStyle = NSFormattingUnitStyleMedium;
}
return self;
}
- (NSString *)stringFromCoordinate:(CLLocationCoordinate2D)coordinate {
NSString *positiveLatitudeFormat;
NSString *negativeLatitudeFormat;
NSString *positiveLongitudeFormat;
NSString *negativeLongitudeFormat;
NSString *stringFormat;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_SHORT", @"Foundation", nil, @"%@N", @"North latitude format, short: {latitude}");
negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_SHORT", @"Foundation", nil, @"%@S", @"South latitude format, short: {latitude}");
positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_SHORT", @"Foundation", nil, @"%@E", @"East longitude format, short: {longitude}");
negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_SHORT", @"Foundation", nil, @"%@W", @"West longitude format, short: {longitude}");
stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_SHORT", @"Foundation", nil, @"%@, %@", @"Coordinate pair format, short: {latitude}, {longitude}");
break;
case NSFormattingUnitStyleMedium:
positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_MEDIUM", @"Foundation", nil, @"%@ north", @"North latitude format, medium: {latitude}");
negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_MEDIUM", @"Foundation", nil, @"%@ south", @"South latitude format, medium: {latitude}");
positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_MEDIUM", @"Foundation", nil, @"%@ east", @"East longitude format, medium: {longitude}");
negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_MEDIUM", @"Foundation", nil, @"%@ west", @"West longitude format, medium: {longitude}");
stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_MEDIUM", @"Foundation", nil, @"%@, %@", @"Coordinate pair format, medium: {latitude}, {longitude}");
break;
case NSFormattingUnitStyleLong:
positiveLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_N_LONG", @"Foundation", nil, @"%@ north", @"North latitude format, long: {latitude}");
negativeLatitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_S_LONG", @"Foundation", nil, @"%@ south", @"South latitude format, long: {latitude}");
positiveLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_E_LONG", @"Foundation", nil, @"%@ east", @"East longitude format, long: {longitude}");
negativeLongitudeFormat = NSLocalizedStringWithDefaultValue(@"COORD_W_LONG", @"Foundation", nil, @"%@ west", @"West longitude format, long: {longitude}");
stringFormat = NSLocalizedStringWithDefaultValue(@"COORD_FMT_LONG", @"Foundation", nil, @"%@ by %@", @"Coordinate pair format, long: {latitude}, {longitude}");
break;
}
NSString *latitudeString = [self stringFromLocationDegrees:coordinate.latitude
positiveFormat:positiveLatitudeFormat
negativeFormat:negativeLatitudeFormat];
NSString *longitudeString = [self stringFromLocationDegrees:coordinate.longitude
positiveFormat:positiveLongitudeFormat
negativeFormat:negativeLongitudeFormat];
return [NSString stringWithFormat:stringFormat, latitudeString, longitudeString];
}
- (NSString *)stringFromLocationDegrees:(CLLocationDegrees)degrees positiveFormat:(NSString *)positiveFormat negativeFormat:(NSString *)negativeFormat {
CLLocationDegrees minutes = (fabs(degrees) - floor(fabs(degrees))) * 60;
CLLocationDegrees seconds = (minutes - floor(minutes)) * 60;
NSString *degreesFormat;
NSString *minutesFormat;
NSString *secondsFormat;
NSString *degreesMinutesFormat;
NSString *degreesMinutesSecondsFormat;
switch (self.unitStyle) {
case NSFormattingUnitStyleShort:
degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_SHORT", @"Foundation", nil, @"%d°", @"Degrees format, short: {degrees}");
minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_SHORT", @"Foundation", nil, @"%d′", @"Minutes format, short: {minutes}");
secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_SHORT", @"Foundation", nil, @"%d″", @"Seconds format, short: {seconds}");
degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_SHORT", @"Foundation", nil, @"%@%@", @"Coordinate format, short: {degrees}{minutes}");
degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_SHORT", @"Foundation", nil, @"%@%@%@", @"Coordinate format, short: {degrees}{minutes}{seconds}");
break;
case NSFormattingUnitStyleMedium:
degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_MEDIUM", @"Foundation", nil, @"%d°", @"Degrees format, medium: {degrees}");
minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_MEDIUM", @"Foundation", nil, @"%d′", @"Minutes format, medium: {minutes}");
secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_MEDIUM", @"Foundation", nil, @"%d″", @"Seconds format, medium: {seconds}");
degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_MEDIUM", @"Foundation", nil, @"%@%@", @"Coordinate format, medium: {degrees}{minutes}");
degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_MEDIUM", @"Foundation", nil, @"%@%@%@", @"Coordinate format, medium: {degrees}{minutes}{seconds}");
break;
case NSFormattingUnitStyleLong:
degreesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DEG_LONG", @"Foundation", nil, @"%d degree(s)", @"Degrees format, long");
minutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_MIN_LONG", @"Foundation", nil, @"%d minute(s)", @"Minutes format, long");
secondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_SEC_LONG", @"Foundation", nil, @"%d second(s)", @"Seconds format, long");
degreesMinutesFormat = NSLocalizedStringWithDefaultValue(@"COORD_DM_LONG", @"Foundation", nil, @"%@ and %@", @"Coordinate format, long: {degrees}{minutes}");
degreesMinutesSecondsFormat = NSLocalizedStringWithDefaultValue(@"COORD_DMS_LONG", @"Foundation", nil, @"%@, %@, and %@", @"Coordinate format, long: {degrees}{minutes}{seconds}");
break;
}
NSString *degreesString = [NSString stringWithFormat:degreesFormat, (int)floor(fabs(degrees))];
NSString *string;
if (trunc(seconds) > 0 && self.allowsSeconds) {
NSString *minutesString = [NSString stringWithFormat:minutesFormat, (int)floor(minutes)];
NSString *secondsString = [NSString stringWithFormat:secondsFormat, (int)round(seconds)];
string = [NSString stringWithFormat:degreesMinutesSecondsFormat,
degreesString, minutesString, secondsString];
} else if (trunc(minutes) > 0 && self.allowsMinutes) {
NSString *minutesString = [NSString stringWithFormat:minutesFormat, (int)round(minutes)];
string = [NSString stringWithFormat:degreesMinutesFormat,
degreesString, minutesString];
} else {
string = [NSString stringWithFormat:degreesFormat, (int)round(fabs(degrees))];
}
if (degrees == 0) {
return string;
}
return [NSString stringWithFormat:degrees > 0 ? positiveFormat : negativeFormat, string];
}
- (nullable NSString *)stringForObjectValue:(id)obj {
if (![obj isKindOfClass:[NSValue class]]) {
return nil;
}
return [self stringFromCoordinate:[obj MGLCoordinateValue]];
}
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error {
MGLAssert(NO, @"-getObjectValue:forString:errorDescription: has not been implemented");
return NO;
}
@end

View File

@@ -1,26 +0,0 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
`MGLDistanceFormatter` implements a formatter object meant to be used for
geographic distances. The user’s current locale will be used by default
but it can be overriden by changing the locale property of the numberFormatter.
*/
MGL_EXPORT
@interface MGLDistanceFormatter : NSLengthFormatter
/**
Returns a localized formatted string for the provided distance.
@param distance The distance, measured in meters.
@return A localized formatted distance string including units.
*/
- (NSString *)stringFromDistance:(CLLocationDistance)distance;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,35 +0,0 @@
#import "MGLDistanceFormatter.h"
@interface MGLDistanceFormatter()
@end
@implementation MGLDistanceFormatter
static const CLLocationDistance METERS_PER_MILE = 1609.344;
static const double YARDS_PER_MILE = 1760.0;
static const double FEET_PER_MILE = YARDS_PER_MILE * 3.0;
- (NSString *)stringFromDistance:(CLLocationDistance)distance {
double miles = distance / METERS_PER_MILE;
double feet = miles * FEET_PER_MILE;
NSLengthFormatterUnit unit = NSLengthFormatterUnitMillimeter;
[self unitStringFromMeters:distance usedUnit:&unit];
self.numberFormatter.roundingIncrement = @0.25;
if (unit == NSLengthFormatterUnitYard) {
if (miles > 0.2) {
unit = NSLengthFormatterUnitMile;
return [self stringFromValue:miles unit:unit];
} else {
unit = NSLengthFormatterUnitFoot;
self.numberFormatter.roundingIncrement = @1;
return [self stringFromValue:feet unit:unit];
}
} else {
return [self stringFromMeters:distance];
}
}
@end

View File

@@ -1,300 +0,0 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
#import "MGLPolyline.h"
#import "MGLPolygon.h"
#import "MGLPointAnnotation.h"
#import "MGLPointCollection.h"
#import "MGLShapeCollection.h"
#import "MGLCluster.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLFeature` protocol is used to provide details about geographic features
contained in an `MGLShapeSource` or `MGLVectorTileSource` object. Each concrete
subclass of `MGLShape` in turn has a subclass that conforms to this protocol. A
feature object associates a shape with an optional identifier and attributes.
You can add custom data to display on the map by creating feature objects and
adding them to an `MGLShapeSource` using the
`-[MGLShapeSource initWithIdentifier:shape:options:]` method or
`MGLShapeSource.shape` property.
In addition to adding data to the map, you can also extract data from the map:
`-[MGLMapView visibleFeaturesAtPoint:]` and related methods return feature
objects that correspond to features in the source. This enables you to inspect
the properties of features in vector tiles loaded by `MGLVectorTileSource`
objects. You also reuse these feature objects as overlay annotations.
While it is possible to add `MGLFeature`-conforming objects to the map as
annotations using `-[MGLMapView addAnnotations:]` and related methods, doing so
has trade-offs:
- Features added as annotations will not have `identifier` or `attributes`
properties when used with feature querying.
- Features added as annotations become interactive. Taps and selection can be
handled in `-[MGLMapViewDelegate mapView:didSelectAnnotation:]`.
*/
@protocol MGLFeature <MGLAnnotation>
/**
An object that uniquely identifies the feature in its containing content
source.
You can configure an `MGLVectorStyleLayer` object to include or exclude a
specific feature in an `MGLShapeSource` or `MGLVectorTileSource`. In the
`MGLVectorStyleLayer.predicate` property, compare the special `$id` attribute
to the feature’s identifier.
In vector tiles loaded by `MGLVectorTileSource` objects, the identifier
corresponds to the
<a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#42-features">feature identifier</a>
(`id`). If the source does not specify the feature’s identifier, the value of
this property is `nil`. If specified, the identifier may be an integer,
floating-point number, or string. These data types are mapped to instances of
the following Foundation classes:
<table>
<thead>
<tr><th>In the tile source</th><th>This property</th></tr>
</thead>
<tbody>
<tr><td>Integer</td> <td><code>NSNumber</code> (use the <code>unsignedLongLongValue</code> or <code>longLongValue</code> property)</td></tr>
<tr><td>Floating-point number</td> <td><code>NSNumber</code> (use the <code>doubleValue</code> property)</td></tr>
<tr><td>String</td> <td><code>NSString</code></td></tr>
</tbody>
</table>
For details about the identifiers used in most Mapbox-provided styles, consult
the
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a>
layer reference.
The identifier should be set before adding the feature to an `MGLShapeSource`
object; setting it afterwards has no effect on the map’s contents. While it is
possible to change this value on feature instances obtained from
`-[MGLMapView visibleFeaturesAtPoint:]` and related methods, doing so likewise
has no effect on the map’s contents.
*/
@property (nonatomic, copy, nullable) id identifier;
/**
A dictionary of attributes for this feature.
You can configure an `MGLVectorStyleLayer` object to include or exclude a
specific feature in an `MGLShapeSource` or `MGLVectorTileSource`. In the
`MGLVectorStyleLayer.predicate` property, compare a key of the attribute
dictionary to the value you want to include. For example, if you want an
`MGLLineStyleLayer` object to display only important features, you might assign
a value above 50 to the important features’ `importance` attribute, then set
`MGLVectorStyleLayer.predicate` to an `NSPredicate` with the format
`importance > 50`.
You can also configure many layout and paint attributes of an `MGLStyleLayer`
object to match the value of an attribute in this dictionary whenever it
renders this feature. For example, if you display features in an
`MGLShapeSource` using an `MGLCircleStyleLayer`, you can assign a `halfway`
attribute to each of the source’s features, then set
`MGLCircleStyleLayer.circleRadius` to an expression for the key path `halfway`.
The `MGLSymbolStyleLayer.text` and `MGLSymbolStyleLayer.iconImageName`
properties allow you to use attributes yet another way. For example, to label
features in an `MGLShapeSource` object by their names, you can assign a `name`
attribute to each of the source’s features, then set
`MGLSymbolStyleLayer.text` to an expression for the constant string value
`{name}`. See the
<a href="../predicates-and-expressions.html">Predicates and Expressions</a>
guide for more information about expressions.
In vector tiles loaded by `MGLVectorTileSource` objects, the keys and values of
each feature’s attribute dictionary are determined by the source. Each
attribute name is a string, while each attribute value may be a null value,
Boolean value, integer, floating-point number, or string. These data types are
mapped to instances of the following Foundation classes:
<table>
<thead>
<tr><th>In the tile source</th><th>In this dictionary</th></tr>
</thead>
<tbody>
<tr><td>Null</td> <td><code>NSNull</code></td></tr>
<tr><td>Boolean</td> <td><code>NSNumber</code> (use the <code>boolValue</code> property)</td></tr>
<tr><td>Integer</td> <td><code>NSNumber</code> (use the <code>unsignedLongLongValue</code> or <code>longLongValue</code> property)</td></tr>
<tr><td>Floating-point number</td> <td><code>NSNumber</code> (use the <code>doubleValue</code> property)</td></tr>
<tr><td>String</td> <td><code>NSString</code></td></tr>
</tbody>
</table>
For details about the attribute names and values found in Mapbox-provided
vector tile sources, consult the
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a>
and
<a href="https://www.mapbox.com/vector-tiles/mapbox-terrain/">Mapbox Terrain</a>
layer references.
When adding a feature to an `MGLShapeSource`, use the same Foundation types
listed above for each attribute value. In addition to the Foundation types, you
may also set an attribute to an `NSColor` (macOS) or `UIColor` (iOS), which
will be converted into its
<a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#types-color">CSS string representation</a>
when the feature is added to an `MGLShapeSource`. This can be convenient when
using the attribute to supply a value for a color-typed layout or paint
attribute via a key path expression.
Note that while it is possible to change this value on feature
instances obtained from `-[MGLMapView visibleFeaturesAtPoint:]` and related
methods, there will be no effect on the map. Setting this value can be useful
when the feature instance is used to initialize an `MGLShapeSource` and that
source is added to the map and styled.
*/
@property (nonatomic, copy) NSDictionary<NSString *, id> *attributes;
/**
Returns the feature attribute for the given attribute name.
See the `attributes` property’s documentation for details on keys and values
associated with this method.
*/
- (nullable id)attributeForKey:(NSString *)key;
/**
Returns a dictionary that can be serialized as a GeoJSON Feature representation
of an instance of an `MGLFeature` subclass.
The dictionary includes a `geometry` key corresponding to the receiver’s
underlying geometry data, a `properties` key corresponding to the receiver’s
`attributes` property, and an `id` key corresponding to the receiver’s
`identifier` property.
*/
- (NSDictionary<NSString *, id> *)geoJSONDictionary;
@end
/**
An `MGLEmptyFeature` object associates an empty shape with an optional
identifier and attributes.
*/
MGL_EXPORT
@interface MGLEmptyFeature : MGLShape <MGLFeature>
@end
/**
An `MGLPointFeature` object associates a point shape with an optional
identifier and attributes.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/runtime-multiple-annotations/">
Dynamically style interactive points</a> example to learn how to initialize
`MGLPointFeature` objects and add them to your map.
*/
MGL_EXPORT
@interface MGLPointFeature : MGLPointAnnotation <MGLFeature>
@end
/**
An `MGLPointFeatureCluster` object associates a point shape (with an optional
identifier and attributes) and represents a point cluster.
@see `MGLCluster`
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/clustering/">
Clustering point data</a> example to learn how to initialize
clusters and add them to your map.
*/
MGL_EXPORT
@interface MGLPointFeatureCluster : MGLPointFeature <MGLCluster>
@end
/**
An `MGLPolylineFeature` object associates a polyline shape with an optional
identifier and attributes.
A polyline feature is known as a
<a href="https://tools.ietf.org/html/rfc7946#section-3.1.4">LineString</a>
feature in GeoJSON.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/line-geojson/">
Add a line annotation from GeoJSON</a> example to learn how to initialize an
`MGLPolylineFeature` and add it to an `MGLMapView` object.
*/
MGL_EXPORT
@interface MGLPolylineFeature : MGLPolyline <MGLFeature>
@end
/**
An `MGLPolygonFeature` object associates a polygon shape with an optional
identifier and attributes.
*/
MGL_EXPORT
@interface MGLPolygonFeature : MGLPolygon <MGLFeature>
@end
/**
An `MGLPointCollectionFeature` object associates a point collection with an
optional identifier and attributes.
A point collection feature is known as a
<a href="https://tools.ietf.org/html/rfc7946#section-3.1.3">MultiPoint</a>
feature in GeoJSON.
*/
MGL_EXPORT
@interface MGLPointCollectionFeature : MGLPointCollection <MGLFeature>
@end
// https://github.com/mapbox/mapbox-gl-native/issues/7473
@compatibility_alias MGLMultiPointFeature MGLPointCollectionFeature;
/**
An `MGLMultiPolylineFeature` object associates a multipolyline shape with an
optional identifier and attributes.
A multipolyline feature is known as a
<a href="https://tools.ietf.org/html/rfc7946#section-3.1.5">MultiLineString</a>
feature in GeoJSON.
*/
MGL_EXPORT
@interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>
@end
/**
An `MGLMultiPolygonFeature` object associates a multipolygon shape with an
optional identifier and attributes.
*/
MGL_EXPORT
@interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>
@end
/**
An `MGLShapeCollectionFeature` object associates a shape collection with an
optional identifier and attributes.
`MGLShapeCollectionFeature` is most commonly used to add multiple shapes to a
single `MGLShapeSource`. Configure the appearance of an `MGLSource`’s shape
collection collectively using an `MGLSymbolStyleLayer` object, or use multiple
instances of `MGLCircleStyleLayer`, `MGLFillStyleLayer`, and
`MGLLineStyleLayer` to configure the appearance of each kind of shape inside
the collection.
A shape collection feature is known as a
<a href="https://tools.ietf.org/html/rfc7946#section-3.3">feature collection</a>
in GeoJSON.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/shape-collection/">
Add multiple shapes from a single shape source</a> example to learn how to
add shape data to your map using an `MGLShapeCollectionFeature` object.
*/
MGL_EXPORT
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
@property (nonatomic, copy, readonly) NSArray<MGLShape<MGLFeature> *> *shapes;
+ (instancetype)shapeCollectionWithShapes:(NSArray<MGLShape<MGLFeature> *> *)shapes;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,542 +0,0 @@
#import "MGLFoundation_Private.h"
#import "MGLFeature_Private.h"
#import "MGLCluster.h"
#import "MGLPointAnnotation.h"
#import "MGLPolyline.h"
#import "MGLPolygon.h"
#import "MGLValueEvaluator.h"
#import "MGLShape_Private.h"
#import "MGLPointCollection_Private.h"
#import "MGLPolyline_Private.h"
#import "MGLPolygon_Private.h"
#import "NSDictionary+MGLAdditions.h"
#import "NSArray+MGLAdditions.h"
#import "NSExpression+MGLPrivateAdditions.h"
#import "MGLLoggingConfiguration_Private.h"
#import <mbgl/util/geometry.hpp>
#import <mbgl/style/conversion/geojson.hpp>
#import <mapbox/feature.hpp>
// Cluster constants
static NSString * const MGLClusterIdentifierKey = @"cluster_id";
static NSString * const MGLClusterCountKey = @"point_count";
const NSUInteger MGLClusterIdentifierInvalid = NSUIntegerMax;
@interface MGLEmptyFeature ()
@end
@implementation MGLEmptyFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
self.attributes.count ? self.attributes : @"none"];
}
@end
@interface MGLPointFeature ()
@end
@implementation MGLPointFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, coordinate = %f, %f, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
self.coordinate.latitude, self.coordinate.longitude,
self.attributes.count ? self.attributes : @"none"];
}
@end
@implementation MGLPointFeatureCluster
- (NSUInteger)clusterIdentifier {
NSNumber *clusterNumber = MGL_OBJC_DYNAMIC_CAST([self attributeForKey:MGLClusterIdentifierKey], NSNumber);
MGLAssert(clusterNumber, @"Clusters should have a cluster_id");
if (!clusterNumber) {
return MGLClusterIdentifierInvalid;
}
NSUInteger clusterIdentifier = [clusterNumber unsignedIntegerValue];
MGLAssert(clusterIdentifier <= UINT32_MAX, @"Cluster identifiers are 32bit");
return clusterIdentifier;
}
- (NSUInteger)clusterPointCount {
NSNumber *count = MGL_OBJC_DYNAMIC_CAST([self attributeForKey:MGLClusterCountKey], NSNumber);
MGLAssert(count, @"Clusters should have a point_count");
return [count unsignedIntegerValue];
}
@end
@interface MGLPolylineFeature ()
@end
@implementation MGLPolylineFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, count = %lu, bounds = %@, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
(unsigned long)[self pointCount],
MGLStringFromCoordinateBounds(self.overlayBounds),
self.attributes.count ? self.attributes : @"none"];
}
@end
@interface MGLPolygonFeature ()
@end
@implementation MGLPolygonFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, count = %lu, bounds = %@, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
(unsigned long)[self pointCount],
MGLStringFromCoordinateBounds(self.overlayBounds),
self.attributes.count ? self.attributes : @"none"];
}
@end
@interface MGLPointCollectionFeature ()
@end
@implementation MGLPointCollectionFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
@end
@interface MGLMultiPolylineFeature ()
@end
@implementation MGLMultiPolylineFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, count = %lu, bounds = %@, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
(unsigned long)self.polylines.count,
MGLStringFromCoordinateBounds(self.overlayBounds),
self.attributes.count ? self.attributes : @"none"];
}
@end
@interface MGLMultiPolygonFeature ()
@end
@implementation MGLMultiPolygonFeature
@synthesize identifier;
@synthesize attributes = _attributes;
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
MGLLogDebug(@"Retrieving attributeForKey: %@", key);
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
return mbglFeature({[self geometryObject]}, identifier, self.attributes);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@, count = %lu, bounds = %@, attributes = %@>",
NSStringFromClass([self class]), (void *)self,
self.identifier ? [NSString stringWithFormat:@"\"%@\"", self.identifier] : self.identifier,
(unsigned long)self.polygons.count,
MGLStringFromCoordinateBounds(self.overlayBounds),
self.attributes.count ? self.attributes : @"none"];
}
@end
@interface MGLShapeCollectionFeature ()
@end
@implementation MGLShapeCollectionFeature
@synthesize identifier;
@synthesize attributes = _attributes;
@dynamic shapes;
+ (instancetype)shapeCollectionWithShapes:(NSArray<MGLShape<MGLFeature> *> *)shapes {
return [super shapeCollectionWithShapes:shapes];
}
MGL_DEFINE_FEATURE_INIT_WITH_CODER();
MGL_DEFINE_FEATURE_ENCODE();
MGL_DEFINE_FEATURE_IS_EQUAL();
MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER();
- (id)attributeForKey:(NSString *)key {
return self.attributes[key];
}
- (NSDictionary *)geoJSONDictionary {
return NSDictionaryFeatureForGeometry([super geoJSONDictionary], self.attributes, self.identifier);
}
- (mbgl::GeoJSON)geoJSONObject {
mbgl::FeatureCollection featureCollection;
featureCollection.reserve(self.shapes.count);
for (MGLShape <MGLFeature> *feature in self.shapes) {
auto geoJSONObject = feature.geoJSONObject;
MGLAssert(geoJSONObject.is<mbgl::GeoJSONFeature>(), @"Feature collection must only contain features.");
featureCollection.push_back(geoJSONObject.get<mbgl::GeoJSONFeature>());
}
return featureCollection;
}
@end
/**
Transforms an `mbgl::geometry::geometry` type into an instance of the
corresponding Objective-C geometry class.
*/
template <typename T>
class GeometryEvaluator {
private:
const mbgl::PropertyMap *shared_properties;
public:
GeometryEvaluator(const mbgl::PropertyMap *properties = nullptr):
shared_properties(properties)
{}
MGLShape <MGLFeature> * operator()(const mbgl::EmptyGeometry &) const {
MGLEmptyFeature *feature = [[MGLEmptyFeature alloc] init];
return feature;
}
MGLShape <MGLFeature> * operator()(const mbgl::Point<T> &geometry) const {
Class pointFeatureClass = [MGLPointFeature class];
// If we're dealing with a cluster, we should change the class type.
// This could be generic and build the subclass at runtime if it turns
// out we need to support more than point clusters.
if (shared_properties) {
auto clusterIt = shared_properties->find("cluster");
if (clusterIt != shared_properties->end()) {
auto clusterValue = clusterIt->second;
if (clusterValue.template is<bool>()) {
if (clusterValue.template get<bool>()) {
pointFeatureClass = [MGLPointFeatureCluster class];
}
}
}
}
MGLPointFeature *feature = [[pointFeatureClass alloc] init];
feature.coordinate = toLocationCoordinate2D(geometry);
return feature;
}
MGLShape <MGLFeature> * operator()(const mbgl::LineString<T> &geometry) const {
std::vector<CLLocationCoordinate2D> coordinates = toLocationCoordinates2D(geometry);
return [MGLPolylineFeature polylineWithCoordinates:&coordinates[0] count:coordinates.size()];
}
MGLShape <MGLFeature> * operator()(const mbgl::Polygon<T> &geometry) const {
return toShape<MGLPolygonFeature>(geometry);
}
MGLShape <MGLFeature> * operator()(const mbgl::MultiPoint<T> &geometry) const {
std::vector<CLLocationCoordinate2D> coordinates = toLocationCoordinates2D(geometry);
return [[MGLPointCollectionFeature alloc] initWithCoordinates:&coordinates[0] count:coordinates.size()];
}
MGLShape <MGLFeature> * operator()(const mbgl::MultiLineString<T> &geometry) const {
NSMutableArray *polylines = [NSMutableArray arrayWithCapacity:geometry.size()];
for (auto &lineString : geometry) {
std::vector<CLLocationCoordinate2D> coordinates = toLocationCoordinates2D(lineString);
MGLPolyline *polyline = [MGLPolyline polylineWithCoordinates:&coordinates[0] count:coordinates.size()];
[polylines addObject:polyline];
}
return [MGLMultiPolylineFeature multiPolylineWithPolylines:polylines];
}
MGLShape <MGLFeature> * operator()(const mbgl::MultiPolygon<T> &geometry) const {
NSMutableArray *polygons = [NSMutableArray arrayWithCapacity:geometry.size()];
for (auto &polygon : geometry) {
[polygons addObject:toShape(polygon)];
}
return [MGLMultiPolygonFeature multiPolygonWithPolygons:polygons];
}
MGLShape <MGLFeature> * operator()(const mapbox::geometry::geometry_collection<T> &collection) const {
NSMutableArray *shapes = [NSMutableArray arrayWithCapacity:collection.size()];
for (auto &geometry : collection) {
// This is very much like the transformation that happens in MGLFeaturesFromMBGLFeatures(), but these are raw geometries with no associated feature IDs or attributes.
MGLShape <MGLFeature> *shape = mapbox::geometry::geometry<T>::visit(geometry, *this);
[shapes addObject:shape];
}
return [MGLShapeCollectionFeature shapeCollectionWithShapes:shapes];
}
private:
static CLLocationCoordinate2D toLocationCoordinate2D(const mbgl::Point<T> &point) {
return CLLocationCoordinate2DMake(point.y, point.x);
}
static std::vector<CLLocationCoordinate2D> toLocationCoordinates2D(const std::vector<mbgl::Point<T>> &points) {
std::vector<CLLocationCoordinate2D> coordinates;
coordinates.reserve(points.size());
std::transform(points.begin(), points.end(), std::back_inserter(coordinates), toLocationCoordinate2D);
return coordinates;
}
template<typename U = MGLPolygon>
static U *toShape(const mbgl::Polygon<T> &geometry) {
auto &linearRing = geometry.front();
std::vector<CLLocationCoordinate2D> coordinates = toLocationCoordinates2D(linearRing);
NSMutableArray *innerPolygons;
if (geometry.size() > 1) {
innerPolygons = [NSMutableArray arrayWithCapacity:geometry.size() - 1];
for (auto iter = geometry.begin() + 1; iter != geometry.end(); iter++) {
auto &innerRing = *iter;
std::vector<CLLocationCoordinate2D> innerCoordinates = toLocationCoordinates2D(innerRing);
MGLPolygon *innerPolygon = [MGLPolygon polygonWithCoordinates:&innerCoordinates[0] count:innerCoordinates.size()];
[innerPolygons addObject:innerPolygon];
}
}
return [U polygonWithCoordinates:&coordinates[0] count:coordinates.size() interiorPolygons:innerPolygons];
}
};
template <typename T>
class GeoJSONEvaluator {
public:
MGLShape <MGLFeature> * operator()(const mbgl::Geometry<T> &geometry) const {
GeometryEvaluator<T> evaluator;
MGLShape <MGLFeature> *shape = mapbox::geometry::geometry<T>::visit(geometry, evaluator);
return shape;
}
MGLShape <MGLFeature> * operator()(const mbgl::GeoJSONFeature &feature) const {
MGLShape <MGLFeature> *shape = (MGLShape <MGLFeature> *)MGLFeatureFromMBGLFeature(feature);
return shape;
}
MGLShape <MGLFeature> * operator()(const mbgl::FeatureCollection &collection) const {
NSMutableArray *shapes = [NSMutableArray arrayWithCapacity:collection.size()];
for (const auto &feature : collection) {
[shapes addObject:MGLFeatureFromMBGLFeature(feature)];
}
return [MGLShapeCollectionFeature shapeCollectionWithShapes:shapes];
}
};
NSArray<MGLShape <MGLFeature> *> *MGLFeaturesFromMBGLFeatures(const std::vector<mbgl::Feature> &features) {
NSMutableArray *shapes = [NSMutableArray arrayWithCapacity:features.size()];
for (const auto &feature : features) {
[shapes addObject:MGLFeatureFromMBGLFeature(static_cast<mbgl::GeoJSONFeature>(feature))];
}
return shapes;
}
NSArray<MGLShape <MGLFeature> *> *MGLFeaturesFromMBGLFeatures(const std::vector<mbgl::GeoJSONFeature> &features) {
NSMutableArray *shapes = [NSMutableArray arrayWithCapacity:features.size()];
for (const auto &feature : features) {
[shapes addObject:MGLFeatureFromMBGLFeature(feature)];
}
return shapes;
}
id <MGLFeature> MGLFeatureFromMBGLFeature(const mbgl::GeoJSONFeature &feature) {
NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithCapacity:feature.properties.size()];
for (auto &pair : feature.properties) {
auto &value = pair.second;
ValueEvaluator evaluator;
attributes[@(pair.first.c_str())] = mbgl::Value::visit(value, evaluator);
}
GeometryEvaluator<double> evaluator(&feature.properties);
MGLShape <MGLFeature> *shape = mapbox::geometry::geometry<double>::visit(feature.geometry, evaluator);
if (!feature.id.is<mapbox::feature::null_value_t>()) {
shape.identifier = mbgl::FeatureIdentifier::visit(feature.id, ValueEvaluator());
}
shape.attributes = attributes;
return shape;
}
MGLShape* MGLShapeFromGeoJSON(const mapbox::geojson::geojson &geojson) {
GeoJSONEvaluator<double> evaluator;
MGLShape *shape = mapbox::geojson::geojson::visit(geojson, evaluator);
return shape;
}
mbgl::GeoJSONFeature mbglFeature(mbgl::GeoJSONFeature feature, id identifier, NSDictionary *attributes)
{
if (identifier) {
NSExpression *identifierExpression = [NSExpression expressionForConstantValue:identifier];
feature.id = [identifierExpression mgl_featureIdentifier];
}
feature.properties = [attributes mgl_propertyMap];
return feature;
}
NSDictionary<NSString *, id> *NSDictionaryFeatureForGeometry(NSDictionary *geometry, NSDictionary *attributes, id identifier) {
NSMutableDictionary *feature = [@{@"type": @"Feature",
@"properties": attributes,
@"geometry": geometry} mutableCopy];
feature[@"id"] = identifier;
return [feature copy];
}

View File

@@ -1,85 +0,0 @@
#import "MGLFoundation.h"
#import "MGLFeature.h"
#import "MGLShape.h"
#import <mbgl/util/geo.hpp>
#import <mbgl/util/feature.hpp>
#import <mbgl/style/conversion/geojson.hpp>
NS_ASSUME_NONNULL_BEGIN
/**
Returns an array of `MGLFeature` objects converted from the given vector of
vector tile features.
*/
MGL_EXPORT
NSArray<MGLShape <MGLFeature> *> *MGLFeaturesFromMBGLFeatures(const std::vector<mbgl::Feature> &features);
/**
Returns an array of `MGLFeature` objects converted from the given vector of
vector tile features.
*/
MGL_EXPORT
NSArray<MGLShape <MGLFeature> *> *MGLFeaturesFromMBGLFeatures(const std::vector<mbgl::GeoJSONFeature> &features);
/**
Returns an `MGLFeature` object converted from the given mbgl::GeoJSONFeature
*/
MGL_EXPORT
id <MGLFeature> MGLFeatureFromMBGLFeature(const mbgl::GeoJSONFeature &feature);
/**
Returns an `MGLShape` representing the given geojson. The shape can be
a feature, a collection of features, or a geometry.
*/
MGLShape* MGLShapeFromGeoJSON(const mapbox::geojson::geojson &geojson);
/**
Takes an `mbgl::GeoJSONFeature` object, an identifer, and attributes dictionary and
returns the feature object with converted `mbgl::FeatureIdentifier` and
`mbgl::PropertyMap` properties.
*/
mbgl::GeoJSONFeature mbglFeature(mbgl::GeoJSONFeature feature, id identifier, NSDictionary * attributes);
/**
Returns an `NSDictionary` representation of an `MGLFeature`.
*/
NSDictionary<NSString *, id> *NSDictionaryFeatureForGeometry(NSDictionary *geometry, NSDictionary *attributes, id identifier);
NS_ASSUME_NONNULL_END
#define MGL_DEFINE_FEATURE_INIT_WITH_CODER() \
- (instancetype)initWithCoder:(NSCoder *)decoder { \
if (self = [super initWithCoder:decoder]) { \
NSSet<Class> *identifierClasses = [NSSet setWithArray:@[[NSString class], [NSNumber class]]]; \
identifier = [decoder decodeObjectOfClasses:identifierClasses forKey:@"identifier"]; \
_attributes = [decoder decodeObjectOfClass:[NSDictionary class] forKey:@"attributes"]; \
} \
return self; \
}
#define MGL_DEFINE_FEATURE_ENCODE() \
- (void)encodeWithCoder:(NSCoder *)coder { \
[super encodeWithCoder:coder]; \
[coder encodeObject:identifier forKey:@"identifier"]; \
[coder encodeObject:_attributes forKey:@"attributes"]; \
}
#define MGL_DEFINE_FEATURE_IS_EQUAL() \
- (BOOL)isEqual:(id)other { \
if (other == self) return YES; \
if (![other isKindOfClass:[self class]]) return NO; \
__typeof(self) otherFeature = other; \
return [super isEqual:other] && [self geoJSONObject] == [otherFeature geoJSONObject]; \
} \
- (NSUInteger)hash { \
return [super hash] + [[self geoJSONDictionary] hash]; \
}
#define MGL_DEFINE_FEATURE_ATTRIBUTES_GETTER() \
- (NSDictionary *) attributes { \
if (!_attributes) { \
return @{}; \
} \
return _attributes; \
}

View File

@@ -1,388 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLFoundation.h"
#import "MGLVectorStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
/**
Controls the frame of reference for
`MGLFillExtrusionStyleLayer.fillExtrusionTranslation`.
Values of this type are used in the `MGLFillExtrusionStyleLayer.fillExtrusionTranslationAnchor`
property.
*/
typedef NS_ENUM(NSUInteger, MGLFillExtrusionTranslationAnchor) {
/**
The fill extrusion is translated relative to the map.
*/
MGLFillExtrusionTranslationAnchorMap,
/**
The fill extrusion is translated relative to the viewport.
*/
MGLFillExtrusionTranslationAnchorViewport,
};
/**
An `MGLFillExtrusionStyleLayer` is a style layer that renders one or more 3D
extruded polygons on the map.
Use a fill-extrusion style layer to configure the visual appearance of polygon
or multipolygon features. These features can come from vector tiles loaded by
an `MGLVectorTileSource` object, or they can be `MGLPolygon`,
`MGLPolygonFeature`, `MGLMultiPolygon`, or `MGLMultiPolygonFeature` instances
in an `MGLShapeSource` or `MGLComputedShapeSource` object.
You can access an existing fill-extrusion style layer using the
`-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
otherwise, find it using the `MGLStyle.layers` property. You can also create a
new fill-extrusion style layer and add it to the style using a method such as
`-[MGLStyle addLayer:]`.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/extrusions/">Display
3D buildings</a> example to learn how to add and style 3D layers on a map.
### Example
```swift
let layer = MGLFillExtrusionStyleLayer(identifier: "buildings", source: buildings)
layer.sourceLayerIdentifier = "building"
layer.fillExtrusionHeight = NSExpression(forKeyPath: "height")
layer.fillExtrusionBase = NSExpression(forKeyPath: "min_height")
layer.predicate = NSPredicate(format: "extrude == 'true'")
mapView.style?.addLayer(layer)
```
*/
MGL_EXPORT
@interface MGLFillExtrusionStyleLayer : MGLVectorStyleLayer
/**
Returns a fill-extrusion style layer initialized with an identifier and source.
After initializing and configuring the style layer, add it to a map view’s
style using the `-[MGLStyle addLayer:]` or
`-[MGLStyle insertLayer:belowLayer:]` method.
@param identifier A string that uniquely identifies the source in the style to
which it is added.
@param source The source from which to obtain the data to style. If the source
has not yet been added to the current style, the behavior is undefined.
@return An initialized foreground style layer.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source;
#pragma mark - Accessing the Paint Attributes
/**
The height with which to extrude the base of this layer. Must be less than or
equal to `fillExtrusionHeight`.
This property is measured in meters.
The default value of this property is an expression that evaluates to the float
`0`. Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `fillExtrusionHeight` is
non-`nil`. Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant numeric values no less than 0
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionBase;
/**
The transition affecting any changes to this layer’s `fillExtrusionBase` property.
This property corresponds to the `fill-extrusion-base-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionBaseTransition;
#if TARGET_OS_IPHONE
/**
The base color of this layer. The extrusion's surfaces will be shaded
differently based on this color in combination with the `light` settings. If
this color is specified with an alpha component, the alpha component will be
ignored; use `fillExtrusionOpacity` to set layer opacityco.
The default value of this property is an expression that evaluates to
`UIColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `fillExtrusionPattern` is set to
`nil`. Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionColor;
#else
/**
The base color of this layer. The extrusion's surfaces will be shaded
differently based on this color in combination with the `light` settings. If
this color is specified with an alpha component, the alpha component will be
ignored; use `fillExtrusionOpacity` to set layer opacityco.
The default value of this property is an expression that evaluates to
`NSColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `fillExtrusionPattern` is set to
`nil`. Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionColor;
#endif
/**
The transition affecting any changes to this layer’s `fillExtrusionColor` property.
This property corresponds to the `fill-extrusion-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionColorTransition;
/**
Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If
true, sides will be shaded slightly darker farther down.
The default value of this property is an expression that evaluates to `YES`.
Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-extrusion-vertical-gradient"><code>fill-extrusion-vertical-gradient</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant Boolean values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionHasVerticalGradient;
@property (nonatomic, null_resettable) NSExpression *fillExtrusionVerticalGradient __attribute__((unavailable("Use fillExtrusionHasVerticalGradient instead.")));
/**
The height with which to extrude this layer.
This property is measured in meters.
The default value of this property is an expression that evaluates to the float
`0`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values no less than 0
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionHeight;
/**
The transition affecting any changes to this layer’s `fillExtrusionHeight` property.
This property corresponds to the `fill-extrusion-height-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionHeightTransition;
/**
The opacity of the entire fill extrusion layer. This is rendered on a
per-layer, not per-feature, basis, and data-driven styling is not available.
The default value of this property is an expression that evaluates to the float
`1`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values between 0 and 1 inclusive
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionOpacity;
/**
The transition affecting any changes to this layer’s `fillExtrusionOpacity` property.
This property corresponds to the `fill-extrusion-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionOpacityTransition;
/**
Name of image in style images to use for drawing image fill-extrusions. For
seamless patterns, image width and height must be a factor of two (2, 4, 8,
..., 512).
You can set this property to an expression containing any of the following:
* Constant string values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionPattern;
/**
The transition affecting any changes to this layer’s `fillExtrusionPattern` property.
This property corresponds to the `fill-extrusion-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionPatternTransition;
#if TARGET_OS_IPHONE
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points downward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-extrusion-translate"><code>fill-extrusion-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionTranslation;
#else
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points upward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-extrusion-translate"><code>fill-extrusion-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionTranslation;
#endif
/**
The transition affecting any changes to this layer’s `fillExtrusionTranslation` property.
This property corresponds to the `fill-extrusion-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillExtrusionTranslationTransition;
@property (nonatomic, null_resettable) NSExpression *fillExtrusionTranslate __attribute__((unavailable("Use fillExtrusionTranslation instead.")));
/**
Controls the frame of reference for `fillExtrusionTranslation`.
The default value of this property is an expression that evaluates to `map`.
Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `fillExtrusionTranslation` is
non-`nil`. Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-extrusion-translate-anchor"><code>fill-extrusion-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `MGLFillExtrusionTranslationAnchor` values
* Any of the following constant string values:
* `map`: The fill extrusion is translated relative to the map.
* `viewport`: The fill extrusion is translated relative to the viewport.
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillExtrusionTranslationAnchor;
@property (nonatomic, null_resettable) NSExpression *fillExtrusionTranslateAnchor __attribute__((unavailable("Use fillExtrusionTranslationAnchor instead.")));
@end
/**
Methods for wrapping an enumeration value for a style layer attribute in an
`MGLFillExtrusionStyleLayer` object and unwrapping its raw value.
*/
@interface NSValue (MGLFillExtrusionStyleLayerAdditions)
#pragma mark Working with Fill extrusion Style Layer Attribute Values
/**
Creates a new value object containing the given `MGLFillExtrusionTranslationAnchor` enumeration.
@param fillExtrusionTranslationAnchor The value for the new object.
@return A new value object that contains the enumeration value.
*/
+ (instancetype)valueWithMGLFillExtrusionTranslationAnchor:(MGLFillExtrusionTranslationAnchor)fillExtrusionTranslationAnchor;
/**
The `MGLFillExtrusionTranslationAnchor` enumeration representation of the value.
*/
@property (readonly) MGLFillExtrusionTranslationAnchor MGLFillExtrusionTranslationAnchorValue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,363 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLSource.h"
#import "NSPredicate+MGLPrivateAdditions.h"
#import "NSDate+MGLAdditions.h"
#import "MGLStyleLayer_Private.h"
#import "MGLStyleValue_Private.h"
#import "MGLFillExtrusionStyleLayer.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLFillExtrusionStyleLayer_Private.h"
#include <mbgl/style/layers/fill_extrusion_layer.hpp>
#include <mbgl/style/transition_options.hpp>
namespace mbgl {
MBGL_DEFINE_ENUM(MGLFillExtrusionTranslationAnchor, {
{ MGLFillExtrusionTranslationAnchorMap, "map" },
{ MGLFillExtrusionTranslationAnchorViewport, "viewport" },
});
}
@interface MGLFillExtrusionStyleLayer ()
@property (nonatomic, readonly) mbgl::style::FillExtrusionLayer *rawLayer;
@end
@implementation MGLFillExtrusionStyleLayer
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source
{
MGLLogDebug(@"Initializing %@ with identifier: %@ source: %@", NSStringFromClass([self class]), identifier, source);
auto layer = std::make_unique<mbgl::style::FillExtrusionLayer>(identifier.UTF8String, source.identifier.UTF8String);
return self = [super initWithPendingLayer:std::move(layer)];
}
- (mbgl::style::FillExtrusionLayer *)rawLayer
{
return (mbgl::style::FillExtrusionLayer *)super.rawLayer;
}
- (NSString *)sourceIdentifier
{
MGLAssertStyleLayerIsValid();
return @(self.rawLayer->getSourceID().c_str());
}
- (NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
auto layerID = self.rawLayer->getSourceLayer();
return layerID.empty() ? nil : @(layerID.c_str());
}
- (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting sourceLayerIdentifier: %@", sourceLayerIdentifier);
self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: "");
}
- (void)setPredicate:(NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting predicate: %@", predicate);
self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::Filter());
}
- (NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()];
}
#pragma mark - Accessing the Paint Attributes
- (void)setFillExtrusionBase:(NSExpression *)fillExtrusionBase {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionBase: %@", fillExtrusionBase);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(fillExtrusionBase, true);
self.rawLayer->setFillExtrusionBase(mbglValue);
}
- (NSExpression *)fillExtrusionBase {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionBase();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionBase();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillExtrusionBaseTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionBaseTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionBaseTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionBaseTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionBaseTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionColor:(NSExpression *)fillExtrusionColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionColor: %@", fillExtrusionColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(fillExtrusionColor, true);
self.rawLayer->setFillExtrusionColor(mbglValue);
}
- (NSExpression *)fillExtrusionColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setFillExtrusionColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionHasVerticalGradient:(NSExpression *)fillExtrusionHasVerticalGradient {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionHasVerticalGradient: %@", fillExtrusionHasVerticalGradient);
auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<bool>>(fillExtrusionHasVerticalGradient, false);
self.rawLayer->setFillExtrusionVerticalGradient(mbglValue);
}
- (NSExpression *)fillExtrusionHasVerticalGradient {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionVerticalGradient();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionVerticalGradient();
}
return MGLStyleValueTransformer<bool, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillExtrusionVerticalGradient:(NSExpression *)fillExtrusionVerticalGradient {
}
- (NSExpression *)fillExtrusionVerticalGradient {
return self.fillExtrusionHasVerticalGradient;
}
- (void)setFillExtrusionHeight:(NSExpression *)fillExtrusionHeight {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionHeight: %@", fillExtrusionHeight);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(fillExtrusionHeight, true);
self.rawLayer->setFillExtrusionHeight(mbglValue);
}
- (NSExpression *)fillExtrusionHeight {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionHeight();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionHeight();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillExtrusionHeightTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionHeightTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionHeightTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionHeightTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionHeightTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionOpacity:(NSExpression *)fillExtrusionOpacity {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionOpacity: %@", fillExtrusionOpacity);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(fillExtrusionOpacity, false);
self.rawLayer->setFillExtrusionOpacity(mbglValue);
}
- (NSExpression *)fillExtrusionOpacity {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionOpacity();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionOpacity();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillExtrusionOpacityTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionOpacityTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionOpacityTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionOpacityTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionOpacityTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionPattern:(NSExpression *)fillExtrusionPattern {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionPattern: %@", fillExtrusionPattern);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::expression::Image>>(fillExtrusionPattern, true);
self.rawLayer->setFillExtrusionPattern(mbglValue);
}
- (NSExpression *)fillExtrusionPattern {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionPattern();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionPattern();
}
return MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toExpression(propertyValue);
}
- (void)setFillExtrusionPatternTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionPatternTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionPatternTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionPatternTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionPatternTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionTranslation:(NSExpression *)fillExtrusionTranslation {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionTranslation: %@", fillExtrusionTranslation);
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue<mbgl::style::PropertyValue<std::array<float, 2>>>(fillExtrusionTranslation, false);
self.rawLayer->setFillExtrusionTranslate(mbglValue);
}
- (NSExpression *)fillExtrusionTranslation {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionTranslate();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionTranslate();
}
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toExpression(propertyValue);
}
- (void)setFillExtrusionTranslationTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionTranslationTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillExtrusionTranslateTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillExtrusionTranslationTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillExtrusionTranslateTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillExtrusionTranslate:(NSExpression *)fillExtrusionTranslate {
}
- (NSExpression *)fillExtrusionTranslate {
return self.fillExtrusionTranslation;
}
- (void)setFillExtrusionTranslationAnchor:(NSExpression *)fillExtrusionTranslationAnchor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillExtrusionTranslationAnchor: %@", fillExtrusionTranslationAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillExtrusionTranslationAnchor>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>>(fillExtrusionTranslationAnchor, false);
self.rawLayer->setFillExtrusionTranslateAnchor(mbglValue);
}
- (NSExpression *)fillExtrusionTranslationAnchor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillExtrusionTranslateAnchor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillExtrusionTranslateAnchor();
}
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillExtrusionTranslationAnchor>().toExpression(propertyValue);
}
- (void)setFillExtrusionTranslateAnchor:(NSExpression *)fillExtrusionTranslateAnchor {
}
- (NSExpression *)fillExtrusionTranslateAnchor {
return self.fillExtrusionTranslationAnchor;
}
@end
@implementation NSValue (MGLFillExtrusionStyleLayerAdditions)
+ (NSValue *)valueWithMGLFillExtrusionTranslationAnchor:(MGLFillExtrusionTranslationAnchor)fillExtrusionTranslationAnchor {
return [NSValue value:&fillExtrusionTranslationAnchor withObjCType:@encode(MGLFillExtrusionTranslationAnchor)];
}
- (MGLFillExtrusionTranslationAnchor)MGLFillExtrusionTranslationAnchorValue {
MGLFillExtrusionTranslationAnchor fillExtrusionTranslationAnchor;
[self getValue:&fillExtrusionTranslationAnchor];
return fillExtrusionTranslationAnchor;
}
@end
namespace mbgl {
MGLStyleLayer* FillExtrusionStyleLayerPeerFactory::createPeer(style::Layer* rawLayer) {
return [[MGLFillExtrusionStyleLayer alloc] initWithRawLayer:rawLayer];
}
} // namespace mbgl

View File

@@ -1,17 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#pragma once
#include "MGLStyleLayer_Private.h"
#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
namespace mbgl {
class FillExtrusionStyleLayerPeerFactory : public LayerPeerFactory, public mbgl::FillExtrusionLayerFactory {
// LayerPeerFactory overrides.
LayerFactory* getCoreLayerFactory() final { return this; }
virtual MGLStyleLayer* createPeer(style::Layer*) final;
};
} // namespace mbgl

View File

@@ -1,371 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLFoundation.h"
#import "MGLVectorStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
/**
Controls the frame of reference for `MGLFillStyleLayer.fillTranslation`.
Values of this type are used in the `MGLFillStyleLayer.fillTranslationAnchor`
property.
*/
typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
/**
The fill is translated relative to the map.
*/
MGLFillTranslationAnchorMap,
/**
The fill is translated relative to the viewport.
*/
MGLFillTranslationAnchorViewport,
};
/**
An `MGLFillStyleLayer` is a style layer that renders one or more filled (and
optionally stroked) polygons on the map.
Use a fill style layer to configure the visual appearance of polygon or
multipolygon features. These features can come from vector tiles loaded by an
`MGLVectorTileSource` object, or they can be `MGLPolygon`, `MGLPolygonFeature`,
`MGLMultiPolygon`, or `MGLMultiPolygonFeature` instances in an `MGLShapeSource`
or `MGLComputedShapeSource` object.
You can access an existing fill style layer using the
`-[MGLStyle layerWithIdentifier:]` method if you know its identifier;
otherwise, find it using the `MGLStyle.layers` property. You can also create a
new fill style layer and add it to the style using a method such as
`-[MGLStyle addLayer:]`.
#### Related examples
See the <a
href="https://docs.mapbox.com/ios/maps/examples/select-layer/">Select a feature
within a layer</a> example to learn how to use a `TERNARY` expression to modify
the `fillOpacity` of an `MGLFillStyleLayer` object. See the <a
href="https://docs.mapbox.com/ios/maps/examples/fill-pattern/">Add a pattern to
a polygon</a> example to learn how to use an image to add pattern to the
features styled by a `MGLFillStyleLayer`.
### Example
```swift
let layer = MGLFillStyleLayer(identifier: "parks", source: parks)
layer.sourceLayerIdentifier = "parks"
layer.fillColor = NSExpression(forConstantValue: UIColor.green)
layer.predicate = NSPredicate(format: "type == %@", "national-park")
mapView.style?.addLayer(layer)
```
*/
MGL_EXPORT
@interface MGLFillStyleLayer : MGLVectorStyleLayer
/**
Returns a fill style layer initialized with an identifier and source.
After initializing and configuring the style layer, add it to a map view’s
style using the `-[MGLStyle addLayer:]` or
`-[MGLStyle insertLayer:belowLayer:]` method.
@param identifier A string that uniquely identifies the source in the style to
which it is added.
@param source The source from which to obtain the data to style. If the source
has not yet been added to the current style, the behavior is undefined.
@return An initialized foreground style layer.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source;
#pragma mark - Accessing the Paint Attributes
/**
Whether or not the fill should be antialiased.
The default value of this property is an expression that evaluates to `YES`.
Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-antialias"><code>fill-antialias</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant Boolean values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable, getter=isFillAntialiased) NSExpression *fillAntialiased;
@property (nonatomic, null_resettable) NSExpression *fillAntialias __attribute__((unavailable("Use fillAntialiased instead.")));
#if TARGET_OS_IPHONE
/**
The color of the filled part of this layer.
The default value of this property is an expression that evaluates to
`UIColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `fillPattern` is set to `nil`.
Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillColor;
#else
/**
The color of the filled part of this layer.
The default value of this property is an expression that evaluates to
`NSColor.blackColor`. Set this property to `nil` to reset it to the default
value.
This property is only applied to the style if `fillPattern` is set to `nil`.
Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillColor;
#endif
/**
The transition affecting any changes to this layer’s `fillColor` property.
This property corresponds to the `fill-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillColorTransition;
/**
The opacity of the entire fill layer. In contrast to the `fillColor`, this
value will also affect the 1pt stroke around the fill, if the stroke is used.
The default value of this property is an expression that evaluates to the float
`1`. Set this property to `nil` to reset it to the default value.
You can set this property to an expression containing any of the following:
* Constant numeric values between 0 and 1 inclusive
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillOpacity;
/**
The transition affecting any changes to this layer’s `fillOpacity` property.
This property corresponds to the `fill-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillOpacityTransition;
#if TARGET_OS_IPHONE
/**
The outline color of the fill. Matches the value of `fillColor` if unspecified.
This property is only applied to the style if `fillPattern` is set to `nil`,
and `fillAntialiased` is set to an expression that evaluates to `YES`.
Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `UIColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillOutlineColor;
#else
/**
The outline color of the fill. Matches the value of `fillColor` if unspecified.
This property is only applied to the style if `fillPattern` is set to `nil`,
and `fillAntialiased` is set to an expression that evaluates to `YES`.
Otherwise, it is ignored.
You can set this property to an expression containing any of the following:
* Constant `NSColor` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillOutlineColor;
#endif
/**
The transition affecting any changes to this layer’s `fillOutlineColor` property.
This property corresponds to the `fill-outline-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillOutlineColorTransition;
/**
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). Note that
zoom-dependent expressions will be evaluated only at integer zoom levels.
You can set this property to an expression containing any of the following:
* Constant string values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable and/or
feature attributes
*/
@property (nonatomic, null_resettable) NSExpression *fillPattern;
/**
The transition affecting any changes to this layer’s `fillPattern` property.
This property corresponds to the `fill-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillPatternTransition;
#if TARGET_OS_IPHONE
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points downward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate"><code>fill-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillTranslation;
#else
/**
The geometry's offset.
This property is measured in points.
The default value of this property is an expression that evaluates to an
`NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
points upward. Set this property to `nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate"><code>fill-translate</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `CGVector` values
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Interpolation and step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation or step functions to
feature attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillTranslation;
#endif
/**
The transition affecting any changes to this layer’s `fillTranslation` property.
This property corresponds to the `fill-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillTranslationTransition;
@property (nonatomic, null_resettable) NSExpression *fillTranslate __attribute__((unavailable("Use fillTranslation instead.")));
/**
Controls the frame of reference for `fillTranslation`.
The default value of this property is an expression that evaluates to `map`.
Set this property to `nil` to reset it to the default value.
This property is only applied to the style if `fillTranslation` is non-`nil`.
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate-anchor"><code>fill-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
You can set this property to an expression containing any of the following:
* Constant `MGLFillTranslationAnchor` values
* Any of the following constant string values:
* `map`: The fill is translated relative to the map.
* `viewport`: The fill is translated relative to the viewport.
* Predefined functions, including mathematical and string operators
* Conditional expressions
* Variable assignments and references to assigned variables
* Step functions applied to the `$zoomLevel` variable
This property does not support applying interpolation functions to the
`$zoomLevel` variable or applying interpolation or step functions to feature
attributes.
*/
@property (nonatomic, null_resettable) NSExpression *fillTranslationAnchor;
@property (nonatomic, null_resettable) NSExpression *fillTranslateAnchor __attribute__((unavailable("Use fillTranslationAnchor instead.")));
@end
/**
Methods for wrapping an enumeration value for a style layer attribute in an
`MGLFillStyleLayer` object and unwrapping its raw value.
*/
@interface NSValue (MGLFillStyleLayerAdditions)
#pragma mark Working with Fill Style Layer Attribute Values
/**
Creates a new value object containing the given `MGLFillTranslationAnchor` enumeration.
@param fillTranslationAnchor The value for the new object.
@return A new value object that contains the enumeration value.
*/
+ (instancetype)valueWithMGLFillTranslationAnchor:(MGLFillTranslationAnchor)fillTranslationAnchor;
/**
The `MGLFillTranslationAnchor` enumeration representation of the value.
*/
@property (readonly) MGLFillTranslationAnchor MGLFillTranslationAnchorValue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,330 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#import "MGLSource.h"
#import "NSPredicate+MGLPrivateAdditions.h"
#import "NSDate+MGLAdditions.h"
#import "MGLStyleLayer_Private.h"
#import "MGLStyleValue_Private.h"
#import "MGLFillStyleLayer.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLFillStyleLayer_Private.h"
#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/transition_options.hpp>
namespace mbgl {
MBGL_DEFINE_ENUM(MGLFillTranslationAnchor, {
{ MGLFillTranslationAnchorMap, "map" },
{ MGLFillTranslationAnchorViewport, "viewport" },
});
}
@interface MGLFillStyleLayer ()
@property (nonatomic, readonly) mbgl::style::FillLayer *rawLayer;
@end
@implementation MGLFillStyleLayer
- (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source
{
MGLLogDebug(@"Initializing %@ with identifier: %@ source: %@", NSStringFromClass([self class]), identifier, source);
auto layer = std::make_unique<mbgl::style::FillLayer>(identifier.UTF8String, source.identifier.UTF8String);
return self = [super initWithPendingLayer:std::move(layer)];
}
- (mbgl::style::FillLayer *)rawLayer
{
return (mbgl::style::FillLayer *)super.rawLayer;
}
- (NSString *)sourceIdentifier
{
MGLAssertStyleLayerIsValid();
return @(self.rawLayer->getSourceID().c_str());
}
- (NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
auto layerID = self.rawLayer->getSourceLayer();
return layerID.empty() ? nil : @(layerID.c_str());
}
- (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting sourceLayerIdentifier: %@", sourceLayerIdentifier);
self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: "");
}
- (void)setPredicate:(NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting predicate: %@", predicate);
self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::Filter());
}
- (NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()];
}
#pragma mark - Accessing the Paint Attributes
- (void)setFillAntialiased:(NSExpression *)fillAntialiased {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillAntialiased: %@", fillAntialiased);
auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<bool>>(fillAntialiased, false);
self.rawLayer->setFillAntialias(mbglValue);
}
- (NSExpression *)isFillAntialiased {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillAntialias();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillAntialias();
}
return MGLStyleValueTransformer<bool, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillAntialias:(NSExpression *)fillAntialias {
}
- (NSExpression *)fillAntialias {
return self.isFillAntialiased;
}
- (void)setFillColor:(NSExpression *)fillColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillColor: %@", fillColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(fillColor, true);
self.rawLayer->setFillColor(mbglValue);
}
- (NSExpression *)fillColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setFillColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillOpacity:(NSExpression *)fillOpacity {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillOpacity: %@", fillOpacity);
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue<mbgl::style::PropertyValue<float>>(fillOpacity, true);
self.rawLayer->setFillOpacity(mbglValue);
}
- (NSExpression *)fillOpacity {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillOpacity();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillOpacity();
}
return MGLStyleValueTransformer<float, NSNumber *>().toExpression(propertyValue);
}
- (void)setFillOpacityTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillOpacityTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillOpacityTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillOpacityTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillOpacityTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillOutlineColor:(NSExpression *)fillOutlineColor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillOutlineColor: %@", fillOutlineColor);
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::Color>>(fillOutlineColor, true);
self.rawLayer->setFillOutlineColor(mbglValue);
}
- (NSExpression *)fillOutlineColor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillOutlineColor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillOutlineColor();
}
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toExpression(propertyValue);
}
- (void)setFillOutlineColorTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillOutlineColorTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillOutlineColorTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillOutlineColorTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillOutlineColorTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillPattern:(NSExpression *)fillPattern {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillPattern: %@", fillPattern);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::expression::Image>>(fillPattern, true);
self.rawLayer->setFillPattern(mbglValue);
}
- (NSExpression *)fillPattern {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillPattern();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillPattern();
}
return MGLStyleValueTransformer<mbgl::style::expression::Image, NSString *>().toExpression(propertyValue);
}
- (void)setFillPatternTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillPatternTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillPatternTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillPatternTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillPatternTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillTranslation:(NSExpression *)fillTranslation {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillTranslation: %@", fillTranslation);
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue<mbgl::style::PropertyValue<std::array<float, 2>>>(fillTranslation, false);
self.rawLayer->setFillTranslate(mbglValue);
}
- (NSExpression *)fillTranslation {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillTranslate();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillTranslate();
}
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toExpression(propertyValue);
}
- (void)setFillTranslationTransition:(MGLTransition )transition {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillTranslationTransition: %@", MGLStringFromMGLTransition(transition));
self.rawLayer->setFillTranslateTransition(MGLOptionsFromTransition(transition));
}
- (MGLTransition)fillTranslationTransition {
MGLAssertStyleLayerIsValid();
mbgl::style::TransitionOptions transitionOptions = self.rawLayer->getFillTranslateTransition();
return MGLTransitionFromOptions(transitionOptions);
}
- (void)setFillTranslate:(NSExpression *)fillTranslate {
}
- (NSExpression *)fillTranslate {
return self.fillTranslation;
}
- (void)setFillTranslationAnchor:(NSExpression *)fillTranslationAnchor {
MGLAssertStyleLayerIsValid();
MGLLogDebug(@"Setting fillTranslationAnchor: %@", fillTranslationAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillTranslationAnchor>().toPropertyValue<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>>(fillTranslationAnchor, false);
self.rawLayer->setFillTranslateAnchor(mbglValue);
}
- (NSExpression *)fillTranslationAnchor {
MGLAssertStyleLayerIsValid();
auto propertyValue = self.rawLayer->getFillTranslateAnchor();
if (propertyValue.isUndefined()) {
propertyValue = self.rawLayer->getDefaultFillTranslateAnchor();
}
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillTranslationAnchor>().toExpression(propertyValue);
}
- (void)setFillTranslateAnchor:(NSExpression *)fillTranslateAnchor {
}
- (NSExpression *)fillTranslateAnchor {
return self.fillTranslationAnchor;
}
@end
@implementation NSValue (MGLFillStyleLayerAdditions)
+ (NSValue *)valueWithMGLFillTranslationAnchor:(MGLFillTranslationAnchor)fillTranslationAnchor {
return [NSValue value:&fillTranslationAnchor withObjCType:@encode(MGLFillTranslationAnchor)];
}
- (MGLFillTranslationAnchor)MGLFillTranslationAnchorValue {
MGLFillTranslationAnchor fillTranslationAnchor;
[self getValue:&fillTranslationAnchor];
return fillTranslationAnchor;
}
@end
namespace mbgl {
MGLStyleLayer* FillStyleLayerPeerFactory::createPeer(style::Layer* rawLayer) {
return [[MGLFillStyleLayer alloc] initWithRawLayer:rawLayer];
}
} // namespace mbgl

View File

@@ -1,17 +0,0 @@
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
#pragma once
#include "MGLStyleLayer_Private.h"
#include <mbgl/layermanager/fill_layer_factory.hpp>
namespace mbgl {
class FillStyleLayerPeerFactory : public LayerPeerFactory, public mbgl::FillLayerFactory {
// LayerPeerFactory overrides.
LayerFactory* getCoreLayerFactory() final { return this; }
virtual MGLStyleLayer* createPeer(style::Layer*) final;
};
} // namespace mbgl

View File

@@ -1,36 +0,0 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
#import "MGLStyleLayer.h"
NS_ASSUME_NONNULL_BEGIN
@class MGLSource;
/**
`MGLForegroundStyleLayer` is an abstract superclass for style layers whose
content is defined by an `MGLSource` object.
Create instances of `MGLRasterStyleLayer`, `MGLHillshadeStyleLayer`, and the
concrete subclasses of `MGLVectorStyleLayer` in order to use
`MGLForegroundStyleLayer`'s methods. Do not create instances of
`MGLForegroundStyleLayer` directly, and do not create your own subclasses of
this class.
*/
MGL_EXPORT
@interface MGLForegroundStyleLayer : MGLStyleLayer
#pragma mark Initializing a Style Layer
- (instancetype)init __attribute__((unavailable("Use -init methods of concrete subclasses instead.")));
#pragma mark Specifying a Style Layer’s Content
/**
Identifier of the source from which the receiver obtains the data to style.
*/
@property (nonatomic, readonly, nullable) NSString *sourceIdentifier;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,26 +0,0 @@
#import "MGLForegroundStyleLayer.h"
#import "MGLStyleLayer_Private.h"
@implementation MGLForegroundStyleLayer
- (NSString *)sourceIdentifier {
[NSException raise:MGLAbstractClassException
format:@"MGLForegroundStyleLayer is an abstract class"];
return nil;
}
- (NSString *)description {
if (self.rawLayer) {
return [NSString stringWithFormat:
@"<%@: %p; identifier = %@; sourceIdentifier = %@; visible = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier,
self.sourceIdentifier, self.visible ? @"YES" : @"NO"];
}
else {
return [NSString stringWithFormat:
@"<%@: %p; identifier = %@; sourceIdentifier = <unknown>; visible = NO>",
NSStringFromClass([self class]), (void *)self, self.identifier];
}
}
@end

View File

@@ -1,5 +0,0 @@
#pragma once
#import <Foundation/Foundation.h>
#define MGL_EXPORT __attribute__((visibility ("default")))

Some files were not shown because too many files have changed in this diff Show More