summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression
Commit message (Collapse)AuthorAgeFilesLines
* [core] Avoid unnecessary template instantiationsJohn Firebaugh2018-07-301-32/+23
|
* Fix compilation errors with libc++ on QNX 7Sudarsana Babu Nagineni2018-07-303-15/+15
| | | | | | | | | | This patch fixes the compilation errors on QNX 7: 1) QNX 7 compiler (i.e qcc based GCC 5.4.0 with libc++ from LLVM) has a limited c++11 feature support and causing the compilation errors with the inheriting constructors. This fixes the issues by providing the required constructors explicitly. 2) Resolves an ambiguous overload error with optional<T>
* [core] Replace expressions RTTI with enums + static castBruno de Oliveira Abinader2018-07-2414-37/+70
|
* [core] Convert token strings to expressionsJohn Firebaugh2018-07-201-14/+14
|
* [core] Move expression.cpp to expression directoryJohn Firebaugh2018-07-201-0/+38
|
* [core] Replace {Source,Camera,Composite}Function with PropertyExpressionJohn Firebaugh2018-07-201-5/+9
|
* [core] Convert legacy functions directly to expressionsJohn Firebaugh2018-07-131-0/+9
|
* [core] Simplify Value conversionsJohn Firebaugh2018-07-121-66/+19
| | | | | | Use a single template function for each of {to,from}ExpressionValue, always dispatching to ValueConverter. Remove unused ValueConverter::ExpressionType typedefs.
* [core] Introduce "collator" expressionsChris Loer2018-07-037-14/+199
| | | | Cross platform parsing and evaluation code.
* [core] Add assertions to expression constructorsJohn Firebaugh2018-06-295-7/+39
|
* [darwin] Replace use of *Stops with expressions DSLJohn Firebaugh2018-06-291-0/+27
|
* [core] Replace use of *Stops with expressions DSLJohn Firebaugh2018-06-293-92/+208
|
* [core] fix crash when trying to parse legacy filtersKonstantin Käfer2018-06-291-0/+5
| | | | Legacy filters aren't part of the style specification, but you can generate them by parsing a legacy filter in a stylesheet, and obtaining the parsed Filter and serializing it.
* [core] InterpolateBase → Interpolate; Interpolate → InterpolateImplJohn Firebaugh2018-06-283-16/+16
|
* [core] Privatize Interpolate<T>John Firebaugh2018-06-281-7/+88
|
* [core] Move non-polymorphic Interpolate methods to baseJohn Firebaugh2018-06-281-2/+1
|
* [core] Split Interpolator into a separate fileJohn Firebaugh2018-06-281-3/+0
|
* [core] Simplify parseInterpolateJohn Firebaugh2018-06-271-38/+14
| | | | | * Merge type checking into match arms * No need to use interpolator->match(...)
* [core] Fix GCC8's new -Wcatch-value warningsZsolt Bölöny2018-06-251-1/+1
| | | Polymorphic types shouldn't be caught by value, as the warning message says. Catch them by constant reference instead.
* [core] add raster-resampling property (#12176)upstream/rcleeMolly Lloyd2018-06-211-0/+4
| | | | | | | | | | * update style-code for raster-resampling * implement user-defined raster-resampling * invert filter condition * raster-resampling -> raster-resampling-mode for darwin language conventions
* [core] don't use floating point versions of pow/logKonstantin Käfer2018-06-041-1/+1
| | | | | | GLIBC 2.27 added new versioned symbols of powf and logf, while the double versions of pow and log remained stable. Prefer the double version to avoid introducing a dependency on a newer version of GLIBC than strictly necessary. See https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00000.html
* [core] Align match behavior with case/==John Firebaugh2018-05-181-2/+16
| | | | Makes `["match", ["get", k], label, match, otherwise]` equivalent to `["case", ["==", ["get", k], label], match, otherwise]`. This changes the behavior of match expressions where the runtime type of the input does not match the type of the labels: previously such expressions produced a runtime type error and then fell back to the property default value; now they produce the fallback value from the match expression.
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-172-35/+298
|\ | | | | | | | | | | | | | | | | | | | | | | # 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
| * [core] Convert null to empty string, not “null”Minh Nguyễn2018-05-141-0/+1
| |
| * [core] Convert "legacy" filters directly into expressions (#11610)Lucas Wojciechowski2018-05-102-37/+299
| | | | | | Ports the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp
* | [qt] Fix build when building the Qt Location pluginThiago Marcos P. Santos2018-05-141-1/+1
| | | | | | | | | | - MinGW has to explicitly know that is building a static library. - Android doesn't have 'round' on the std:: namespace when using g++.
* | [core] Port is-supported-script to native.Chris Loer2018-04-271-0/+5
|/ | | | Native port is much simpler because RTL text support is always enabled.
* Don't enforce ["zoom"] constraints for filters (#11672)Anand Thakker2018-04-121-3/+24
| | | | | | | | | | | | * Don't enforce ["zoom"] constraints for filters Fixes #11594 * Add a couple of comments * Fix ambiguous constructor call * ParsingContext(optional<Type>) => ParsingContext(Type)
* Add abs, round, floor, ceil operators (#11653)Anand Thakker2018-04-111-0/+6
| | | | | | | | | | | | | | | | | | | | * 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
* Fix style parsing bug for constant expressions (#11606)Anand Thakker2018-04-091-14/+27
| | | | | | | | | | | | | | * Fix style parsing bug for constant expressions Closes #10849 * Ignore tests for unported GL JS change Refs https://github.com/mapbox/mapbox-gl-js/pull/6429 * Fuller fix * Update mapbox-gl-js
* [core] Fixed to-rgba with zero opacityMinh Nguyễn2018-03-302-10/+6
|
* [core] Round-trip linear interpolatorsMinh Nguyễn2018-03-301-1/+5
|
* Port fix for "at" expression off-by-1 error (#11375)Anand Thakker2018-03-021-4/+10
| | | | | | | | | | * Port fix for "at" expression off-by-1 error Refs https://github.com/mapbox/mapbox-gl-js/pull/6269 * Consistency * Add ignores for symbol positiong differences in real-world tests
* Relax type checking for "length"John Firebaugh2018-03-013-7/+68
|
* Infer type assertions for objectJohn Firebaugh2018-03-011-1/+1
| | | | Cross-ports https://github.com/mapbox/mapbox-gl-js/pull/6243.
* [core] Implement Expression::serialize()Chris Loer2018-02-2810-23/+177
| | | | | | | | Issue #10714 - Each expression stores its operator as a string, and default serialization is [operator, serialize(child1), ...] - Custom implementations of `serialize` for Expression types that don't follow the pattern - expression::Value -> mbgl::Value converter - node_expression bindings to expose `serialize`
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Import headers, not implementation files * [core] Added accessors for various expression parameters Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values. * [ios, macos] Silenced warning in test of error condition * [ios, macos] Made MGLSphericalPosition boxable * [ios, macos] Implemented array enumeration during conversion * [ios, macos] Temporarily ignore heatmap layer type * [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions. Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet. * [ios, macos] Implemented string coercion * [ios, macos] Color literals * [ios, macos] Null constant expressions * [ios, macos] Convert dictionary literals * [ios, macos] Interpolation expressions * [ios, macos] to-boolean, to-number, get from object * [ios, macos] Variable expressions Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density. * [ios, macos] Convert colors, offsets, padding in expressions to JSON objects * [ios, macos] Expression-based style property getters Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions. * [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer * [ios, macos] Predicate and expression guide Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions. * [ios, macos] Updated style authoring guide Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes. * [ios, macos] Migrated codegen templates to expressions * [ios, macos] Applied expression changes via codegen Ran make darwin-style-code. * [macos] Migrated macosapp to expressions * [ios, macos] Updated style function guide This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions. * [ios, macos] Eviscerated style function tests * [ios, macos] Updated changelogs * [ios] Migrated iosapp to expressions * [ios, macos] Exposed JSON conversion methods publicly * [ios, macos] Removed MGLStyleValue, MGLStyleFunction
* [core] add raster-dem source type and hillshade layer type (#10642)Molly Lloyd2018-01-231-0/+4
|
* [core, ios, macos, android] Add data-driven-styling support for `text-font`John Firebaugh2018-01-1010-0/+97
|
* [core] Handle NaN input to interpolate and stepJohn Firebaugh2018-01-102-8/+11
|
* [core] Omit inferred type annotations for 'coalesce' argumentsJohn Firebaugh2018-01-092-31/+50
|
* [core] Fix alpha handling in rgba and to-rgba operatorsJohn Firebaugh2018-01-092-4/+7
|
* [core] Enable implicit type assertions for array typesJohn Firebaugh2018-01-091-0/+2
|
* [core] Improve typing for !=, == expressionsJohn Firebaugh2018-01-093-16/+86
|
* [windows][qt] Remove std:: namespace of some functionsThiago Marcos P. Santos2018-01-081-1/+1
| | | | Not available on Windows.
* [core] Migrated upcase, downcase to platform codeMinh Nguyễn2017-12-141-8/+3
| | | | Replaced manual, per-character upper- and lowercasing code with calls to platform-specific code that affects a wider range of characters.
* [core] Fix build on Android + GCC and Android + armeabiThiago Marcos P. Santos2017-11-1211-20/+31
| | | | Sadly we don't have bots for these two setups.
* Implement Expressions (#9439)Anand Thakker2017-11-0822-0/+2809
Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)