Merged mapbox-gl-native-ios

This commit is contained in:
Petr Pokorny
2020-12-16 17:28:56 +01:00
983 changed files with 319510 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Inline
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 120
IndentWidth: 4
SpacesBeforeTrailingComments: 1
...

View File

@@ -0,0 +1,4 @@
Checks: '-*,bugprone-*,clang-analyzer-*,google-*,modernize-*,performance-*,-clang-analyzer-osx.*,-google-readability-braces-around-statements,-google-readability-todo,-google-runtime-int,-google-runtime-references'
WarningsAsErrors: 'bugprone-use-after-move,performance-move-const-arg'
HeaderFilterRegex: '.*'
FormatStyle: file

View File

@@ -0,0 +1,91 @@
# --------------------------
# General Formatting Options
# --------------------------
# How wide to allow formatted cmake files
line_width = 140
# How many spaces to tab for indent
tab_size = 4
# If arglists are longer than this, break them always
max_subargs_per_line = 3
# If true, separate flow control names from their parentheses with a space
separate_ctrl_name_with_space = False
# If true, separate function names from parentheses with a space
separate_fn_name_with_space = False
# If a statement is wrapped to more than one line, than dangle the closing
# parenthesis on it's own line
dangle_parens = True
# If the statement spelling length (including space and parenthesis is larger
# than the tab width by more than this amoung, then force reject un-nested
# layouts.
max_prefix_chars = 2
# If a candidate layout is wrapped horizontally but it exceeds this many lines,
# then reject the layout.
max_lines_hwrap = 8
# What style line endings to use in the output.
line_ending = u'unix'
# Format command names consistently as 'lower' or 'upper' case
command_case = u'canonical'
# Format keywords consistently as 'lower' or 'upper' case
keyword_case = u'unchanged'
# Specify structure for custom cmake functions
additional_commands = {
"add_node_module": {
"kwargs": {
"INSTALL_PATH": "*",
"NAN_VERSION": "*",
"EXCLUDE_NODE_ABIS": "*"
}
},
"target_compile_definitions": {
"kwargs": {
"PRIVATE": "*",
"PUBLIC": "*"
}
},
"target_sources": {
"kwargs": {
"INTERFACE": "*",
"PRIVATE": "*",
"PUBLIC": "*"
}
}
}
# A list of command names which should always be wrapped
always_wrap = [
"add_executable",
"add_library",
"set_source_files_properties",
"target_compile_definitions",
"target_include_directories",
"target_link_libraries",
"target_sources"
]
# Specify the order of wrapping algorithms during successive reflow attempts
algorithm_order = [0, 1, 2, 3, 4]
# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
enable_sort = True
# If true, the parsers may infer whether or not an argument list is sortable
# (without annotation).
autosort = True
# If a comment line starts with at least this many consecutive hash characters,
# then don't lstrip() them off. This allows for lazy hash rulers where the first
# hash char is not separated by space
hashruler_min_length = 10

12
mapbox-gl-native-ios/.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,12 @@
# iOS
/platform/ios/ @mapbox/maps-ios-reviewers
/platform/ios/docs/ @mapbox/docs
# macOS
/platform/macos/ @1ec5 @mapbox/maps-ios-reviewers
/platform/macos/docs @mapbox/docs
# Darwin
/platform/darwin/ @1ec5 @mapbox/maps-ios-reviewers

View File

@@ -0,0 +1,34 @@
---
name: iOS or macOS
about: Mapbox Maps SDK for iOS or macOS
labels: "status: triage"
---
<!--
Hello and thanks for contributing to the Mapbox Maps SDKs for iOS and macOS! To help us diagnose your problem quickly, please:
- Include a minimal demonstration of the bug, including code, logs, and screenshots.
- Ensure you can reproduce the bug using the latest release.
- Only post to report a bug or request a feature; direct all other questions to: https://stackoverflow.com/questions/tagged/mapbox
Start with a brief description below this line. -->
### Steps to reproduce
1.
2.
3.
### Expected behavior
### Actual behavior
### Configuration
**Mapbox SDK versions:**
**iOS/macOS versions:**
**Device/simulator models:**
**Xcode version:**

View File

@@ -0,0 +1,30 @@
---
name: Other
about: CI or other non-platform specific issues
labels: "status: triage"
---
<!--
Hello and thanks for contributing to the Mapbox Maps SDK! To help us diagnose your problem quickly, please:
- Include a minimal demonstration of the bug, including code, logs, and screenshots.
- Ensure you can reproduce the bug using the latest release.
- Only post to report a bug or request a feature; direct all other questions to: https://stackoverflow.com/questions/tagged/mapbox
For cross-platform requests, such as issues related to rendering cross-platform feature requests, please open an issue in the Mapbox GL Native Repo: https://www.github/com/mapbox-gl-native
For issues related to the Mapbox Maps SDK for Android, please see https://www.github/com/mapbox-gl-native-android
Otherwise, use this template to report issues related to anything in this repo not directly related to the iOS or macOS SDKs, such as CI issues.
-->
**Platform:**
**Mapbox SDK version:**
### Steps to trigger behavior
1.
2.
3.
### Expected behavior
### Actual behavior

View File

@@ -0,0 +1,8 @@
`<changelog>Replace text with suggested changelog entry for this PR or add the 'skip changelog' label.</changelog>`
<!-- Examples: -->
<!-- `<changelog>Enabled newly loaded labels to appear faster on the screen.</changelog>` -->
<!-- `<changelog>Added an option to set the minimum and maximum pitch of a `Map`.</changelog>`-->
<!-- `<changelog>Introduced `in` expression for testing whether an item exists in an array or a substring exists in a string.</changelog>`
<!-- `<changelog>Significantly improved offline pack download performance by marking resources as used in batches.</changelog>`
<!-- `<changelog>Fixed a bug where non-overlapping symbols would be sorted incorrectly with `MGLSymbolStyleLayer.symbolSortKey`.</changelog>` -->

28
mapbox-gl-native-ios/.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
# Configuration for probot-stale - https://github.com/probot/stale
exemptProjects: true
exemptMilestones: true
staleLabel: archived
limitPerRun: 1
# SEMVER-MAJOR - @tobrun
exemptLabels:
- SEMVER-MAJOR
pulls:
daysUntilStale: 60
daysUntilClose: -1
markComment: false
closeComment: >
This pull request has been automatically detected as stale because it has not had
recent activity and will be archived. Thank you for your contributions.
issues:
daysUntilStale: 180
daysUntilClose: -1
markComment: false
closeComment: >
This issue has been automatically detected as stale because it has not had
recent activity and will be archived. Thank you for your contributions.

52
mapbox-gl-native-ios/.gitignore vendored Normal file
View File

@@ -0,0 +1,52 @@
.DS_Store
.transifexrc
*.pyc
*.gcno
*.gcda
*~
**/actual.png
**/diff.png
render-test/index.html
offline.db
new_offline.db
xcuserdata
/platform/node/test/actual
/platform/node/test/diff
/mason_packages
/build
/next/build
/lib
/test/node_modules
/test/fixtures/*/*_actual.*
/test/fixtures/api/1.png
/test/fixtures/api/2.png
/test/fixtures/offline_database/offline.db
/test/fixtures/offline_database/offline.db-*
/test/output
/node_modules
/platform/ios/benchmark/assets/glyphs/DIN*
/platform/ios/benchmark/assets/tiles/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v6
/platform/darwin/developer.xcconfig
**/token
/platform/macos/macos.xcworkspace/xcshareddata/macos.xcscmblueprint
/platform/ios/ios.xcworkspace/xcshareddata/ios.xcscmblueprint
/documentation
test/fixtures/api/assets.zip
test/fixtures/storage/assets.zip
/.circle-week
/vendor/.cache
buck-out
.buckd
# Generated file from npm/yarn
package-lock.json
# Visual Studio Code
.vscode
mapbox-gl-native.code-workspace
# Generated list files from code generation
/scripts/generate-file-lists.list
/scripts/generate-shaders.list
/scripts/generate-style-code.list
*.patch

9
mapbox-gl-native-ios/.gitmodules vendored Normal file
View File

@@ -0,0 +1,9 @@
[submodule "platform/ios/vendor/mapbox-events-ios"]
path = platform/ios/vendor/mapbox-events-ios
url = https://github.com/mapbox/mapbox-events-ios.git
[submodule "platform/darwin/docs/theme"]
path = platform/darwin/docs/theme
url = https://github.com/mapbox/jazzy-theme.git
[submodule "vendor/mapbox-gl-native"]
path = vendor/mapbox-gl-native
url = https://github.com/mapbox/mapbox-gl-native.git

View File

@@ -0,0 +1,32 @@
Makefile
CmakeLists.txt
*yml
build
cmake
misc
.*
*tgz
benchmark
expression-test
cloudformation
bin
vendor
include
mason_packages
mapbox-gl-js
test
lib
next
src
scripts
render-test
platform/android
platform/darwin
platform/default
platform/glfw
platform/ios
platform/linux
platform/macos
platform/qt
platform/node/symbol-list
platform/node/version-script

View File

@@ -0,0 +1,45 @@
[main]
host = https://www.transifex.com
minimum_perc = 80
[mapbox-gl-native.foundationstrings-darwin]
file_filter = platform/darwin/resources/<lang>.lproj/Foundation.strings
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/darwin/resources/Base.lproj/Foundation.strings
source_lang = en
type = STRINGS
[mapbox-gl-native.foundationstringsdict-darwin]
file_filter = platform/darwin/resources/<lang>.lproj/Foundation.stringsdict
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/darwin/resources/en.lproj/Foundation.stringsdict
source_lang = en
type = STRINGSDICT
[mapbox-gl-native.localizablestrings-ios]
file_filter = platform/ios/resources/<lang>.lproj/Localizable.strings
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/ios/resources/Base.lproj/Localizable.strings
source_lang = en
type = STRINGS
[mapbox-gl-native.localizablestringsdict-ios]
file_filter = platform/ios/resources/<lang>.lproj/Localizable.stringsdict
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/ios/resources/en.lproj/Localizable.stringsdict
source_lang = en
type = STRINGSDICT
[mapbox-gl-native.localizablestrings-macos]
file_filter = platform/macos/sdk/<lang>.lproj/Localizable.strings
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/macos/sdk/Base.lproj/Localizable.strings
source_lang = en
type = STRINGS
[mapbox-gl-native.rootstrings-ios]
file_filter = platform/ios/app/Settings.bundle/<lang>.lproj/Root.strings
lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant
source_file = platform/ios/app/Settings.bundle/Base.lproj/Root.strings
source_lang = en
type = STRINGS

View File

@@ -0,0 +1,8 @@
# Changelog
Each Mapbox GL Native SDK has a separate changelog that highlights changes relevant to their respective platforms:
* [Mapbox Maps SDK for Android](platform/android/CHANGELOG.md)
* [Mapbox Maps SDK for iOS](platform/ios/CHANGELOG.md)
* [Mapbox Maps SDK for macOS](platform/macos/CHANGELOG.md)
* [node-mapbox-gl-native](platform/node/CHANGELOG.md)

View File

@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.9)
add_subdirectory(./vendor/mapbox-gl-native/next)
project (mbgl)

View File

@@ -0,0 +1,5 @@
# Code of conduct
Everyone is invited to participate in Mapbox’s open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Mapbox organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/).
You can learn more about our open source philosophy on [mapbox.com](https://www.mapbox.com/about/open/).

View File

@@ -0,0 +1,34 @@
# Contributing
If you have a usage question for a product built on Mapbox GL (such as our iOS or Android SDKs), please visit https://www.mapbox.com/help/.
If you want to contribute code:
1. Please familiarize yourself with the [install process](INSTALL.md).
1. Ensure that existing [pull requests](https://github.com/mapbox/mapbox-gl-native-ios/pulls) and [issues](https://github.com/mapbox/mapbox-gl-native-ios/issues) don’t already cover your contribution or question.
1. Pull requests are gladly accepted. If there are any changes that developers using one of the GL SDKs should be aware of, please update the **master** section of the relevant changelog(s):
* [Mapbox Maps SDK for iOS](platform/ios/CHANGELOG.md)
* [Mapbox Maps SDK for macOS](platform/macos/CHANGELOG.md)
1. Prefix your commit messages with the platform(s) your changes affect: `[ios]` or `[macos]`.
Please note the special instructions for contributing new source code files, asset files, or user-facing strings to the [iOS SDK](platform/ios/DEVELOPING.md#contributing) or [macOS SDK](platform/macos/DEVELOPING.md#contributing).
### Github issue labels
Our labeling system is:
* **minimalistic:** Labels’ usefulness are inversely proportional to how many we have.
* **objective:** Labels should be objective enough that any two people would agree on a labeling decision.
* **useful:** Labels should track state or capture semantic meaning that would otherwise be hard to search for.
We’ve color-coded our labels by facet to make them easier to use:
* type (blue)
* platform (black)
* actionable status (red)
* non-actionable status (grey)
* importance / urgency (green)
* topic / project / misc (yellow)

View File

@@ -0,0 +1,168 @@
# Modern C++ support
Mapbox GL Native supports the C++14 standard, and encourages contributions to
the source code using modern C++ idioms like return type deductions, generic
lambdas, `std::optional` and alike. However, we do not support all the features
from the final draft of the C++14 standard - we had to sacrifice support for
these features in order to support GCC from version 4.9 onwards.
The following C++14 features are **not supported** in Mapbox GL Native:
## [C++14 variable templates](https://isocpp.org/wiki/faq/cpp14-language#variable-templates)
Constructs like the example below are not supported:
```C++
template<typename T> constexpr T pi = T(3.14);
```
### Workarounds:
- If the variable is an alias, use the call the alias points to: [example](https://github.com/mapbox/mapbox-gl-native/commit/f1ac757bd28351fd57113a1e16f6c2e00ab193c1#diff-711ce10b54a522c948efc9030ffab4fcL269)
```C++
// auto foo = pi<double>;
auto foo = double(3.14);
```
- Replace variable templates with either functions or structs: [example 1](https://github.com/mapbox/mapbox-gl-native/commit/f1ac757bd28351fd57113a1e16f6c2e00ab193c1#diff-ffbe6cdfd30513aaa4749b4d959a5da6L58), [example 2](https://github.com/mapbox/mapbox-gl-native/commit/f1ac757bd28351fd57113a1e16f6c2e00ab193c1#diff-04af54dc8685cdc382ebe24466dc1d00L98)
## [C++14 aggregates with non-static data member initializers](http://en.cppreference.com/w/cpp/language/aggregate_initialization)
Constructs like the example below are not supported:
```C++
struct Foo {
int x = { 0 };
};
// error: no matching function for call to 'Foo::Foo(<brace-enclosed initializer list>)'
int main() {
Foo foo { 0 };
return 0;
}
```
### Workarounds
- Replace data member initializers with default parameter values in default constructors:
```C++
struct Foo {
Foo(int x_ = 0) : x(x_) {}
int x;
};
int main() {
Foo foo { 0 }; // works with default constructor
return 0;
}
```
- Replace bracket initialization with regular round brackets or none:
```C++
struct Foo {
Foo(int x_ = 0) : x(x_) {}
int x;
};
int main() {
Foo foo(); // works
Foo bar; // also works
return 0;
}
```
## [Extended `constexpr` support](https://isocpp.org/wiki/faq/cpp14-language#extended-constexpr)
GCC 4.9 strictly forbids `constexpr` usage in the following scenarios:
- No local variable declarations (not `static` or `thread_local`, and no uninitialized variables)
- Cannot mutate objects whose lifetime began with the constant expression evaluation
- Disable usage of if, switch, for, while, do-while (not goto) inside constexpr expressions
- Enforces that constexpr member functions are implicitly const
```C++
// sorry, unimplemented: use of the value of the object being constructed
// in a constant expression
struct Foo {
int x, y;
constexpr Foo(int i) : x(i), y(x) {}
};
// error: body of constexpr function 'constexpr int test1(int)' not a
// return-statement
constexpr int test1(int i) {
int j = i;
return j;
}
// error: body of constexpr function 'constexpr bool test2(int)' not a
// return-statement
constexpr bool test2(int i) {
if (i > 0) {
return true;
} else {
return false;
}
}
```
### Workarounds
- Either remove `constexpr` specifier or replace it with `inline` in case of
functions
## [Polymorphic lambdas](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68278)
GCC 5.2.0 crashes with polymorphic lambdas and this version of the compiler
is currently used in Qt Automotive. Luckily polymorphic lambdas are rarely
used/needed but we had one incident fixed by #9665.
### Workarounds
- Copy & Paste™ the code.
## [Inheriting Constructors](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm)
Compilers with only partial C++11 support causes compilation errors when using-declaration is used in derived class to inherit its base class's constructors `(e.g. using Base::Base;)`.
```C++
#include <vector>
template <typename T>
struct Varargs : std::vector<T>
{
using std::vector<T>::vector;
};
// error: conflicts with version inherited from 'std::__1::vector<int, std::__1::allocator<int> >'
int main()
{
Varargs<int> v;
return 0;
}
```
### Workarounds
- Replace using-declaration (e.g. using Base::Base;) in derived class with `universal forwarding constructor`.
```C++
#include <vector>
template <typename T>
struct Varargs : std::vector<T>
{
template <class... Args>
Varargs(Args&&... args) : std::vector<T>(std::forward<Args>(args)...) {}
};
int main()
{
Varargs<int> v;
return 0;
}
```
Note: Using `universal forwarding constructor` may not be appropriate when derived class has additional members that are not in base class. Write constructors for the derived class explicitly instead of using `universal forwarding constructor` when the derived class has additional members.

View File

@@ -0,0 +1,11 @@
# Building & Developing from Source
**Just trying to use one of the Mapbox Maps SDKs? You don't need to read this stuff! We
provide [easy-to-install, prebuilt versions of the Mapbox Maps SDKs for iOS and Android
that you can download instantly and get started with fast](https://www.mapbox.com/install/).**
If you're certain you need to build from source, rather than using a prebuilt SDK, please
refer to the installation instructions for the platform of interest:
* [Mapbox Maps SDK for iOS](platform/ios/INSTALL.md)
* [Mapbox Maps SDK for macOS](platform/macos/INSTALL.md)

View File

@@ -0,0 +1,878 @@
mapbox-gl-native-ios copyright (c) 2014-2020 Mapbox.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================
Mapbox GL uses portions of Boost.
Distributed under the Boost Software License, Version 1.0.
http://www.boost.org/LICENSE_1_0.txt
===========================================================================
Mapbox GL uses portions of Clipper.
Author : Angus Johnson
Version : 6.1.3a
Date : 22 January 2014
Website : http://www.angusj.com
Copyright : Angus Johnson 2010-2014
License:
Use, modification & distribution is subject to Boost Software License Ver 1.
http://www.boost.org/LICENSE_1_0.txt
Attributions:
The code in this library is an extension of Bala Vatti's clipping algorithm:
"A generic solution to polygon clipping"
Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63.
http://portal.acm.org/citation.cfm?id=129906
Computer graphics and geometric modeling: implementation and algorithms
By Max K. Agoston
Springer; 1 edition (January 4, 2005)
http://books.google.com/books?q=vatti+clipping+agoston
See also:
"Polygon Offsetting by Computing Winding Numbers"
Paper no. DETC2005-85513 pp. 565-575
ASME 2005 International Design Engineering Technical Conferences
and Computers and Information in Engineering Conference (IDETC/CIE2005)
September 24-28, 2005 , Long Beach, California, USA
http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf
===========================================================================
Mapbox GL uses portions of BugshotKit.
The MIT License (MIT)
Copyright (c) 2014 marcoarment
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===========================================================================
Mapbox GL uses portions of CSS Color Parser.
(c) Dean McNamee <dean@gmail.com>, 2012.
C++ port by Konstantin Käfer <mail@kkaefer.com>, 2014.
https://github.com/deanm/css-color-parser-js
https://github.com/kkaefer/css-color-parser-cpp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
===========================================================================
Mapbox GL uses portions of GLFW.
Copyright (c) 2002-2006 Marcus Geelnard
Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would
be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
===========================================================================
Mapbox GL uses portions of libc++.
The libc++ library is dual licensed under both the University of Illinois
"BSD-Like" license and the MIT license. As a user of this code you may choose
to use it under either license. As a contributor, you agree to allow your code
to be used under both.
Full text of the relevant licenses is included below.
====
University of Illinois/NCSA
Open Source License
Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.org
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
====
Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===========================================================================
Mapbox GL uses portions of libcurl.
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2015, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
===========================================================================
Mapbox GL uses portions of libjpeg-turbo.
This software is based in part on the work of the Independent JPEG Group.
Copyright (C)2009-2015 D. R. Commander. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the libjpeg-turbo Project nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
TurboJPEG/LJT: this implements the TurboJPEG API using libjpeg or libjpeg-turbo
===========================================================================
Mapbox GL uses portions of libpng.
This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000, through 1.6.18, July 23, 2015, are
Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors:
Simon-Pierre Cadieux
Eric S. Raymond
Mans Rullgard
Cosmin Truta
Gilles Vollant
James Yu
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
the user.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according
to the same disclaimer and license as libpng-0.96, with the following
individuals added to the list of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, and are
distributed according to the same disclaimer and license as libpng-0.88,
with the following individuals added to the list of Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
===========================================================================
Mapbox GL uses portions of libuv.
libuv is part of the Node project: http://nodejs.org/
libuv may be distributed alone under Node's license:
====
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
====
This license applies to all parts of libuv that are not externally
maintained libraries.
The externally maintained libraries used by libuv are:
- tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license.
- inet_pton and inet_ntop implementations, contained in src/inet.c, are
copyright the Internet Systems Consortium, Inc., and licensed under the ISC
license.
- stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three
clause BSD license.
- pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile
Communications AB. Three clause BSD license.
- android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design
Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement
n° 289016). Three clause BSD license.
===========================================================================
Mapbox GL uses portions of libzip.
Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
The authors can be contacted at <libzip@nih.at>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The names of the authors may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================
Mapbox GL uses portions of the Mapbox iOS SDK, which was derived from the
Route-Me open source project, including the Alpstein fork of it.
The Route-Me license appears below.
Copyright (c) 2008-2013, Route-Me Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
===========================================================================
Mapbox GL uses portions of nunicode.
Copyright (c) 2013 Aleksey Tulinov <aleksey.tulinov@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===========================================================================
Mapbox GL uses portions of OpenSSL.
LICENSE ISSUES
==============
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts. Actually both licenses are BSD-style
Open Source licenses. In case of any license issues related to OpenSSL
please contact openssl-core@openssl.org.
OpenSSL License
---------------
Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without
prior written permission. For written permission, please contact
openssl-core@openssl.org.
5. Products derived from this software may not be called "OpenSSL"
nor may "OpenSSL" appear in their names without prior written
permission of the OpenSSL Project.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)"
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com). This product includes software written by Tim
Hudson (tjh@cryptsoft.com).
Original SSLeay License
-----------------------
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
All rights reserved.
This package is an SSL implementation written
by Eric Young (eay@cryptsoft.com).
The implementation was written so as to conform with Netscapes SSL.
This library is free for commercial and non-commercial use as long as
The following conditions are aheared to. The following conditions
apply to all code found in this distribution, be it the RC4, RSA,
lhash, DES, etc., code; not just the SSL code. The SSL documentation
included with this distribution is covered by the same copyright terms
except that the holder is Tim Hudson (tjh@cryptsoft.com).
Copyright remains Eric Young's, and as such any Copyright notices in
the code are not to be removed.
If this package is used in a product, Eric Young should be given attribution
as the author of the parts of the library used.
This can be in the form of a textual message at program startup or
in documentation (online or textual) provided with the package.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
"This product includes cryptographic software written by
Eric Young (eay@cryptsoft.com)"
The word 'cryptographic' can be left out if the rouines from the library
being used are not cryptographic related :-).
4. If you include any Windows specific code (or a derivative thereof) from
the apps directory (application code) you must include an acknowledgement:
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
The licence and distribution terms for any publically available version or
derivative of this code cannot be changed. i.e. this code cannot simply be
copied and put under another distribution licence
[including the GNU Public Licence.]
===========================================================================
Mapbox GL uses portions of RapidJSON.
Tencent is pleased to support the open source community by making RapidJSON
available.
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights
reserved.
If you have downloaded a copy of the RapidJSON binary from Tencent, please note
that the RapidJSON binary is licensed under the MIT License. If you have
downloaded a copy of the RapidJSON source code from Tencent, please note that
RapidJSON source code is licensed under the MIT License, except for the third-
party components listed below which are subject to different license terms.
Your integration of RapidJSON into your own projects may require compliance with
the MIT License, as well as the other licenses applicable to the third-party
components included within RapidJSON. To avoid the problematic JSON license in
your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as
it's the only code under the JSON license. A copy of the MIT License is included
in this file.
Other dependencies and licenses:
Open Source Software Licensed Under the BSD License:
--------------------------------------------------------------------
The msinttypes r29
Copyright (c) 2006-2013 Alexander Chemeris
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of copyright holder nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Open Source Software Licensed Under the JSON License:
--------------------------------------------------------------------
json.org
Copyright (c) 2002 JSON.org
All Rights Reserved.
JSON_checker
Copyright (c) 2002 JSON.org
All Rights Reserved.
Terms of the JSON License:
---------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The Software shall be used for Good, not Evil.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Terms of the MIT License:
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===========================================================================
Mapbox GL uses portions of Reachability.
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
===========================================================================
Mapbox GL uses portions of SQLite.
2001 September 15
The author disclaims copyright to this source code. In place of
a legal notice, here is a blessing:
May you do good and not evil.
May you find forgiveness for yourself and forgive others.
May you share freely, never taking more than you give.
===========================================================================
Mapbox GL uses portions of SVPulsingAnnotationView.
Copyright (c) 2013, Sam Vermette <hello@samvermette.com>
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
===========================================================================
Mapbox GL uses portions of zlib.
Acknowledgments:
The deflate format used by zlib was defined by Phil Katz. The deflate and
zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib; they
are too numerous to cite here.
Copyright notice:
(C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
===========================================================================
Mapbox GL uses portions of Realm Objective-C.
Copyright 2015 Realm Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
===========================================================================
Mapbox GL uses portions of SMCalloutView.
Copyright 2016 Nick Farina.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License:
https://github.com/nfarina/calloutview/blob/master/LICENSE
===========================================================================
Mapbox GL uses portions of software listed in [platform/android/LICENSE.md](https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/LICENSE.md).
Mapbox GL uses portions of software listed in [platform/ios/vendor/mapbox-events-ios/LICENSE.md](https://github.com/mapbox/mobile-events-ios/blob/master/LICENSE.md).

View File

@@ -0,0 +1,308 @@
export BUILDTYPE ?= Debug
export IS_LOCAL_DEVELOPMENT ?= true
export TARGET_BRANCH ?= master
CMAKE ?= cmake
ifeq ($(BUILDTYPE), Release)
else ifeq ($(BUILDTYPE), RelWithDebInfo)
else ifeq ($(BUILDTYPE), Sanitize)
else ifeq ($(BUILDTYPE), Debug)
else
$(error BUILDTYPE must be Debug, Sanitize, Release or RelWithDebInfo)
endif
buildtype := $(shell echo "$(BUILDTYPE)" | tr "[A-Z]" "[a-z]")
ifeq ($(shell uname -s), Darwin)
HOST_PLATFORM = macos
HOST_PLATFORM_VERSION = $(shell uname -m)
export NINJA = platform/macos/ninja
export NCPU := $(shell sysctl -n hw.ncpu)
export JOBS ?= $(shell expr $(NCPU) - 1)
else ifeq ($(shell uname -s), Linux)
HOST_PLATFORM = linux
HOST_PLATFORM_VERSION = $(shell uname -m)
export NINJA = platform/linux/ninja
export JOBS ?= $(shell grep --count processor /proc/cpuinfo)
else
$(error Cannot determine host platform)
endif
ifeq ($(MASON_PLATFORM),)
BUILD_PLATFORM = $(HOST_PLATFORM)
else
BUILD_PLATFORM = $(MASON_PLATFORM)
endif
ifeq ($(MASON_PLATFORM_VERSION),)
BUILD_PLATFORM_VERSION = $(HOST_PLATFORM_VERSION)
else
BUILD_PLATFORM_VERSION = $(MASON_PLATFORM_VERSION)
endif
ifeq ($(MASON_PLATFORM),macos)
MASON_PLATFORM=osx
endif
ifeq ($(V), 1)
export XCPRETTY
NINJA_ARGS ?= -v
else
export XCPRETTY ?= | tee '$(shell pwd)/build/xcodebuild-$(shell date +"%Y-%m-%d_%H%M%S").log' | xcpretty
NINJA_ARGS ?=
endif
.PHONY: default
default: test
BUILD_DEPS += ./vendor/mapbox-gl-native/CMakeLists.txt
BUILD_DOCS ?= true
#### iOS targets ##############################################################
ifeq ($(HOST_PLATFORM), macos)
IOS_OUTPUT_PATH = build/ios
IOS_PROJ_PATH = $(IOS_OUTPUT_PATH)/Mapbox\ GL\ Native.xcodeproj
IOS_WORK_PATH = platform/ios/ios.xcworkspace
IOS_USER_DATA_PATH = $(IOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad
IOS_XCODEBUILD_SIM = xcodebuild \
ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES \
-derivedDataPath $(IOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) -sdk iphonesimulator \
-workspace $(IOS_WORK_PATH) \
-jobs $(JOBS)
ifneq ($(MORE_SIMULATORS),)
IOS_LATEST = true
IOS_11 = true
IOS_10 = true
IOS_9 = true
endif
ifdef IOS_LATEST
IOS_XCODEBUILD_SIM += \
-destination 'platform=iOS Simulator,OS=latest,name=iPhone 8' \
-destination 'platform=iOS Simulator,OS=latest,name=iPhone Xs Max' \
-destination 'platform=iOS Simulator,OS=latest,name=iPhone Xr' \
-destination 'platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch)'
endif
ifdef IOS_11
IOS_XCODEBUILD_SIM += \
-destination 'platform=iOS Simulator,OS=11.4,name=iPhone 7' \
-destination 'platform=iOS Simulator,OS=11.4,name=iPhone X' \
-destination 'platform=iOS Simulator,OS=11.4,name=iPad (5th generation)'
endif
ifdef IOS_10
IOS_XCODEBUILD_SIM += \
-destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone SE' \
-destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7 Plus' \
-destination 'platform=iOS Simulator,OS=10.3.1,name=iPad Pro (9.7-inch)'
endif
ifdef IOS_9
IOS_XCODEBUILD_SIM += \
-destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6s Plus' \
-destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6s' \
-destination 'platform=iOS Simulator,OS=9.3,name=iPad Air 2'
endif
# If IOS_XCODEBUILD_SIM does not contain a simulator destination, add the default.
ifeq (, $(findstring destination, $(IOS_XCODEBUILD_SIM)))
IOS_XCODEBUILD_SIM += \
-destination 'platform=iOS Simulator,OS=latest,name=iPhone 8'
else
IOS_XCODEBUILD_SIM += -parallel-testing-enabled YES
endif
ifneq ($(ONLY_TESTING),)
IOS_XCODEBUILD_SIM += -only-testing:$(ONLY_TESTING)
endif
ifneq ($(SKIP_TESTING),)
IOS_XCODEBUILD_SIM += -skip-testing:$(SKIP_TESTING)
endif
ifneq ($(CI),)
IOS_XCODEBUILD_SIM += -xcconfig platform/darwin/ci.xcconfig
endif
$(IOS_PROJ_PATH): $(IOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings $(BUILD_DEPS)
mkdir -p $(IOS_OUTPUT_PATH)
(cd $(IOS_OUTPUT_PATH) && $(CMAKE) -G Xcode ../../vendor/mapbox-gl-native \
-DCMAKE_SYSTEM_NAME=iOS )
$(IOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings: platform/ios/WorkspaceSettings.xcsettings
mkdir -p "$(IOS_USER_DATA_PATH)"
cp platform/ios/WorkspaceSettings.xcsettings "$@"
.PHONY: ios
ios: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'CI' build $(XCPRETTY)
.PHONY: iproj
iproj: $(IOS_PROJ_PATH)
xed $(IOS_WORK_PATH)
.PHONY: ios-lint
ios-lint: ios-pod-lint
find platform/ios/framework -type f -name '*.plist' | xargs plutil -lint
find platform/ios/app -type f -name '*.plist' | xargs plutil -lint
.PHONY: ios-pod-lint
ios-pod-lint:
./platform/ios/scripts/lint-podspecs.js
.PHONY: ios-test
ios-test: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'CI' test $(XCPRETTY)
.PHONY: ios-integration-test
ios-integration-test: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'Integration Test Harness' test $(XCPRETTY)
.PHONY: ios-sanitize
ios-sanitize: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'CI' -enableThreadSanitizer YES -enableUndefinedBehaviorSanitizer YES test $(XCPRETTY)
.PHONY: ios-sanitize-address
ios-sanitize-address: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) -scheme 'CI' -enableAddressSanitizer YES test $(XCPRETTY)
.PHONY: ios-static-analyzer
ios-static-analyzer: $(IOS_PROJ_PATH)
set -o pipefail && $(IOS_XCODEBUILD_SIM) analyze -scheme 'CI' test $(XCPRETTY)
.PHONY: ios-install-simulators
ios-install-simulators:
xcversion simulators --install="iOS 11.4" || true
xcversion simulators --install="iOS 10.3.1" || true
xcversion simulators --install="iOS 9.3" || true
.PHONY: ipackage
ipackage: ipackage*
ipackage%:
@echo make ipackage is deprecated — use make iframework.
.PHONY: iframework
iframework: $(IOS_PROJ_PATH)
FORMAT=$(FORMAT) BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) BUILD_DOCS=$(BUILD_DOCS) \
./platform/ios/scripts/package.sh
.PHONY: ideploy
ideploy:
caffeinate -i ./platform/ios/scripts/deploy-packages.sh
.PHONY: idocument
idocument:
OUTPUT=$(OUTPUT) ./platform/ios/scripts/document.sh
.PHONY: darwin-style-code
darwin-style-code:
node platform/darwin/scripts/generate-style-code.js
node platform/darwin/scripts/update-examples.js
style-code: darwin-style-code
.PHONY: darwin-update-examples
darwin-update-examples:
node platform/darwin/scripts/update-examples.js
.PHONY: darwin-check-public-symbols
darwin-check-public-symbols:
node platform/darwin/scripts/check-public-symbols.js macOS iOS
endif
#### macOS targets ############################################################
ifeq ($(HOST_PLATFORM), macos)
MACOS_OUTPUT_PATH = build/macos
MACOS_PROJ_PATH = $(MACOS_OUTPUT_PATH)/Mapbox\ GL\ Native.xcodeproj
MACOS_WORK_PATH = platform/macos/macos.xcworkspace
MACOS_USER_DATA_PATH = $(MACOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad
MACOS_XCODEBUILD = xcodebuild \
-derivedDataPath $(MACOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) \
-workspace $(MACOS_WORK_PATH) \
-jobs $(JOBS)
ifneq ($(CI),)
MACOS_XCODEBUILD += -xcconfig platform/darwin/ci.xcconfig
endif
$(MACOS_PROJ_PATH): $(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings $(BUILD_DEPS)
mkdir -p $(MACOS_OUTPUT_PATH)
(cd $(MACOS_OUTPUT_PATH) && $(CMAKE) -G Xcode ../../vendor/mapbox-gl-native \
-DCMAKE_SYSTEM_NAME=Darwin )
$(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings: platform/macos/WorkspaceSettings.xcsettings
mkdir -p "$(MACOS_USER_DATA_PATH)"
cp platform/macos/WorkspaceSettings.xcsettings "$@"
.PHONY: macos
macos: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'CI' build $(XCPRETTY)
.PHONY: xproj
xproj: $(MACOS_PROJ_PATH)
xed $(MACOS_WORK_PATH)
.PHONY: macos-test
macos-test: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'CI' test $(XCPRETTY)
.PHONY: macos-lint
macos-lint:
find platform/macos -type f -name '*.plist' | xargs plutil -lint
.PHONY: xpackage
xpackage: $(MACOS_PROJ_PATH)
SYMBOLS=$(SYMBOLS) ./platform/macos/scripts/package.sh
.PHONY: xdeploy
xdeploy:
caffeinate -i ./platform/macos/scripts/deploy-packages.sh
.PHONY: xdocument
xdocument:
OUTPUT=$(OUTPUT) ./platform/macos/scripts/document.sh
.PHONY: genstrings
genstrings:
genstrings -u -o platform/macos/sdk/Base.lproj platform/darwin/src/*.{m,mm}
genstrings -u -o platform/macos/sdk/Base.lproj platform/macos/src/*.{m,mm}
genstrings -u -o platform/ios/resources/Base.lproj platform/ios/src/*.{m,mm}
-find platform/ios/resources platform/macos/sdk -path '*/Base.lproj/*.strings' -exec \
textutil -convert txt -extension strings -inputencoding UTF-16 -encoding UTF-8 {} \;
mv platform/macos/sdk/Base.lproj/Foundation.strings platform/darwin/resources/Base.lproj/
endif
#### Miscellaneous targets #####################################################
.PHONY: style-code
style-code:
node scripts/generate-style-code.js
node scripts/generate-shaders.js
.PHONY: codestyle
codestyle:
scripts/codestyle.sh
.PHONY: clean
clean:
-rm -rf ./build \
./lib/*.node
.PHONY: distclean
distclean: clean
-rm -rf ./mason_packages
-rm -rf ./node_modules

View File

@@ -0,0 +1,14 @@
# Mapbox Maps SDKs for iOS and macOS
The Mapbox Maps SDK for iOS is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 9.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the [Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/), applies them to vector tiles that conform to the [Mapbox Vector Tile Specification](https://www.mapbox.com/developers/vector-tiles/), and renders them using OpenGL. It is based on the [Mapbox GL Native](https://github.com/mapbox/mapbox-gl-native) library.
| SDK | Languages | Build status |
| --------------------------------------- | ---------------------------------- | ---------------------------------------- |
| [Mapbox Maps SDK for iOS](platform/ios/) | Objective-C or Swift | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native-ios.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native-ios/tree/master) |
| [Mapbox Maps SDK for macOS](platform/macos/) | Objective-C, Swift, or AppleScript | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native-ios.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native-ios/tree/master) |
## License
Mapbox GL Native is licensed under the [2-Clause BSD license](LICENSE.md). The licenses of its dependencies are tracked via [FOSSA](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-native):
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-native.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fmapbox-gl-native)

View File

@@ -0,0 +1,544 @@
version: 2.1
workflows:
version: 2
mbgl-legacy:
jobs:
#
# Naming convention: {platform}-{additional description}-{build type}
# - {platform} is the client platform/framework, which may differ from
# the build platform. Specify both if applicable, e.g., "qt5-macos".
# - {additional description} optionally describes the compiler or other
# unique aspect of the build environment.
# - {build type} is typically "debug" or "release".
#
- ios-debug
- ios-debug-xcode10
- ios-release-template:
name: ios-release
- ios-trigger-metrics:
requires:
- ios-release
filters:
branches:
only: master
- ios-release-tag:
filters:
tags:
only: /ios-.*/
branches:
ignore: /.*/
- macos-debug
nightly:
triggers:
- schedule:
cron: "0 5 * * *"
filters:
branches:
only:
- master
jobs:
- metrics-nightly
- ios-release-template:
name: ios-release-nightly
- ios-sanitize-nightly
- ios-sanitize-address-nightly
- ios-static-analyzer-nightly
- ios-static-analyzer-nightly-xcode10
commands:
npm-install:
steps:
- run:
name: npm install
command: npm install --ignore-scripts
prepare-environment:
steps:
- run:
name: Prepare environment
command: touch "$BASH_ENV" && ./scripts/environment.js | tee -a "$BASH_ENV"
prepare-submodules:
steps:
- run:
name: Prepare submodules
command: git submodule sync && git submodule update --init --recursive
prepare-ccache:
steps:
- run:
name: Prepare ccache
command: |
# CircleCI doesn't have any way to embed arbitrary environment variables or command output
# into cache keys, so we're using the workaround of writing the desired content to a file,
# and then using `{{ checksum "filename" }}` in the cache key.
echo "$CIRCLE_BRANCH"
echo "$CIRCLE_BRANCH" > .circle-branch
echo "$CIRCLE_SHA1"
echo "$CIRCLE_SHA1" > .circle-sha1
echo "$CIRCLE_TARGET_BRANCH"
echo "${CIRCLE_TARGET_BRANCH:master}" > .circle-target-branch
echo "$CIRCLE_MERGE_BASE"
echo "${CIRCLE_MERGE_BASE:master}" > .circle-merge-base
ccache --clear
reset-ccache-stats:
steps:
- run:
name: Clear ccache statistics
command: |
ccache --zero-stats
ccache --max-size=2G
ccache --show-stats
show-ccache-stats:
steps:
- run:
name: Show ccache statistics
command: ccache --show-stats
save-node_modules-cache:
steps:
- save_cache:
name: Save node_modules cache
key: 'node_modules/v1/{{ arch }}/{{ checksum "package.json" }}'
paths: [ "node_modules" ]
restore-node_modules-cache:
steps:
- restore_cache:
name: Restore node_modules cache
keys:
- 'node_modules/v1/{{ arch }}/{{ checksum "package.json" }}'
- 'node_modules/v1/{{ arch }}'
save-ccache:
steps:
- save_cache:
name: Save ccache
key: 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}/{{ checksum ".circle-branch" }}/{{ checksum ".circle-sha1" }}'
paths: [ "~/.ccache" ]
restore-ccache:
steps:
- restore_cache:
name: Restore ccache
keys:
- 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}/{{ checksum ".circle-branch" }}/{{ checksum ".circle-sha1" }}'
- 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}/{{ checksum ".circle-branch" }}'
- 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}/{{ checksum ".circle-target-branch" }}/{{ checksum ".circle-merge-base" }}'
- 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}/{{ checksum ".circle-target-branch" }}'
- 'ccache/v1/{{ arch }}/{{ .Environment.CIRCLE_JOB }}'
install-dependencies:
parameters:
node_modules:
type: boolean
default: true
ccache:
type: boolean
default: true
steps:
- checkout
- prepare-submodules
- when:
condition: << parameters.node_modules >>
steps: [ restore-node_modules-cache, npm-install ]
- prepare-environment
- when:
condition: << parameters.ccache >>
steps: [ prepare-ccache, restore-ccache, reset-ccache-stats ]
save-dependencies:
parameters:
node_modules:
type: boolean
default: true
ccache:
type: boolean
default: true
steps:
- when:
condition: << parameters.node_modules >>
steps: [ save-node_modules-cache ]
- when:
condition: << parameters.ccache >>
steps: [ save-ccache, show-ccache-stats ]
configure-cmake:
steps:
- run:
name: CMake configuration step
command: |
mkdir -p build
cd build
cmake -DWITH_COVERAGE=${WITH_COVERAGE:0} -DWITH_OSMESA=${WITH_OSMESA:0} -DWITH_EGL=${WITH_EGL:0} ..
cd ..
build-ios-test:
steps:
- run:
name: Build ios-test
command: make ios-test
no_output_timeout: 20m
build-ios-integration-test:
steps:
- run:
name: Build ios-integration-test
command: make ios-integration-test
build-macos-test:
steps:
- run:
name: Build macos-test
command: make macos-test
no_output_timeout: 20m
check-public-symbols:
steps:
- run:
name: Check public symbols
command: make darwin-check-public-symbols
install-ios-packaging-dependencies:
steps:
- run:
name: Install iOS packaging dependencies
command: |
echo "ruby-2.6" > ~/.ruby-version
./platform/ios/scripts/install-packaging-dependencies.sh
background: true
install-macos-dependencies:
steps:
- run:
name: Install macOS dependencies
command: brew install cmake ccache pkg-config glfw3
trigger-metrics:
steps:
- run:
name: Trigger metrics
command: |
if [ -n "${MOBILE_METRICS_TOKEN}" ]; then
bash -c "curl -X POST --header \"Content-Type: application/json\" --data '{\"parameters\": {\"run_ios_maps_benchmark\": true, \"ci_ref\": $CIRCLE_BUILD_NUM }, \"branch\": \"master\" }' https://circleci.com/api/v2/project/github/mapbox/mobile-metrics/pipeline?circle-token=${MOBILE_METRICS_TOKEN}"
else
echo "MOBILE_METRICS_TOKEN not provided"
fi
collect-xcode-build-logs:
steps:
- run:
name: Collect Xcode build logs
when: always
command: |
export XCODE_LOG_DIR=build/logs
mkdir -p $XCODE_LOG_DIR
cp build/*.log $XCODE_LOG_DIR
upload-xcode-build-logs:
steps:
- store_artifacts:
path: build/logs
notify-slack-nightly-failure:
steps:
- run:
name: Send a Slack notification on nightly failure
when: on_fail
command: |
if [[ $CIRCLE_BRANCH == master ]]; then
export SLACK_MESSAGE="Nightly build of \`$CIRCLE_JOB\` <$CIRCLE_BUILD_URL|failed>."
export SLACK_COLOR="danger"
scripts/notify-slack.sh
fi
#
# Add this step to all regular jobs to enable skipping of certain non-code-related changes.
#
# Do not include this step in nightly or release deployment jobs.
#
# To make a job potentially skippable on changes unrelated to its platform, it must:
# - Target one of the skippable platforms: Android, iOS, or macOS.
# - Have a job name that begins with a supported platform name.
# - Not be related to core functionality or rendering tests. Job names that
# contain "render-tests" cannot be skipped by platform changes.
#
# See the script in the following step for how to implement support for other platforms.
#
check-if-this-job-can-be-skipped:
steps:
- run:
name: Check if this job can be skipped
command: |
if [[ $CIRCLE_BRANCH != master ]] && [[ $CIRCLE_BRANCH != release-* ]] && [[ -z $CIRCLE_TAG ]]; then
scripts/check-ci-job-skippability.js
fi
jobs:
ios-debug:
macos:
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
steps:
- install-macos-dependencies
- install-dependencies
- check-public-symbols
- run:
name: Lint podspecs and plist files
command: make ios-lint
- check-if-this-job-can-be-skipped
- build-ios-test
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
# ------------------------------------------------------------------------------
ios-debug-xcode10:
macos:
xcode: "10.3.0"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
steps:
- install-macos-dependencies
- install-dependencies
- check-public-symbols
- run:
name: Lint podspecs and plist files
command: make ios-lint
- check-if-this-job-can-be-skipped
- build-ios-test
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
# ------------------------------------------------------------------------------
ios-sanitize-nightly:
macos:
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- install-macos-dependencies
- install-dependencies
- run:
name: Build and run SDK unit tests with thread and undefined behavior sanitizers
command: make ios-sanitize
- run:
name: Get iOS code coverage
command: |
echo "Skipping iOS code coverage"
# Currently failing, need to update for Xcode 11
# platform/ios/scripts/ios-code-coverage.sh CI
#
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- notify-slack-nightly-failure
# ------------------------------------------------------------------------------
ios-sanitize-address-nightly:
macos:
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- install-macos-dependencies
- install-dependencies
- run:
name: Build and run SDK unit tests with address sanitizer
command: make ios-sanitize-address
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- notify-slack-nightly-failure
# ------------------------------------------------------------------------------
ios-static-analyzer-nightly:
macos:
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- install-macos-dependencies
- install-dependencies
- run:
name: Build and run SDK unit tests with the static analyzer
command: make ios-static-analyzer
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- notify-slack-nightly-failure
# ------------------------------------------------------------------------------
ios-static-analyzer-nightly-xcode10:
macos:
xcode: "10.3.0"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- install-macos-dependencies
- install-dependencies
- run:
name: Build and run SDK unit tests with the static analyzer
command: make ios-static-analyzer
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- notify-slack-nightly-failure
# ------------------------------------------------------------------------------
ios-release-template:
macos:
xcode: "11.2.1"
shell: /bin/bash --login -eo pipefail
environment:
BUILDTYPE: Release
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- install-macos-dependencies
- install-dependencies
- check-if-this-job-can-be-skipped
- install-ios-packaging-dependencies
- run:
name: Build dynamic framework for device and simulator
command: make iframework
no_output_timeout: 20m
- deploy:
name: Upload snapshot build to s3
command: |
if [[ $CIRCLE_BRANCH == master ]]; then
platform/ios/scripts/deploy-snapshot.sh
fi
- deploy:
name: Deploy to Mapbox CocoaPods spec repo
command: |
if [[ $CIRCLE_BRANCH == master ]]; then
platform/ios/scripts/deploy-to-cocoapods.sh
fi
- run:
name: Record size
command: |
echo "Skipping Record size step"
# Skipping due to https://github.com/mapbox/mapbox-gl-native/issues/15751
#platform/ios/scripts/metrics.sh
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- notify-slack-nightly-failure
# ------------------------------------------------------------------------------
ios-release-tag:
macos:
xcode: "11.2.1"
shell: /bin/bash --login -eo pipefail
environment:
BUILDTYPE: Release
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SLACK_CHANNEL: CU0LHNNJY
steps:
- checkout
- run:
name: Send a Slack notification on start
command: |
export SLACK_MESSAGE="<$CIRCLE_BUILD_URL|Release build for \`$CIRCLE_TAG\` started.>"
scripts/notify-slack.sh
- install-macos-dependencies
- install-dependencies
- install-ios-packaging-dependencies
- run:
name: Trigger external deploy steps
command: |
export VERSION_TAG=${CIRCLE_TAG}
export DOCS_REPO="ios-sdk"
scripts/trigger-maps-documentation-deploy-steps.sh
- run:
name: Build, package, and upload iOS release
command: |
export VERSION_TAG=${CIRCLE_TAG}
platform/ios/scripts/deploy-packages.sh
no_output_timeout: 20m
- deploy:
name: Deploy to CocoaPods
command: platform/ios/scripts/deploy-to-cocoapods.sh
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
- run:
name: Send a Slack notification on failure
when: on_fail
command: |
export SLACK_MESSAGE="<$CIRCLE_BUILD_URL|Release build for \`$CIRCLE_TAG\` failed.>"
export SLACK_COLOR="danger"
scripts/notify-slack.sh
- run:
name: Send a Slack notification on success
when: on_success
command: |
export SLACK_MESSAGE="<$CIRCLE_BUILD_URL|Release build for \`$CIRCLE_TAG\` succeeded.>"
export SLACK_COLOR="good"
scripts/notify-slack.sh
# ------------------------------------------------------------------------------
ios-trigger-metrics:
macos:
xcode: "11.2.1"
steps:
- trigger-metrics
# ------------------------------------------------------------------------------
macos-debug:
macos:
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
steps:
- install-macos-dependencies
- install-dependencies
- check-if-this-job-can-be-skipped
- build-macos-test
- check-public-symbols
- run:
name: Lint plist files
command: make macos-lint
- run:
name: Nitpick Darwin code generation
command: scripts/nitpick/generated-code.js darwin
- save-dependencies
- store_artifacts:
path: test/fixtures
destination: test/fixtures
- collect-xcode-build-logs
- upload-xcode-build-logs
# ------------------------------------------------------------------------------
metrics-nightly:
docker:
- image: mbgl/linux-gcc-5:54f59e3ac5
working_directory: /src
environment:
LIBSYSCONFCPUS: 2
JOBS: 2
steps:
- install-dependencies
- run:
name: Collect GitHub statistics
command: |
scripts/publish_github_stats.js

View File

@@ -0,0 +1,117 @@
'use strict';
const template = {
AWSTemplateFormatVersion: '2010-09-09',
Description: 'mapbox-gl-native-ios circleci resources',
Resources: {
BuildUser: {
Type: 'AWS::IAM::User',
Properties: {
Policies: [
{
PolicyName: 'listBuckets',
PolicyDocument: {
Statement: [
{
Action: [ 's3:ListBucket' ],
Effect: 'Allow',
Resource: [ 'arn:aws:s3:::mapbox' ],
Condition: { StringLike: { 's3:prefix': 'mapbox-gl-native/*' } }
},
{
Action: [ 's3:ListBucket' ],
Resource: [ 'arn:aws:s3:::mapbox-node-binary' ],
Effect: 'Allow'
},
{
Action: [ 's3:ListBucket' ],
Resource: [ 'arn:aws:s3:::mapbox-loading-dock' ],
Effect: 'Allow'
}
]
}
},
{
PolicyName: 'build-testing',
PolicyDocument: {
Statement: [
{
Action: [
's3:GetObject',
's3:GetObjectAcl',
's3:PutObject',
's3:PutObjectAcl'
],
Effect: 'Allow',
Resource: [
'arn:aws:s3:::mapbox/mapbox-gl-native/*',
'arn:aws:s3:::mapbox-node-binary/@mapbox/mapbox-gl-native/*',
'arn:aws:s3:::mapbox/mapbox-gl-native/ios/builds/*'
]
}
]
}
},
{
PolicyName: 'cloudwatch-metrics',
PolicyDocument: {
Statement: [
{
Action: [
'cloudwatch:PutMetricData',
'cloudwatch:GetMetricData',
'cloudwatch:GetMetricStatistics'
],
Effect: 'Allow',
Resource: [ '*' ]
}
]
}
},
{
PolicyName: 'get-signing-key',
PolicyDocument: {
Statement: [
{
Action: [ 's3:GetObject' ],
Effect: 'Allow',
Resource: [
'arn:aws:s3:::mapbox/android/signing-credentials/secring.gpg'
]
}
]
}
},
{
PolicyName: 'publish-metrics',
PolicyDocument: {
Statement: [
{
Action: [ 's3:PutObject', 's3:GetObject', 's3:GetObjectAcl' ],
Effect: 'Allow',
Resource: [
'arn:aws:s3:::mapbox-loading-dock/raw/mobile.binarysize/*',
'arn:aws:s3:::mapbox-loading-dock/raw/mobile.codecoverage/*',
'arn:aws:s3:::mapbox-loading-dock/raw/mobile_staging.docs_coverage/*',
'arn:aws:s3:::mapbox-loading-dock/raw/mobile_staging.codecoverage/*',
'arn:aws:s3:::mapbox-loading-dock/raw/mobile_staging.github_stats/*'
]
}
]
}
}
]
}
},
BuildUserKey: {
Type: 'AWS::IAM::AccessKey',
Properties: { UserName: { Ref: 'BuildUser' } }
}
},
Outputs: {
AccessKeyId: { Value: { Ref: 'BuildUserKey' } },
SecretAccessKey: { Value: { 'Fn::GetAtt': [ 'BuildUserKey', 'SecretAccessKey' ] } }
}
};
module.exports = template;

View File

@@ -0,0 +1,9 @@
ignore:
- "test/"
- "vendor/"
coverage:
status:
project:
default:
threshold: 1%

View File

@@ -0,0 +1,67 @@
{
"name": "@mapbox/mapbox-gl-native",
"version": "5.0.0",
"description": "Renders map tiles with Mapbox GL",
"keywords": [
"mapbox",
"gl"
],
"main": "platform/node/index.js",
"repository": {
"type": "git",
"url": "git://github.com/mapbox/mapbox-gl-native.git"
},
"license": "BSD-2-Clause",
"dependencies": {
"@mapbox/cmake-node-module": "^1.2.0",
"minimatch": "^3.0.4",
"node-pre-gyp": "^0.10.2",
"npm-run-all": "^4.0.2"
},
"devDependencies": {
"@mapbox/flow-remove-types": "^1.3.0-await.upstream.2",
"@mapbox/mvt-fixtures": "3.5.1",
"@octokit/plugin-retry": "^2.2.0",
"@octokit/rest": "^16.0.0",
"aws-sdk": "^2.285.1",
"csscolorparser": "~1.0.2",
"d3-queue": "3.0.7",
"diff": "4.0.1",
"ejs": "^2.5.7",
"esm": "~3.2.25",
"express": "^4.11.1",
"json-stringify-pretty-compact": "^2.0.0",
"jsonwebtoken": "^8.3.0",
"lodash": "^4.16.4",
"lodash.template": "4.5.0",
"mapbox-gl-styles": "2.0.2",
"pixelmatch": "^4.0.2",
"pngjs": "^3.4.0",
"pretty-bytes": "^5.1.0",
"request": "^2.88.0",
"semver": "^5.5.0",
"shuffle-seed": "1.1.6",
"st": "1.2.2",
"tape": "^4.5.1",
"xcode": "^1.0.0"
},
"engines": {
"node": ">=6"
},
"scripts": {
"install": "node-pre-gyp install --fallback-to-build=false",
"test": "tape platform/node/test/js/**/*.test.js",
"test-memory": "node --expose-gc platform/node/test/memory.test.js",
"test-expressions": "node -r esm platform/node/test/expression.test.js",
"test-render": "node -r esm platform/node/test/render.test.js",
"test-query": "node -r esm platform/node/test/query.test.js"
},
"gypfile": true,
"binary": {
"module_name": "mbgl",
"module_path": "./lib/{node_abi}",
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}",
"package_name": "{node_abi}-{platform}-{arch}-{configuration}.tar.gz"
}
}

View File

@@ -0,0 +1,3 @@
# Generated list files from code generation
/scripts/generate-style-code.list
/scripts/update-examples.list

View File

@@ -0,0 +1,10 @@
# Darwin
The code in the Darwin platform targets Apple platforms but is not specific
to iOS or macOS. This code is not distributed as an SDK in itself, but is required
by the [Mapbox iOS SDK](https://github.com/mapbox/mapbox-gl-native-ios/tree/master/platform/ios)
and [Mapbox macOS SDK](https://github.com/mapbox/mapbox-gl-native-ios/tree/master/platform/macos).
These files depend on the Foundation and Core Foundation frameworks but do not
depend on iOS- or macOS–specific frameworks, such as UIKit or AppKit. Any
non-cross-platform code is guarded by TargetConditionals.h macros.

View File

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

View File

@@ -0,0 +1,58 @@
#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

@@ -0,0 +1 @@
COMPILER_INDEX_STORE_ENABLE = NO

View File

@@ -0,0 +1,94 @@
ALWAYS_SEARCH_USER_PATHS = NO
CLANG_ANALYZER_GCD_PERFORMANCE = YES
CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
CLANG_CXX_LANGUAGE_STANDARD = c++14
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_OBJC_ARC = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_ASSIGN_ENUM = YES
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_COMMA = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INFINITE_RECURSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_INTERFACE_IVARS = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE = YES
ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_C_LANGUAGE_STANDARD = gnu99
GCC_DYNAMIC_NO_PIC = NO
GCC_ENABLE_CPP_RTTI = NO
GCC_NO_COMMON_BLOCKS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_SHADOW = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES
HEADER_SEARCH_PATHS = $(inherited)
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../platform/darwin/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/default/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/darwin/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/deps/variant/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/deps/geometry.hpp/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/deps/geojson.hpp/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/deps/optional"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/rapidjson/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/expected-lite/include"
HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/polylabel/include"
LD_GENERATE_MAP_FILE = YES
LIBRARY_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)
OTHER_CFLAGS = $(inherited) -fvisibility=hidden
OTHER_CPLUSPLUSFLAGS = $(inherited) -fvisibility=hidden -fcxx-modules
OTHER_SWIFT_FLAGS = -warnings-as-errors
// User defined
BITCODE_GENERATION_MODE = bitcode
CURRENT_COMMIT_HASH = deadbeef
CURRENT_SEMANTIC_VERSION = 0.0.0
CURRENT_SHORT_VERSION = 0.0
// TODO:
CLANG_USE_OPTIMIZATION_PROFILE = NO
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO
// Add developer config
#include? "developer.xcconfig"

View File

@@ -0,0 +1,21 @@
# Customizing Fonts
The Mapbox Maps SDK can render text that is part of an `MGLSymbolStyleLayer` in a font of your choice. The font customization options discussed in this document do not apply to user interface elements such as the scale bar or annotation callout views.
## Server-side fonts
By default, the map renders characters using glyphs downloaded from the [Mapbox Fonts API](https://docs.mapbox.com/api/maps/#fonts). You apply fonts in [Mapbox Studio](https://studio.mapbox.com/), in the `text-font` layout property in style JSON, or in the `MGLSymbolStyleLayer.textFontNames` property at runtime. The values in these properties must be font display names, not font family names or PostScript names.
Each font name in the list must match a font that is registered in Mapbox Studio; otherwise, the text will not load, even if one of the fonts is available. Each font name must be included in the `{fontstack}` portion of the JSON stylesheet’s [`glyphs`](https://docs.mapbox.com/mapbox-gl-js/style-spec/glyphs/) property.
## Client-side fonts
By default, Chinese hanzi, Japanese kana, and Korean hangul characters (CJK) are rendered on the client side. Client-side text rendering uses less bandwidth than server-side text rendering, especially when viewing regions of the map that feature a wide variety of CJK characters.
First, the map attempts to apply a font that you specify the same way as you would specify a server-side font: in [Mapbox Studio](https://studio.mapbox.com/), in the `text-font` layout property in style JSON, or in the `MGLSymbolStyleLayer.textFontNames` property at runtime. Instead of downloading the glyphs, the map tries to find a [system font](https://developer.apple.com/fonts/system-fonts/) or a font [bundled with your application](https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app) that matches one of these fonts based on its family name (for example, “PingFang TC”), display name (“PingFang TC Ultralight”), or PostScript name (“PingFangTC-Ultralight”).
If the symbol layer does not specify an available font that contains the required glyphs, then the map tries to find a matching font in the [`MGLIdeographicFontFamilyName`](infoplist-keys.html#mglideographicfontfamilyname) Info.plist key. Like the `MGLSymbolStyleLayer.textFontNames` property, this key can contain a family name, display name, or PostScript name. This key is a global fallback that applies to all layers uniformly. It can either be a single string or an array of strings, which the map tries to apply in order from most preferred to least preferred.
Each character is rendered in the first font you specify that has a glyph for the character. If the entire list of fonts is exhausted, the map uses the system’s font cascade list, which may vary based on the device model and system language.
To disable client-side rendering of CJK characters, set the `MGLIdeographicFontFamilyName` key to the Boolean value `NO`. The map will revert to server-side font rendering.

View File

@@ -0,0 +1,449 @@
<%
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')`
`in` | `NSInPredicateOperatorType` | `needle IN haystack` or `haystack CONTAINS needle` or `ANY haystack = needle`
`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')`
`within` | `NSInPredicateOperatorType` | `SELF IN %@` or `%@ CONTAINS SELF` where `%@` is an `MGLShape`
`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)`
`distance` | | `mgl_distanceFrom(%@)` where `%@` is an `MGLShape`
`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

@@ -0,0 +1,212 @@
<%
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

@@ -0,0 +1,986 @@
# 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`
You can use the `IN` and `CONTAINS` operators to test whether a value appears in a collection, whether a string is a substring of a larger string, or whether the evaluated feature (`SELF`) lies within a given `MGLShape` or `MGLFeature`. For example, to show one delicious local chain of sandwich shops, but not similarly named steakhouses and pizzerias:
```objc
MGLPolygon *cincinnati = [MGLPolygon polygonWithCoordinates:cincinnatiCoordinates count:sizeof(cincinnatiCoordinates) / sizeof(cincinnatiCoordinates[0])];
deliLayer.predicate = [NSPredicate predicateWithFormat:@"class = 'food_and_drink' AND name CONTAINS 'Izzy' AND SELF IN %@", cincinnati];
```
```swift
let cincinnati = MGLPolygon(coordinates: &cincinnatiCoordinates, count: UInt(cincinnatiCoordinates.count))
deliLayer.predicate = NSPredicate(format: "class = 'food_and_drink' AND name CONTAINS 'Izzy' AND SELF IN %@", cincinnati)
```
The following combinations of comparison operators and modifiers are supported:
`NSComparisonPredicateModifier` | `NSPredicateOperatorType` | Format string syntax
--------------------------------|-------------------------------------|---------------------
`NSAllPredicateModifier` | `NSNotEqualToPredicateOperatorType` | `ALL haystack != needle`
`NSAnyPredicateModifier` | `NSEqualToPredicateOperatorType` | `ANY haystack = needle`<br />`SOME haystack = needle`
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. Comparison
predicate options are not supported in conjunction with comparison modifiers
like `ALL` and `ANY`.
### 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_distanceFrom:`
<dl>
<dt>Selector:</dt>
<dd><code>mgl_distanceFrom:</code></dd>
<dt>Format string syntax:</dt>
<dd><code>mgl_distanceFrom(%@)</code> with an <code>MGLShape</code></dd>
</dl>
Returns the straight-line distance from the evaluated object to the given shape.
This function corresponds to the
[`distance`](https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#distance)
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

@@ -0,0 +1,109 @@
<%
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

@@ -0,0 +1,101 @@
# 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.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,12 @@
#pragma once
#include <mbgl/util/image.hpp>
#include <CoreGraphics/CGImage.h>
// Creates a CGImage from a PremultipliedImage, taking over the memory ownership.
CGImageRef CGImageCreateWithMGLPremultipliedImage(mbgl::PremultipliedImage&&);
// Creates a PremultipliedImage by copying the pixels of the CGImage.
// Does not alter the retain count of the supplied CGImage.
mbgl::PremultipliedImage MGLPremultipliedImageFromCGImage(CGImageRef);

View File

@@ -0,0 +1,10 @@
{
"//": "This file can be edited manually and is the canonical source.",
"sources": [
"platform/darwin/src/async_task.cpp",
"platform/darwin/src/run_loop.cpp",
"platform/darwin/src/timer.cpp"
],
"public_headers": {},
"private_headers": {}
}

View File

@@ -0,0 +1,306 @@
/* 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

@@ -0,0 +1,78 @@
<?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

@@ -0,0 +1,296 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,306 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,303 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,306 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,48 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,60 @@
<?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

@@ -0,0 +1,66 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,66 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,54 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,60 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,48 @@
<?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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,297 @@
/* 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

@@ -0,0 +1,83 @@
#!/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

@@ -0,0 +1,923 @@
#!/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'));
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 (propertyValue === 'true' || propertyValue === 'false') {
otherValue = propertyValue === 'true' ? 'YES' : 'NO';
}
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

@@ -0,0 +1,56 @@
{
"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

@@ -0,0 +1,154 @@
{
"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": {
"doc": "The directions in which the icon stretches to fit around the text. If the icon image is a resizable image, the resizable areas may be stretched, while the cap insets are always drawn at the original scale."
},
"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."
},
"symbol-avoid-edges": {
"doc": "Whether symbols in this layer avoid colliding with symbols in adjacent tiles.\n\nIf this property is set to `true`, symbols in this layer avoid crossing the edge of a tile. You should set this property to `true` if the backing vector tiles don’t have enough padding to prevent collisions, or if this layer’s `symbolPlacement` property is set to `MGLSymbolPlacementPoint` but this layer is above a symbol layer whose `symbolPlacement` property is set to `MGLSymbolPlacementLine`. You do not need to enable this property to prevent clipped labels at tile boundaries."
},
"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\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.\n\nSee the “[Customizing Fonts](../customizing-fonts.html)” guide for details on how this SDK chooses and renders fonts based on the value of this property."
},
"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

@@ -0,0 +1,148 @@
#!/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

@@ -0,0 +1,31 @@
#pragma once
/*
CFHandle is a minimal wrapper designed to hold and release CoreFoundation-style handles
It is non-transferrable: wrap it in something like a unique_ptr if you need to pass it around,
or just use unique_ptr with a custom deleter.
CFHandle has no special treatment for null handles -- be careful not to let it hold a null
handle if the behavior of the Releaser isn't defined for null.
ex:
using CFDataHandle = CFHandle<CFDataRef, CFTypeRef, CFRelease>;
CFDataHandle data(CFDataCreateWithBytesNoCopy(
kCFAllocatorDefault, reinterpret_cast<const unsigned char*>(source.data()), source.size(),
kCFAllocatorNull));
*/
namespace {
template <typename HandleType, typename ReleaserArgumentType, void (*Releaser)(ReleaserArgumentType)>
struct CFHandle {
CFHandle(HandleType handle_): handle(handle_) {}
~CFHandle() { Releaser(handle); }
HandleType operator*() { return handle; }
operator bool() { return handle; }
private:
HandleType handle;
};
} // namespace

View File

@@ -0,0 +1,41 @@
#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, copy, nullable) NSString *accessToken;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,112 @@
#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

@@ -0,0 +1,26 @@
#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

@@ -0,0 +1,65 @@
#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

@@ -0,0 +1,87 @@
#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

@@ -0,0 +1,68 @@
#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

@@ -0,0 +1,94 @@
#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

@@ -0,0 +1,279 @@
#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

@@ -0,0 +1,65 @@
#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

@@ -0,0 +1,149 @@
// 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

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