Commit Graph

595 Commits

Author SHA1 Message Date
Konstantin Käfer
d1a266b3e6 [node] allow building all ABIs at once 2018-05-22 11:17:01 +02:00
Julian Rex
bef2a7ccb6 [ios,macos] Fix for infinite loop crash when setting shape to nil in MGLMapViewDelegate methods (#11614) 2018-05-21 14:14:58 -04:00
John Firebaugh
a84ac4c8d7 [core] Align URL token replacement behavior with GL JS
I.e. preserve unknown tokens in URLs rather than replacing them with an empty string.
2018-05-18 17:19:45 -07:00
Fabian Guerra Soto
1aa5c67837 [ios, macos] Support array values in match expressions. (#11866)
* [ios, macos] Support array values in match expressions.

* [ios, macos] Update mgl_match documentation.

* [ios, macos] Update changelogs.

* [ios, macos] Clarify match expressions documentation.
2018-05-17 14:47:01 -04:00
Fabian Guerra
30376f3ce1 Merge branch 'release-boba' into master
# Conflicts:
#	mapbox-gl-js
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/gradle/dependencies.gradle
#	platform/darwin/src/MGLVectorTileSource.mm
#	platform/darwin/src/MGLVectorTileSource_Private.h
#	platform/ios/CHANGELOG.md
#	src/mbgl/style/expression/compound_expression.cpp
2018-05-17 11:47:31 -04:00
Minh Nguyễn
146057adf9 macos-v0.7.1 2018-05-15 12:47:38 -07:00
Minh Nguyễn
87e3c2571a [ios, macos] Copyedited changelogs 2018-05-15 12:47:22 -07:00
Jason Wray
8a55c2cc81 Update macOS changelog 2018-05-14 17:14:28 -04:00
Minh Nguyễn
baf5fd7d01 [ios, macos] Fixed English priority during label localization
Respect English in the Preferred Languages setting even if other Mapbox Streets source–supported languages are listed too.
2018-05-14 14:12:51 -07:00
Minh Nguyễn
4b1530ff42 [core] Convert null to empty string, not “null” 2018-05-14 13:24:42 -07:00
Fabian Guerra Soto
a425995189 [ios, macos] Add to-rgba expression operator. (#11725)
* [ios, macos] Add expression support to to-rgba operator.

* [ios, macos] Update style docs.

* [ios, macos] Refactored to-rgba to to-color.

* [ios, macos] Add support for to-rgba expression operator.

* [ios, macos] Add multiple parameters support to to-color operand.

* [ios, macos] Enable to-rgba operator for MGLColor or key path expressions.

* [ios, macos] Update predicates and expressions guide to reflect cast changes.

* [ios, macos] Update changelogs.

* [ios, macos] Clarify color casting usage.
2018-05-07 12:01:29 -04:00
Fabian Guerra Soto
a365dd11da [ios, macos] Make NSPredicate+MGLAdditions public. (#11810) 2018-05-04 15:09:07 -04:00
Fabian Guerra Soto
1c847b321b [ios, macos] Add support for subscripting in expressions. (#11770)
* [ios, macos] Add support for subscripting in expressions.

* [ios, macos] Update changelogs.

* [ios, macos] Refactor LAST subscripting expression.
2018-05-04 13:30:06 -04:00
Fabian Guerra Soto
86a2e93294 [ios, macos] Fix overlay bounds that span the antimeridian. (#11783)
* [ios, macos] Fix overlay bounds that span the antimeridian.

* [ios, macos] Update changelogs.

* [ios, macos] Make MGLLocationCoordinate2DIsValid private.

* [ios, macos] Update changelogs.
2018-05-04 12:49:58 -04:00
Jordan Kiley
167a2321d9 [ios, macos] Update migration guides in jazzy table (#11808)
* [macos] update jazzy for macos

* [ios] moved migration guide
2018-05-04 09:40:51 -07:00
John Firebaugh
e423ef5609 [linux] Don't compile linux mbgl-loop-uv against node headers
Previously, `target_include_directories(mbgl-loop-uv PUBLIC ${NODEJS_INCLUDE_DIRS})` always applied. Compiles were working by accident because node is always installed in CI. Instead, split and inline loop-uv.cmake contents: linux uses `target_add_mason_package(mbgl-loop-uv PUBLIC libuv)`, node uses `target_include_directories(mbgl-loop-node PUBLIC ${NODEJS_INCLUDE_DIRS})`.
2018-05-04 07:19:36 -07:00
Konstantin Käfer
f6da3ba9be iOS: Add custom layer example to debugging app (#7734) 2018-05-03 12:48:58 -07:00
Fabian Guerra Soto
844a824409 [ios, macos] Fix broken link to predicates and expressions guide. (#11818) 2018-05-03 09:11:42 -04:00
John Firebaugh
8b713d9373 [ios, macos] Avoid implicit capture of MBGLOfflineRegionObserver this pointer
MBGLOfflineRegionObserver is owned by the offline database thread, and might be destroyed by the time the dispatch_async completes. Instead of implicitly capturing this, capture a copy of the MBGLOfflinePack weak pointer.
2018-05-02 14:22:55 -07:00
Minh Nguyễn
ea59ba8209 [android, ios, macos] Added Korean localization 2018-05-02 12:57:14 -07:00
John Firebaugh
9a4b806fa8 [docs] Make per-platform installation docs self-contained
I've seen several issues where users followed platform-specific install docs, but were unaware of additional prerequisites spelled out in the top-level INSTALL.md. So let's try making each platform's installation documentation self contained.
2018-04-30 13:10:31 -07:00
Jason Wray
5a147f6335 [ios, macos] Fix possible retain cycles in blocks
Prompted by enabling CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.
2018-04-27 18:06:42 -04:00
Jason Wray
4f7999fd1c [ios, macos] Accept Xcode 9.3 project suggestions
- Fix duplicate NSExpression+MGLAdditions.h and fix target membership
 - Explicitly cast NSUInteger to unsigned long before printing
2018-04-27 18:06:17 -04:00
Jason Wray
c067865e7b [ios, macos] Update minimum deployment versions to iOS 9, macOS 10.11 (#11776)
* [ios] Remove iOS 8 conditionals

* [ios, macos] Bump pod deployment targets

* [ios, macos] Add changelog entries

* [ios, macos] Update docs

* Remove unnecessary selector-based version checks

* Update SQLite note

* [ios, macos] Replace lightweight generics macros with direct use
   Lightweight generics for Foundation collections are available everywhere with the bump to iOS 9 and macOS 10.11.

* Update deprecated macOS method
2018-04-27 12:25:49 -04:00
Julian Rex
e4f46dafe7 [ios, macos] Added change logs for #11731 2018-04-25 14:20:01 -04:00
Julian Rex
5b5549d644 [ios, macos] Fix for camera movement when selecting visible annotations (#11731) 2018-04-24 11:01:04 -04:00
Fabian Guerra Soto
a45670cfb5 [ios, macos] Rename featureProperties to featureAttributes. (#11748)
* [ios, macos] Rename featureProperties to featureAttributes.

* [ios, macos] Update style documentation.

* [ios, macos] Remove featureProperties variable tests.

* [ios, macos] Update the changelogs.
2018-04-23 09:05:36 -04:00
Minh Nguyễn
991264ae65 ios-v4.0.0, macos-v0.7.0 2018-04-19 20:02:03 -07:00
Minh Nguyễn
6449818e76 [macos] Replaced screenshot 2018-04-19 20:02:03 -07:00
Jordan Kiley
f81f770741 [ios, macos] Update Style Functions guide (#11724) 2018-04-19 18:43:04 -07:00
Fabian Guerra Soto
a6c02adeb6 [ios, macos] Add trigonometric support to NSExpression. (#11716)
* [ios, macos] Add acos NSExpresssion operator.

* [ios, macos] Add asin NSExpresssion operator.

* [ios, macos] Add atan NSExpresssion operator.

* [ios, macos] Add cosine NSExpresssion operator.

* [ios, macos] Add sine NSExpresssion operator.

* [ios, macos] Add tangent NSExpresssion operator.

* [ios, macos] Add log2 NSExpresssion operator.

* [ios, macos] Update style authors documentation.
2018-04-17 18:23:35 -04:00
Minh Nguyễn
e3ca004816 ios-v4.0.0-rc.1, macos-v0.7.0-rc.1 2018-04-16 18:06:30 -07:00
Minh Nguyễn
df8accb3b9 [ios, macos] Updated changelogs 2018-04-16 18:06:28 -07:00
Fabian Guerra Soto
cec46070c6 [ios, macos] Add NSExpression convenience constructors and helper methods. (#11278)
* [ios, macos] Refactor convinience expression initializers.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add MGL_MATCH convenience method.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/darwin/test/MGLExpressionTests.mm

* [ios, macos] Add Swift friendly convenience methods name syntax..

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h

* [ios, macos] Update runtime styling examples.

# Conflicts:
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add NSExpression variable expressions properties.

* [ios, macos] Clarify convenience initializer names.

* [ios, macos] Update Style Authors guides.

* [ios, macos] Fix cherry-pick merge.

* [ios, macos] Update convenience initializers documentation.
2018-04-16 20:48:04 -04:00
Minh Nguyễn
d06d77d482 [macos] Updated Arabic localization 2018-04-16 17:26:44 -07:00
Minh Nguyễn
ecc43c871a [android, ios, macos] Added European Portuguese localization 2018-04-16 17:26:44 -07:00
Jason Wray
d4e597eb94 [ios, macos] Convert various class methods to class properties
This improves the Swift interface while having no effect on Obj-C usage.
2018-04-16 18:42:34 -04:00
Minh Nguyễn
e16ce7d879 Localize expressions more thoroughly (#11651)
* [ios] Removed changelog entry for Terrarium

The broader feature is new to v4.0.0 as well.

* [ios, macos] Localize expressions more thoroughly

Replaced the MGLStyle.localizesLabels property with a -localizeLabelsIntoLocale: method that allows the caller to specify the locale to localize into. Also exposed a per-expression localization method for developers who want to vary behavior from layer to layer.

* [macos] Offer English labels if preferred language is unsupported

* [ios, macos] Removed dead code

* [ios] Use new localization method in iosapp

* [ios, macos] Fixed local name labels

* [ios, macos] Convert tokens to key path expressions in stop dictionaries

* [ios, macos] Streamlined token upgrading

Separated token upgrading into a separate process that only happens as part of the MGLSymbolStyleLayer.text and MGLSymbolStyleLayer.iconImageName properties’ getters, so that it’s easy to remove later when mbgl changes obviate this workaround. Removed the replacesTokens parameter to the expression localization methods.

* [ios, macos] Preserve whitespace between tokens

* [ios, macos] Moved token replacement to a consistent category

Fixed a build warning.

* [ios, macos] Replace tokens in all string-typed getters

For consistency, replace tokens with key paths in all string-typed style paint and layout properties.

* [ios, macos] Test token replacement

Added tests for replacement of tokens with key paths in expressions. Fixed token replacement for raw strings in stop dictionaries. Avoid sticking a single string inside an mgl_join: call.

* [ios, macos] Test token replacement, localization

Added unit tests of token replacement and localization of expressions. Only NSExpression is responsible for resolving the preferred language now, since NSLocale tends to tack a region code onto the locale identifier and the NSExpression method can be called independently anyways. Added a private variation of +[MGLVectorTileSource preferredMapboxStreetsLanguage] that takes an array of preferred languages. Fixed localization of non-expressions in stop dictionaries.

* [ios, macos] Dictionary keys aren’t necessarily zoom levels
2018-04-16 15:24:33 -07:00
Fabian Guerra Soto
62dd097328 [ios, macos] NSPredicate expression filters. (#11587)
* [ios, macos] Add NSAndPredicateType predicate expression filter.

* [ios, macos] Add type to NSPredicate expressions.

* [ios, macos] Add Expression filter support.

* [ios, macos] Update NSPredicate expression based tests.

* [ios, macos] Refactor ExpressionFilters.

* [ios, macos] Add symmetric test to ExpressionFilters.

* [ios, macos] Update NSPredicate test to ExpressionFilters.

* [ios, macos] Re-introduce Filter tests.

* [ios, macos] Remove typed NSComparisonPredicate's comparable values.

* [ios, macos] Update style layers predicate tests.

* [ios, macos] Remove unused predicate conversion code.

* [ios, macos] Update documentation exaple's test.

* [ios, macos] Update Predicate and Expressions guide..

* [ios, macos] Remove mgl_ prefix from variable expressions.

* [ios, macos] Update predicates and expressions documentation.

* [ios, macos] Update changelogs.
2018-04-16 16:51:59 -04:00
Fabian Guerra Soto
fe4348eec3 [ios, macos] Remove mgl_ prefix from built-in expressions variables. (#11689) 2018-04-16 13:39:10 -04:00
Anand Thakker
f0f67b4788 Add abs, round, floor, ceil operators (#11653)
* Add abs, round, floor, ceil operators

Port of https://github.com/mapbox/mapbox-gl-js/pull/6496

* [ios, macos] Simplified abs, ceiling, floor expressions

* [ios, macos] Added rounding expression function

* [android] - binding integration for round, ceil, floor and abs expressions

* Update mapbox-gl-js to include non-integer rounding test

* Drop extra braces

* mapbox-gl-js -> master

* Update style-spec docs -> PropertyFactory.java
2018-04-11 12:03:56 -04:00
Jason Wray
fa0fd2c63e [ios] Prepare changelog for ios-v4.0.0-beta.3 2018-04-02 19:33:08 -04:00
Minh Nguyễn
9faed7293b [ios, macos] Eliminated MGLAbstractShapeSource
MGLComputedShapeSource is now a direct subclass of MGLSource and sibling of MGLShapeSource.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
a877b6dbe8 [ios, macos] Renamed MGLVectorSource to MGLVectorTileSource 2018-04-02 10:42:54 -07:00
Minh Nguyễn
1044064017 [ios, macos] Mention update-examples in contributing guide 2018-04-02 10:42:54 -07:00
Minh Nguyễn
29a8efab26 [ios, macos] Renamed MGLRasterSource to MGLRasterTileSource
Also updated various source class listings to reflect the addition of image and raster DEM sources.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
59e92904c3 Eviscerate mbgl expression to Foundation JSON object conversion (#11389)
* [ios, macos] Eviscerate mbgl expression to Foundation JSON object conversion

* [ios, macos] Remove literal special case

MGLJSONObjectFromMBGLValue() is just a literal translation from C++ types to Foundation types; no need for expression-specific literal wrapping.

* [ios, macos] Implemented RGB(A) operators

* [ios, macos] More robust color conversion

* [macos] Create calibrated RGB from expression on Sierra

* [macos] Calibrate colors in expressions at runtime

* [ios, macos] Special-case number conversion without fallbacks

* [ios, macos] Test mgl_number expressions

* [ios, macos] Updated tests for aftermarket expressions

* [ios, macos] Relax roundtripping requirement for serialize()

* [ios, macos] Fixed interpolation expression tests

* [ios, macos] Removed dead code

* [ios, macos] Fixed color conversion on Sierra
2018-03-30 16:43:55 -07:00
Minh Nguyễn
8c5eb6ca9c Install aftermarket expression functions (#11472)
* [ios, macos] Introduced more ergonomic expression concatenation syntax

* [ios, macos] Fixed mgl_join:

* [ios, macos] Simplified expression document headings

* [ios, macos] Documented mgl_join:

* [ios, macos] Convert length operator to length: for strings

Only works for literal strings.

* [ios, macos] Implemented type conversion using CAST()

* [ios, macos] Aftermarket let expressions

* [ios, macos] Refactored aftermarket expression functions

Refactored the installation of aftermarket expression functions to use macros. It is no longer necessary to handwrite the type encoding of a function. Also added aftermarket functions for interpolating and stepping.

* [ios, macos] Updated documentation, tests, demo apps

* [ios, macos] Added generic expression function

* [ios, macos] Add MGL_MATCH function placeholder.

* [ios, macos] Add MGL_SWITCH expression operator.

* [ios, macos] Add mgl_coalesce: as expression function.

* [ios, macos] Update style documentation.

* [ios, macos] Add conventional custom function support.

* [ios, macos] Updated example code

* [ios, macos] Add mgl_coalesce conventional custom function support.

* [ios, macos] Add aftermarket function to 'has' operator.

* [ios, macos] Add documentation for lookup and feature operators.

* [ios, macos] Documented simple lookup

* [ios, macos] Renamed, reversed has expression

Renamed mgl_hasProperty:properties: to mgl_does:have: for better readability and consistency with the conventional mgl_has: function. Documented both forms of mgl_has:.

* [ios, macos] Restored OEM conditionals where available

This is the preferred syntax for simple conditionals on iOS 9 and above, because you can inline the predicate instead of wrapping it in a constant value expression, which means you can write a conditional in a single format string.

* [ios, macos] Update style docs.

Co-authored-by: Fabian Guerra <fabian.guerra@mapbox.com>
2018-03-29 10:25:05 -07:00
Julian Rex
d4f2bc07ca [ios,macos] Selecting offscreen annotation pans map to fit annotation & callout view (#3249, #9790) 2018-03-21 13:51:10 -04:00
Lloyd Sheng
4404a2669b [ios, macos] Fix an issue where a wrong annotation may selected if annotations were set close together (#11438)
* [ios] Fix an issue where wrong annotation may selected when annotations very close #10734

* [macos] Fix an issue where a wrong annotation may selected if annotations were set close together

* update the iOS change log and the macOS change log

* Fix an issue where the comment referenced to the wrong variable name
2018-03-13 11:26:15 -07:00