Commit Graph

299 Commits

Author SHA1 Message Date
Alexander Shalamov
32376115c3 [darwin] Generate style code for symbol-sort-key 2019-04-17 15:04:08 +03:00
Fabian Guerra Soto
a8526b4c91 [ios, macos] Fix MGLSymbolStyleLayer.text localization issue. (#14405)
Fixed an MGLSymbolStyleLayer.text localization bug caused by the introduction of MGLAttributedExpression object. The localization parsing was ignoring the latter.

* [ios, macos] Fix a localization issue.

* [ios, macos] Add formating expressions localization test.

* [ios, macos] Update MGLSymbolStyleLayer.text documentation.
2019-04-15 13:54:53 -07:00
Nadia Barbosa
2ee967a036 [ios, macos] Premultiply color values for mgl_color
Fixes https://github.com/mapbox/mapbox-gl-native/issues/14329
2019-04-12 11:07:46 -07:00
Jason Wray
cfd398a499 [ios] Remove unused line from MGLExpressionTests 2019-04-03 15:56:28 -07:00
Mikhail Pozdnyakov
1eaae50ffe [darwin] Support for variable text placement API 2019-03-29 16:18:41 +02:00
Julian Rex
c7d53676d0 [ios, core] Updates project for iOS SDK 12.2 / Always use vendored optional (#14241) 2019-03-27 09:58:41 -04:00
Fabian Guerra Soto
1d7b243a06 [ios, macos] Support expressions in formatting parameters. (#14198)
Modified MGLAttributedExpression object to support NSExpressions as formatting attributes only. This aligns with GL and Android implementation and specification.

Modified the documentation accordingly, and changed MGLFontSizeAttribute to MGLFontScaleAttribute to clarify the true function of the formatting parameter.
2019-03-22 13:45:39 -07:00
Fabian Guerra Soto
1388f3a502 [ios, macos] Fix conditional expression parsing error. (#14181)
Fixed an error that caused conditional expressions to crash when a conditional parameter was also a conditional expression.
2019-03-21 12:36:39 -07:00
Fabian Guerra Soto
fc77090fce [ios, macos] Fix format expression parsing. (#14168)
Fixed a parsing issue when a non-constant expression was passed to MGLAttributedExpression.expression property.
2019-03-20 10:49:23 -07:00
Fabian Guerra Soto
174c8fa7e4 [ios, macos] Add text-color support to format expressions. (#14146)
Added the possibility of overriding paint properties inside the format expression.

Added an example of how to create an MGLAttributedExpression object and documented the attributes keys and value types.

Fixed a bug that ignored the font names.
2019-03-19 14:53:35 -07:00
Fabian Guerra Soto
7939ff213a [ios, macos] Add format expression convenience methods support. (#14094)
Added the ios/macos format expression bindings.

The equivalent is mgl_attributed: or mgl_attributed({}) when making an expression using the expressionForFormat selector.

A new constructor called mgl_expressionForAttributedExpressions:(NSArray<NSExpression*>*)attributedExpressions was added to NSExpression+MGLAdditions category.

Updated the symbol style layer text test to use the bindings.

Updated the Predicates and Expressions.md and For Style Authors.md.ejs template with the bindings.
2019-03-15 16:10:27 -07:00
Jason Wray
fb1b601038 [darwin] Fix MGLMapView.direction wrapping
Re-adds the 0-to-360° wrapping for MGLMapView.direction. Without this wrapping, we’d get ±180° from core, which results in invalid CLLocationDirection for the negative half of the rotational spectrum.
2019-03-12 14:49:49 -07:00
Fabian Guerra Soto
79f3307c4b [ios, macos] Fix a bug with multiple format expressions. (#14064)
Fixed a bug where `format` expressions using the generic `MGL_FUNCTION` binding ignored multiple formatting parameters.
2019-03-07 19:28:20 -08:00
Jason Wray
d0ffaa4245 [ios] Reset access token state after running tests 2019-03-07 11:36:04 -08:00
Jason Wray
c00d44740f [ios] Mock MGLOfflineStorage in MGLDocumentationExampleTests
Otherwise we risk kicking-off long-running offline pack downloads that could interfere with other tests.
2019-02-19 16:33:27 -08:00
Fabian Guerra Soto
63065e1268 [ios, macos] Update unit test bundle identifier. (#13875) 2019-02-05 14:49:00 -08:00
Josh Erb
5d891b4b2a [ios][documenation] add additional code snippets to API docs 2019-01-30 13:18:45 -05:00
Antonio Zugaldia
d5659aa664 [core,ios,android] Update feedback URL in code and tests (#13710)
* [core,ios] rename all occurrence of www.mapbox.com/map-feedback to apps.mapbox.com/feedback

* [ios,android] rename all occurrence of www.mapbox.com/feedback to apps.mapbox.com/feedback
2019-01-17 17:00:56 -08:00
Julian Rex
c8c664fbf3 [ios, macos] Support getLeaves (and related) clustering methods (#12952) following feature extension API (#13382) 2019-01-14 15:17:13 -05:00
Minh Nguyễn
4be73454e6 [ios] Migrated tests, playground to Swift 4.2 2019-01-09 14:52:30 -05:00
Fabian Guerra Soto
4a858eb381 [ios, macos] Renames MGLStyle.enablePlacementTransitions (#13685)
* [ios, macos] Rename enablePlacementTransitions to performsPlacementTransitions.

* [ios, macos] Update changelogs.
2019-01-08 11:56:25 -06:00
Chris Loer
387fa1800f [ios, macos] Add "includesIdeographicGlyphs" option to MGLOfflineRegion. 2018-12-21 15:13:48 -08:00
Fabian Guerra Soto
fed201aaed [ios, macos] Fix number conversions when expressions cast to large numbers. (#13580)
* [ios, macos] Fix number conversions when expressions cast to large numbers.

* [ios, macos] Update changelogs.
2018-12-14 14:40:16 -08:00
Fabian Guerra Soto
bbeec8dacb [ios, macos] Add enablePlacementTransitions to MGLStyle. (#13565)
* [ios, macos] Add enablePlacementTransitions to MGLStyle.

* [ios, macos] Update changelogs.
2018-12-13 10:19:56 -08:00
Alexander Shalamov
b6b1067caf [ios, darwin] Make MGLFeature.attributes non-nullable and add integration test
Enforce non-nullable semantics for MGLFeature.attributes, to avoid construction of invalid mbgl::Feature properties
from nil NSDictionary object and align with public SDK property definition.

Integration test "testShapeSourceWithLineDistanceMetrics" is added to verify that MGLFeature is correctly converted.

Fixes issue #13378
2018-12-13 19:38:50 +02:00
Minh Nguyễn
3dffb1fd53 [ios] Added CJK string transforms 2018-12-08 02:18:56 -08:00
Jason Wray
7cdbe6664a [ios, macos] Update for streets-v8 data and coalesced name fields in v11 styles 2018-12-07 21:46:46 -05:00
Bruno de Oliveira Abinader
e64c28613a [core] Support fill-extrusion-vertical-gradient 2018-11-29 14:23:55 +02:00
Mikhail Pozdnyakov
361982fef8 [core][Android][Darwin] LayerManager creates RenderLayer instances
`LayerManager` is now responsible for `RenderLayer` instances creation,
so that there is a single entry point for creating of objects, which
correspond to a certain layer type.

The `LayerType type` field is dropped from `Layer::Impl`.
2018-11-27 18:10:21 +02:00
Julian Rex
fd4b470158 [ios] Adds support for MGLCollisionBehaviorPre4_0 in NSUserDefaults (#13426) 2018-11-21 13:56:41 -05:00
Jason Wray
ddcecdf7f7 [darwin] Rename variables to avoid shadow declarations
Per GCC_WARN_SHADOW.
2018-11-20 11:48:18 -05:00
Jason Wray
83ecb76562 [darwin] Fix GCC_WARN_SIGN_COMPARE warnings 2018-11-20 11:48:18 -05:00
Julian Rex
90f609ca8f [ios, macos] Added -(BOOL)[MGLStyle removeSource:error:] that provides an NSError. (#13399) 2018-11-20 10:26:09 -05:00
Minh Nguyễn
425a3ade9e [ios, macos] Harmonize bundle identifiers
For consistency with each other and with their product name and module name, the iOS and macOS map SDKs now have a bundle identifier of com.mapbox.Mapbox, whether in the form of a static or dynamic framework. The logging subsystem identifier has also been changed to match.
2018-11-15 22:00:30 -08:00
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Minh Nguyễn
d13cd54af6 [ios, macos] Renamed ambient cache prewarming method
Renamed the method for prewarming the ambient cache to conform to Cocoa and Swift naming conventions.
2018-11-08 14:40:23 -08:00
Mikhail Pozdnyakov
56808731b6 Remove style::Layer::is()/as() 2018-10-31 11:22:46 +02:00
Minh Nguyễn
3f314682fa [ios, macos] Added $lineProgress expression variable 2018-10-30 14:26:59 -07:00
Minh Nguyễn
7ae171c6f9 [ios, macos] Fixed crash on nullary vararg expression function
Equate the nullary and unary forms of vararg-style aftermarket expression functions when converting to JSON objects.
2018-10-27 23:38:20 -07:00
Chris Loer
8368bd4878 [tests, darwin] Standardize on 10 second timeout for map loading
5 second timeouts have been intermittently failing on CI.
2018-10-17 13:14:44 -07:00
Chris Loer
aab55cfbcd [darwin,test] Add "must-revalidate" support to putResourceWithURL
Testing must-revalidate: true required an expiration date in the future, which exposed a round-tripping problem from translating NSDate to time_point based on now().
Use epoch of 1970 instead (although technically it's not guaranteed to be the epoch for system_clock until C++20)
2018-10-17 12:53:24 -07:00
Chris Loer
c66f92f452 [test] Test[ MGLOfflineStorage putResourceForURL] 2018-10-17 12:53:24 -07:00
Chris Loer
d0cd49f516 [ios, macos] Minimal darwin wrappers of 'format' expression
Add support for `MGL_FUNCTION('format', <text>, <options dictionary>)`
2018-10-15 13:15:46 -07:00
Fabian Guerra
710a7f5037 [ios, macos] Enable offline merge test. 2018-10-04 11:04:15 -07:00
Minh Nguyễn
a9dc1b5294 [ios, macos] Fixed camera initialization with eye coordinate
Rewrote the code that calculates the heading and pitch of the camera when given an eye coordinate.
2018-10-01 18:12:03 -07:00
Minh Nguyễn
85a474e275 [ios, macos] Added MGLMapCamera.viewingDistance property
Co-authored-by: Dave Prukop <dave.prukop@mapbox.com>
2018-10-01 18:12:03 -07:00
Minh Nguyễn
a030f1474f [ios, macos] Distinguish between viewing distance and altitude
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:] incorrectly treated the distance as an altitude. Due to backwards compatibility concerns, this method can’t be fixed in place. Instead, separate +[MGLMapCamera cameraLookingAtCenterCoordinate:correctlyFromDistance:pitch:heading:] and +[MGLMapCamera cameraLookingAtCenterCoordinate:altitude:pitch:heading:] methods have been added.
2018-10-01 18:12:03 -07:00
Fabian Guerra
9b21786f62 [ios, macos] Disable offline merge test. 2018-10-01 16:45:00 -07:00
Jason Wray
1ce31af289 [ios] Bump more test timeouts for Xcode 10 sluggishness 2018-09-26 14:12:57 -07:00
Jason Wray
737ebed7d5 [ios, tests] Bump most waitForExpectationsWithTimeout's to 5s
[skip firebase]

Bump MGLOfflineStorageTests timeouts to 5 seconds
2018-09-20 14:57:07 -07:00