| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
| |
Fixed an error that caused conditional expressions to crash when a conditional parameter was also a conditional expression.
|
|
|
| |
CP [ios, macos] Fix format expression parsing. (#14168)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixed a bug where `format` expressions using the generic `MGL_FUNCTION` binding ignored multiple formatting parameters.
|
| |
|
|
|
|
| |
Per GCC_WARN_SHADOW.
|
| |
|
|
|
|
| |
Equate the nullary and unary forms of vararg-style aftermarket expression functions when converting to JSON objects.
|
|
|
|
|
|
|
|
| |
* Add fallbacks for name fields
* Add a fallback for `name_zh-Hant`
* Update changelog
|
|
|
|
| |
Removes mgl_expressionByReplacingTokensWithKeyPaths and associated code. Converting on output is no longer necessary: from the prior commit, core converts token strings to expressions at parse time; all that's necessary is to ensure that the runtime styling API does so as well.
|
| |
|
|
|
|
|
|
|
|
| |
nested keypaths. (#11959)
* [ios, macos] Fix keypath expressions, a json object is parsed incorrectly for nested keypaths.
* [ios, macos] Update changelogs.
|
|
|
|
|
|
|
|
|
|
| |
* [ios, macos] Support array values in match expressions.
* [ios, macos] Update mgl_match documentation.
* [ios, macos] Update changelogs.
* [ios, macos] Clarify match expressions documentation.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* [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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* [ios, macos] Add support for subscripting in expressions.
* [ios, macos] Update changelogs.
* [ios, macos] Refactor LAST subscripting expression.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
|
|
|
|
|
|
|
|
|
|
| |
* [ios, macos] Rename featureProperties to featureAttributes.
* [ios, macos] Update style documentation.
* [ios, macos] Remove featureProperties variable tests.
* [ios, macos] Update the changelogs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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.
|
|
|
|
| |
Temporarily disable this test until iOS 8 compatibility is added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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
|
|
|
|
| |
When converting a constant NSExpression to an mbgl::Value, turn an NSColor or UIColor into an std::string containing a CSS color string. This allows developers to set an attribute of an MGLFeature to an NSColor or UIColor (rather than a CSS color string, which would be foreign), then use it in an MGLStyleFunction with identity interpolation.
|
|
|
|
|
|
|
|
| |
* [core] Introduce dedicated filter types for $type and $id special cases
* [ios, macos] Special-case $id, $type in predicates
Also support $id ≟ nil.
|
| |
|
|
|
|
| |
Convert NSNull into an mbgl null value.
|
|
|