Commit Graph

5252 Commits

Author SHA1 Message Date
Jason Wray
8c6abaf3fa [ios] Fix heap buffer overflow in two-coordinate MGLPolyline 2018-03-30 19:59:09 -04: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
Jason Wray
b6866f764e [ios, docs] Fix formatting in Predicates & Expressions guide (#11574)
- Code ticks within HTML tables do not convert to code blocks.
- Pipes within Markdown tables are interpreted as new columns, even within ticks.
2018-03-30 19:25:30 -04:00
Julian Rex
cf5d2ca4ef [ios] Fix for integration tests running on device. Refs #11297
Moves Mapbox framework from integration target to be be embedded in host app.
2018-03-30 14:26:49 -04:00
Jason Wray
23ccfce176 [ios] Update mapbox-events-ios to v0.4.0 2018-03-29 14:07:39 -04: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
Fabian Guerra Soto
2aaa038ef1 [ios, macos] Add lookup and feature operators. (#11528)
* [ios, macos] Add Expressions 'at' operator.

* [ios, macos] Implement 'has' operator.

* [ios, macos] Implement expressions feature operators.

* [ios, macos] Refactor expressions variable name and 'mgl_has' implementation.

* [ios, macos] Refactor expresssion variable names.

* [ios, macos] Update 'mgl_has' to support non-self operands.
2018-03-28 18:09:17 -04:00
Łukasz Paczos
fbd6e2b618 Release Android v6.0.0-beta.5 (#11537)
* [android] Updated changelog for 6.0.0-beta.5 release
2018-03-28 15:35:33 +02:00
Łukasz Paczos
7f18b0bbb2 [android] bumped gestures library version to 0.2.0 (#11535) 2018-03-27 18:23:07 +02:00
Łukasz Paczos
a7e35d94b5 [android] bumped telemetry library version to 3.0.0-beta.3 (#11534) 2018-03-27 17:49:21 +02:00
Fabian Guerra Soto
9a663fb479 [ios, macos] Add match expressions support. (#11464)
* [ios, macos] Add match expressions support.

* [ios, macos] Add coalesce operator support.

* [ios, macos] Add coalesce operator test.

* [ios, macos] Match operator implementation is moved to NSPredicate.

* [ios, macos] Match operator function implementation refactor.

* [ios, macos] Address merge conflicts.
2018-03-26 15:22:54 -04:00
Tobrun
9eff2c52fb [android] - update changelog v5.5.1 2018-03-26 15:03:47 -04:00
Tobrun
f5ce99f3e3 [android] - allow multiple expressions in string, number and bool asserting expressions 2018-03-26 13:03:14 -04:00
Fabian Guerra Soto
dd301fbc0f [ios, macos] Change the format for case expressions to a flat structure. (#11450)
* [ios, macos] Change the format for case expressions to a flat structure.

* [ios, macos] Add support for multiple branches case expression.

* [ios, macos] Add multiple branch tests to case expressions.

* [ios, macos] Case operator now has iOS 8 support.
2018-03-26 12:53:34 -04:00
Tobrun
ce3c42a1c2 [android] - don't load default style if style json string was set (#11520) 2018-03-26 09:40:22 -04:00
Tobrun
c44fe25200 [android] - correctly convert Android int colors with to-color expression (#11506) 2018-03-23 09:54:22 -04:00
John Firebaugh
9499a2bda7 [core] Don't resolve tokens after evaluating a text-field or icon-image expression (#11509) 2018-03-22 16:44:12 -07:00
Tobrun
1d29f82c1b [android] - expose public api telemetry (#11503) 2018-03-22 17:10:26 -04:00
Tobrun
61e6e62663 [android] - make default output param from step expression more descriptive, add param to javadoc (#11501) 2018-03-22 12:45:27 -04:00
Tobrun
1eb90c1448 Literal array conversion of primitive arrays (#11500)
* [android] - literal array conversion of primitives types
2018-03-22 12:40:43 -04: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
Tobrun
4b3d0638b8 [android] - update changelog for v6.0.0-beta.4 (#11485) 2018-03-21 09:09:49 +01:00
Jordan Kiley
68fcbf0a72 [ios, macos] Document to use subclasses of MGLFeature to access attributes (#11462) 2018-03-20 10:33:44 -07:00
Łukasz Paczos
a2250098f5 [android] bumped gestures library version to 0.1.0 (#11483) 2018-03-20 13:03:06 +01:00
Ansis Brammanis
ef1dcc0d5b [core] don't hide icons if text is an empty string 2018-03-19 15:31:38 -07:00
Tobrun
f011035017 Expression filters (#11429)
* [android] - add expression filter integration
2018-03-19 15:11:17 +01:00
Tobrun
c5075e33ec [android] - verify optional before accessing it 2018-03-19 15:10:15 +01:00
Guardiola31337
7d5304ebc1 [android] bump mapbox-android-telemetry version to 3.0.0-beta.2 and adapt events related code 2018-03-19 14:55:47 +01:00
Ivo van Dongen
2464520da1 [android] high-level jni bindings for geojson conversion 2018-03-19 11:19:09 +02:00
Osana Babayan
f2fbe69b32 update to MAS3.0-beta.4 (#11468) 2018-03-16 14:11:07 -04:00
Tobrun
aba24da180 [android] - implement expression literal on arrays 2018-03-16 17:09:35 +01:00
Łukasz Paczos
d59646fc1f Test activity for gestures manager (#11449) 2018-03-16 13:21:11 +01:00
Łukasz Paczos
146e615bae [android] fixed TWO_FINGER_TAP telemetry event (#11460) 2018-03-16 10:41:34 +01:00
John Firebaugh
449c68e329 [core] Update mapbox-gl-js 2018-03-14 15:26:28 -07:00
Jason Wray
be2fae838c [ios] Prepare changelog for ios-v3.7.6 2018-03-14 15:47:21 -04:00
Jason Wray
6718887f0b [ios, build] Move iOS release builds to CircleCI 2018-03-14 15:46:52 -04:00
Jason Wray
4acd671a65 [ios] Add camera limit debug option to iosapp
Adapted from cdff47276d/Examples/ObjectiveC/BlockingGesturesDelegateExample.m
2018-03-14 15:46:43 -04:00
Jason Wray
d37edadacb [ios] Fix pinch drift ignoring delegate camera change response 2018-03-14 15:46:31 -04:00
Jason Wray
2230af1425 [ios] Improved heading indicator arrow visibility 2018-03-14 15:46:00 -04:00
Łukasz Paczos
3294f279e3 [android] build release Test App before publishing (#11418) 2018-03-14 15:41:15 +01: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
Tobrun
961aba1552 [android] - revisit proguard configuration for release-boba 2018-03-12 16:36:45 +01:00
Lucas Wojciechowski
8a3deab733 [core] Add expression filter support (#11251)
* WIP

* WIP

* WIP

* Remove Filter::operator()(const Feature&)

* WIP

* WIP

* WIP

* WIP

* Hook up expression filter evaluator

* Replace `shared_ptr` with &reference

* Fill in implementation of `void operator()(const ExpressionFilter&)`

* Fix failing tests

* Switch back to a shared_ptr per chat with @anandthakker

* Fix benchmark compilation

* Shot in the dark to fix CI

* Shot in the dark to fix CI (part 2)

* Shot in the dark to fix CI (part 3)

* In src/mbgl/style/conversion/filter.cpp, add a port of isExpressionFilter and use it to decide in Converter<Filter>::operator() whether to parse the incoming JSON as an ExpressionFilter or one of the legacy filter types

* Remove bool Filter::operator()(const GeometryTileFeature&) const

*  Ensure the map zoom is passed into filtering operations wherever applicable

* Add expression filter tests

* Addressed PR feedback

* Implement `NSPredicate *operator()(mbgl::style::ExpressionFilter filter)`

* Fix formatting& nit
2018-03-09 11:12:14 +01:00
Tobrun
6179110b6b [android] - add expression conversion, add getters (#11352) 2018-03-08 16:27:02 +01:00
Łukasz Paczos
dfdfbc0990 [android] calculating camera's LatLng for bounds without map padding (#11410) 2018-03-08 15:55:47 +01:00
Tobrun
ea525fd08a [android] - check for null body on http request, cleanup code 2018-03-08 15:51:07 +01:00
Minh Nguyễn
91de48356e [macos] Upgraded tests to Swift 4 2018-03-07 17:31:01 -08:00
Minh Nguyễn
9f708d80f4 [macos] Fixed title casing based on current orthography 2018-03-07 17:31:01 -08:00
Minh Nguyễn
6c0599b536 [macos] Assume sRGB for mbgl expressions, CSS in attribution
Assume mbgl needs colors in the sRGB color space rather than the calibrated RGB color space. Fixed link colors when creating attribution from HTML.
2018-03-07 17:31:01 -08:00
Łukasz Paczos
12664cd4c4 Expose more gestures settings (#11407)
* [android] enable/disable velocity animations

* [android] exposed a method to cancel ongoing velocity animations

* [android] removed unused methods and constants

* [android] fixed gestures manager initialization

* [android] enable/disable increasing gesture thresholds

* [android] saving/restoring new gestures options
2018-03-07 15:56:22 +01:00