summaryrefslogtreecommitdiff
path: root/include/mbgl/style
Commit message (Collapse)AuthorAgeFilesLines
* Don't enforce ["zoom"] constraints for filters (#11672)Anand Thakker2018-04-125-59/+44
| | | | | | | | | | | | * Don't enforce ["zoom"] constraints for filters Fixes #11594 * Add a couple of comments * Fix ambiguous constructor call * ParsingContext(optional<Type>) => ParsingContext(Type)
* Fix style parsing bug for constant expressions (#11606)Anand Thakker2018-04-092-2/+3
| | | | | | | | | | | | | | * 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] Add Projection matrix to CustomLayerRenderParameters to transform web ↵Asheem Mamoowala2018-04-051-0/+3
| | | | mercator world coordinates to GL coordinates.
* Use a host interface for CustomLayer instead of function pointers (#11553)Asheem Mamoowala2018-04-021-46/+40
| | | | | | Use a host interface for CustomLayer instead of function pointers Co-authored-by: Julian Rex <julian.rex@mapbox.com>
* [core] Don't resolve tokens after evaluating a text-field or icon-image ↵John Firebaugh2018-03-224-22/+26
| | | | expression (#11509)
* [core] Add expression filter support (#11251)Lucas Wojciechowski2018-03-092-241/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Relax type checking for "length"John Firebaugh2018-03-011-0/+32
|
* [core] Implement Expression::serialize()Chris Loer2018-02-2817-8/+60
| | | | | | | | 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`
* Correctly parse constant expressions in dds style properties (#11282)Anand Thakker2018-02-212-3/+22
| | | | | | | | * Correctly parse constant expressions in dds style properties Closes #10849 * Clarify
* [core, ios, macos, android, node] Heatmap layer (#11046)Vladimir Agafonkin2018-02-156-0/+188
| | | | | Co-Authored-By: Konstantin Käfer <mail@kkaefer.com> Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com> Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
* Add options for Custom Geometry Source types to enable clipping and wrapping ↵Asheem Mamoowala2018-02-072-0/+22
| | | | geometry (#11041)
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-245-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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-238-4/+126
|
* [core, ios, macos, android] Add data-driven-styling support for `text-font`John Firebaugh2018-01-1021-22/+91
|
* [core] Handle NaN input to interpolate and stepJohn Firebaugh2018-01-101-3/+9
|
* [core] Omit inferred type annotations for 'coalesce' argumentsJohn Firebaugh2018-01-091-3/+10
|
* [core] Improve typing for !=, == expressionsJohn Firebaugh2018-01-091-0/+31
|
* [windows][core] Include what you useThiago Marcos P. Santos2018-01-081-0/+1
|
* [core] Fix copy in range-based for loopsJason Wray2017-12-152-2/+2
| | | | Caught by `CLANG_WARN_RANGE_LOOP_ANALYSIS = YES`.
* [build] standardize on -fvisibility=hidden for all targetsKonstantin Käfer2017-11-291-5/+10
| | | | | | | Enables -fvisibility=hidden for iOS and Linux, and adds a workaround for GCC 6.3-7.1 Adds a GCC 6 build Enables diagnostics for C files Fixes a shadow warning in parsedate.c
* [core, ios, macos] Implement unique_any and remove linb::anyAsheem Mamoowala2017-11-222-4/+4
|
* [core] Use Actors for CustomTileLoader invocation from bindings.Asheem Mamoowala2017-11-221-3/+3
|
* [core] Custom Geometry SourcesAsheem Mamoowala2017-11-224-1/+124
|
* [build] Clang-3.8: Explicit mbgl::style::expression::Result default ctorBruno de Oliveira Abinader2017-11-141-0/+4
|
* [build] Clang-3.8: Default init of a const type requires user-provided ctorBruno de Oliveira Abinader2017-11-141-8/+8
|
* [core] Fix build on Android + GCC and Android + armeabiThiago Marcos P. Santos2017-11-122-3/+5
| | | | Sadly we don't have bots for these two setups.
* Implement Expressions (#9439)Anand Thakker2017-11-0830-101/+2047
| | | Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)
* Replace compile-time polymorphism with runtime polymorphism in the ↵John Firebaugh2017-10-2318-1402/+290
| | | | conversion system
* [core] Move SourceType to the 'style' namespaceAnand Thakker2017-10-161-3/+3
|
* [core] Add minzoom to GeoJSONOptionsKonstantin Käfer2017-09-282-0/+11
|
* [core] custom layer - add contextLost callbackIvo van Dongen2017-09-221-0/+16
| | | | - optional callback method that can be used to do cleanup when the context has been lost before re-initialisation
* [core][ios][macos][android]DDS-ify `text-letter-spacing` and `text-max-width`Asheem Mamoowala2017-08-302-8/+8
|
* Implement icon-anchor propertyLauren Budorick2017-08-283-5/+10
|
* [core] Added Style::getDefaultCamera()Bruno de Oliveira Abinader2017-08-111-4/+2
|
* [core][android][macos][ios] Implement property functions for line-join, ↵Lauren Budorick2017-07-263-12/+12
| | | | text-justify, text-anchor (#9583)
* [core] Bracket init works for optional<T> in GCC 4.9Bruno de Oliveira Abinader2017-07-191-2/+2
|
* [core][ios][android][macos] Use premultiplied image directly for RasterTile ↵Asheem Mamoowala2017-07-171-1/+1
| | | | and ImageSource, un-premultiply in the shader for blending
* [core] Update shaders.Chris Loer2017-07-122-0/+5
| | | | | Implements 'icon-pitch-alignment' (issue #9345) Fixes issue #9456 (map-aligned point label regression)
* [core] GCC 4.9 bracket initialization issuesBruno de Oliveira Abinader2017-07-121-2/+2
|
* [core] GCC 4.9 is unable to deduce ctors when using bracket initBruno de Oliveira Abinader2017-07-121-0/+5
|
* [core] GCC 4.9 does not fully support custom variable templatesBruno de Oliveira Abinader2017-07-124-5/+5
|
* [core] Implement circle-pitch-alignment propertyChris Loer2017-07-062-0/+8
| | | | Closes issue #9349.
* [core] Move setStyleJSON/URL to Style; add Map::setStyleJohn Firebaugh2017-06-221-0/+6
|
* [all] Promote Style to public APIJohn Firebaugh2017-06-221-0/+75
|
* [core] Enable property functions for line-width (#9250)Lauren Budorick2017-06-196-5/+8
|
* [core] Fix composite function approximation for non-integer stopsJohn Firebaugh2017-06-161-22/+53
|
* Fix undefined memory access in getCoveringRanges() (#9227)Anand Thakker2017-06-091-1/+1
| | | | | | | | | | | | * Add simple unit tests for SymbolSizeBinder * Fix bug in symbol size uniform value calculation For camera functions we were setting the zoom levels in "covering ranges" to `[(zoom stop <= tile zoom), (zoom stop >= 1 + tile zoom)]`, but then evaluating the function at `[tile_zoom, tile_zoom + 1]`. * Check for it != end() before accessing it->first
* [core] Collection-level immutabilityJohn Firebaugh2017-06-051-1/+1
| | | | Introduce a second level of immutability, over each of the collections held by a style: sources, images, and layers. Tracking immutability at this level allows us to short-circuit significant portions of the RenderStyle update logic via a simple equality check, greatly improving performance.
* [core] Refactor RenderSource updatesJohn Firebaugh2017-06-052-0/+8
| | | | | | | * Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends. * Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method * Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method * Remove Style& dependency TODO from GeometryTile and TileParameters
* [core] Use fixed-size std::array for ImageSource coordinatesAsheem Mamoowala2017-06-013-12/+11
|