Commit Graph

12417 Commits

Author SHA1 Message Date
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
Minh Nguyễn
aabb7be3d6 [android] Map European Portuguese to system-compatible locale code 2018-05-02 12:55:52 -07:00
Chris Loer
a96fe6ad87 [core] Don't copy TileLayerIndexes on every frame.
Fixes issue #11811 (too much CPU time spent in CrossTileSymbolIndex).
2018-05-02 09:42:03 -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
Julian Rex
1f4e3e0f6e [ios, macos] Raise exceptions for empty expression stops dictionaries (#9539) 2018-04-26 12:40:26 -04:00
Julian Rex
e4f46dafe7 [ios, macos] Added change logs for #11731 2018-04-25 14:20:01 -04:00
Tobrun
2095700a5f [android] - promote pixel ratio to public api of NativeMapview. 2018-04-25 16:01:58 +02:00
Tobrun
536860d552 [android] - improve stop javadoc to include interpolate 2018-04-24 18:07:03 +02:00
Tobrun
a8d22305aa [android] - clear map change listeners when map is destroyed 2018-04-24 17:34:01 +02:00
Tobrun
62b80c3284 [android] - allow early callback registration 2018-04-24 17:34:01 +02:00
Tobrun
b037a1db8c [android] - integrate view callback abstraction 2018-04-24 17:34:01 +02:00
Julian Rex
5b5549d644 [ios, macos] Fix for camera movement when selecting visible annotations (#11731) 2018-04-24 11:01:04 -04:00
Jason Wray
fa6c6a3733 [ios] Mark -metersPerPixelAtLatitude: as unavailable
This deprecated method has its implementation removed in 4.0.0 but was not marked as unavailable.
2018-04-23 16:05:19 -04:00
Łukasz Paczos
5712b49080 [android] - remove snapshot repository reference (#11709) 2018-04-23 16:44:16 +02: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
Minh Nguyễn
8a8709d2c7 [ios, macos] Revamp predicate and expression guide (#11741)
* [ios, macos] Fact-checked expression guide

Corrected various factual inaccuracies in the “Predicates and Expressions” guide. Moved some explanation from the predicates section to the expressions section. Added sections for all the other expression types we support.

* [ios, macos] Reorganized custom function documentation

Reorganized the custom function documentation as a series of sections with headers and definition lists instead of a monolithic table. Copyedited various sections for accuracy. Linked references to custom functions. Added format string examples for all custom functions.

* [ios, macos] Made h3 more visible

* [ios, macos] Added Objective-C example of placeholders

* [ios, macos] Documented trig functions

* [ios, macos] Also increase h3 code size

* [ios, macos] Replaced Markdown with HTML in definition

* [ios, macos] Replaced Markdown with HTML in custom function documentation

* [ios, macos] Clarified stops

* [ios, macos] Cross-referenced functions

Each custom function definition cross-references the corresponding aftermarket function (or vice versa), the corresponding style specification expression operator, and any related NSExpression syntax.

* [ios, macos] Fixed links in predicate guide

* [ios, macos] Consolidated and documented NSExpression categories

Consolidated the NSExpression categories into a single category, with marks to separate different tasks. Documented the MGLAdditions category so that it shows up in the jazzy documentation.

* [ios, macos] Fixed NSExpression private category mixup
2018-04-19 18:45:24 -07:00
Jordan Kiley
f81f770741 [ios, macos] Update Style Functions guide (#11724) 2018-04-19 18:43:04 -07:00
Dane Springmeyer
de8fd3f97b allow disabling -Werror (#11589) 2018-04-19 17:36:19 -04:00
Julian Rex
2e22593962 [ios] Mark -presentCalloutFromRect:inView:constrainedToView:animated: unavailable (#11738) 2018-04-19 15:47:58 -04:00
Chris Loer
b414c607c3 Don't crash on placing symbols with 0 renderable glyphs
Fixes issue #11729. Close relative of issue #10956.
It is possible for us to receive Glyphs from the server that are valid, but have an invalid bitmap. In that case, the glyphs will be present in the `GlyphMap` used for shaping, but not present in the `GlyphPositions` used in `getGlyphQuads`. `SymbolInstance::hasText` looked at the shaping instead of the actual quads.
`symbol_projection.cpp` should never try to project a label without any quads, but we'll also try to make it so that it doesn't crash if it does.
2018-04-19 10:47:51 -07:00
Łukasz Paczos
29e23cf08b [android] - updated changelog for 6.0.1 (#11714)
(cherry picked from commit 0256f15)
2018-04-18 10:29:23 +02:00
Jason Wray
72473cf6f6 [ios] Mark unused parameter of -[MGLMapView reloadStyle:] as nullable 2018-04-17 19:22:26 -04:00
Jason Wray
7c63b4addc [ios] Provide MGLStyle.localizesLabels unavailability notice 2018-04-17 19:22:26 -04: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
Łukasz Paczos
4c1ed22efa [android] - bumped telemetry version to 3.0.2 (#11710) 2018-04-17 18:22:43 +02:00
Tobrun
2eeebe5c38 [android] - changelog entry for v6.0.0 2018-04-17 11:58:16 +02:00
Tobrun
860cbad55d [android] - bump snapshot version 2018-04-17 11:57:50 +02:00
Łukasz Paczos
2fd48fdfa0 [android] - match expression doc tweaks (#11691) 2018-04-17 09:49:38 +02:00
Tobrun
7397a3e90c [android] - bump telemetry depdency to 3.0.1 2018-04-17 09:32:59 +02: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
Minh Nguyễn
ee06c09e9e [android] Added Hebrew localization 2018-04-16 17:26:44 -07:00
Minh Nguyễn
6c2b8683cd [android] Added Czech localization 2018-04-16 17:26:44 -07:00
Minh Nguyễn
3a0a3e4281 [macos] Replaced UIColor with NSColor in documentation 2018-04-16 16:27:56 -07:00
Jason Wray
3d3b87e020 [ios] Fix type narrowing issue with MGLOpenGLStyleLayer projection matrix (#11664)
`CATransform3D`'s matrix is internally typed as `CGFloat`, which we were implicitly casting to from `double`.... except that the `-Wc++11-narrowing` flag disallows implicit narrowing casts and we need `double` precision, anyway.

* [ios, macos] Use MGLMatrix4 a 4x4 double matrix for MGLOpenGLStyleLayer projection matrix.

* [ios, macos] Don't use union for MGLMatrix4
2018-04-16 19:17:37 -04: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
Jason Wray
0529c018f3 [ios] Remove more deprecated bits for release-boba 2018-04-16 18:28:31 -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
Jason Wray
816406e038 [ios] Update playground for Swift 3.2+ 2018-04-13 16:08:14 -04:00
Nadia Barbosa
582d0e5885 Minor last fixes 2018-04-12 14:54:12 -07:00