summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Don't enforce ["zoom"] constraints for filters (#11672)Anand Thakker2018-04-122-5/+29
| | | | | | | | | | | | * Don't enforce ["zoom"] constraints for filters Fixes #11594 * Add a couple of comments * Fix ambiguous constructor call * ParsingContext(optional<Type>) => ParsingContext(Type)
* Update layer immediately when changing its max/min zoom level (#11399)Łukasz Paczos2018-04-1210-0/+20
| | | | | | * [android][core] update layer immediately when changing it's max/min zoom * [core] node bindings for layer zoom range
* 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] re-bind uniform locations after re-linking program (#11618)Łukasz Paczos2018-04-061-0/+5
| | | | | - On some gl implementations the uniform locations are shifted after linking the program a second time, resulting in errors when using any uniform. On some implementations they are actually doubled. Re-binding the uniforms after selectively binding the vertex attributes prevents this. (cherry picked from commit 4a0e025)
* [core] Add Projection matrix to CustomLayerRenderParameters to transform web ↵Asheem Mamoowala2018-04-051-0/+4
| | | | mercator world coordinates to GL coordinates.
* Use a host interface for CustomLayer instead of function pointers (#11553)Asheem Mamoowala2018-04-025-52/+22
| | | | | | Use a host interface for CustomLayer instead of function pointers Co-authored-by: Julian Rex <julian.rex@mapbox.com>
* [core] Make FeatureIndex own GeometryTileData.Chris Loer2018-04-025-30/+27
| | | | | Prevents querying a FeatureIndex built against a separate set of data, which can lead to invalid index exceptions. The GeometryTileWorker 'data' member can still change independently of the data in the feature index, at the time 'setData' is called. The GeometryTileWorker maintains ownership of its local data (which may be used to re-parse) and clones the data for use by the FeatureIndex in the foreground.
* [core] Consolidate GeometryTile symbol/nonSymbolBucketsChris Loer2018-04-024-24/+11
| | | | Conversion to one-phase tile loading removed any need to track them separately.
* [core] Convert GeometryTileWorker to "one-phase" loadingChris Loer2018-04-024-129/+141
| | | | | Modest simplification refactoring (issue #10457). Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
* [core] Fixed to-rgba with zero opacityMinh Nguyễn2018-03-303-14/+24
|
* [core] Round-trip linear interpolatorsMinh Nguyễn2018-03-301-1/+5
|
* [core] Fix potential race condition crash in symbol querying..Chris Loer2018-03-292-8/+25
| | | | | | Second half of fix for issue #11538. If a global placement took place between the time a tile's non-symbol layout updated and the time new symbol buckets arrived, the tile's new FeatureIndex would be committed, but the global CollisionIndex would be generated against the old symbolBuckets. The mismatch could cause the CollisionIndex to contain indices that didn't exist in the new FeatureIndex, and attempting to access them would generate an out-of-bounds exception.
* [core] Fix potential race condition crash in symbol querying..Chris Loer2018-03-292-6/+8
| | | | | | | | First half of fix for issue #11538. Testing `if (pendingData)` didn't work if there _was_ a data update, but the update was "the data for this tile is now null". In that case, the tile's FeatureIndex would be updated, but the tile's data member would remain unchanged. In the case of a tile's data being deleted, the matching FeatureIndex would have an empty set of bucketLayerIDs, but the _old_ data would still be in place for querying, and the symbolBuckets might not be updated yet (pending onPlacement). In this case `bucketLayerIDs.at(indexedFeature.bucketName)` could throw an out-of-range exception.
* [core] Don't resolve tokens after evaluating a text-field or icon-image ↵John Firebaugh2018-03-221-2/+2
| | | | expression (#11509)
* [core] Double maximum label width by reducing glyph precision.Chris Loer2018-03-223-4/+4
| | | | | Fixes issue #11507. Port of GL JS PR #6375.
* [core] Avoid flashing on pitched overzoomed tiles.Chris Loer2018-03-213-3/+12
| | | | | | Clamps perspective ratios in shaders. Fixes issue #11487. Port of GL JS PR #6365.
* [core] don't hide icons if text is an empty stringAnsis Brammanis2018-03-191-3/+3
|
* [core] Update mapbox-gl-jsJohn Firebaugh2018-03-141-2/+8
|
* [core] Stringify expression syntax, not function syntaxJohn Firebaugh2018-03-141-125/+6
|
* [core] TileJSON conversion clamps bounds longitude to [-180,180], per specAsheem Mamoowala2018-03-091-0/+2
|
* [core] Add expression filter support (#11251)Lucas Wojciechowski2018-03-0910-12/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* [android] calculating camera's LatLng for bounds without map padding (#11410)Łukasz Paczos2018-03-081-1/+0
|
* 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] blacklist vao usage on mali t720 (sapphire 650)Ivo van Dongen2018-03-011-2/+9
| | | | Avoids problems on (amongst others) Samsung Galaxy J3
* [core] check opengl error state after custom layer invocationsIvo van Dongen2018-03-011-3/+4
|
* [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`
* [core] continue loading style even if we mutate itKonstantin Käfer2018-02-231-5/+0
| | | | When we load a stale style from cache, and the user immediately starts mutating it, we should continue loading the style so that we'll get a fresh copy of the data into our cache and avoid perpetually showing the stale style.
* [core] Don't reuse heatmap render texture on viewport resize.Chris Loer2018-02-221-1/+1
| | | | Fixes issue #11228.
* [core] Support a range of zooms in TileRange. Accounts for TilePyramid ↵Asheem Mamoowala2018-02-202-22/+45
| | | | requesting parent tiles of ideal zoom tiles.
* [core, ios, macos, android, node] Heatmap layer (#11046)Vladimir Agafonkin2018-02-1535-25/+1153
| | | | | 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>
* [core] fix opacity of duplicate labels with -allow-overlap: trueAnsis Brammanis2018-02-151-3/+8
|
* [core] add support for mapzen terrarium (#11154)Molly Lloyd2018-02-149-10/+37
| | | | | | | | | | | | * add support for mapzen terrarium * Encoding --> DEMEncoding, avoid if statement when unpacking elevation values * add Terrarium test * update submodule * remove redundant checks
* [core] add maxzoom uniform for raster-dem tilesets (#11134)Molly Lloyd2018-02-146-7/+21
| | | | | | | | | | * add maxzoom uniform to support external tilesets * update git sha for gl-js * try and fix android crash * name default maxzoom constant
* [core] Rename "onLowMemory" to "reduceMemoryUse".Chris Loer2018-02-1419-27/+27
| | | | | Android still calls "reduceMemoryUse" only while handling a low memory event. iOS, on the other hand, calls "reduceMemoryUse" every time it enters the background.
* [core] fix onLowMemory to release GL buffersChris Loer2018-02-141-1/+1
| | | | Context cleanup must be called _after_ render sources release tiles.
* TileJSON Bounds allows values inclusive of world extentsAsheem Mamoowala2018-02-121-1/+1
|
* [core] Make RendererObserver a public interfaceThiago Marcos P. Santos2018-02-091-35/+0
| | | | Needed by backends implementing asyncronous rendering
* Add options for Custom Geometry Source types to enable clipping and wrapping ↵Asheem Mamoowala2018-02-071-1/+1
| | | | geometry (#11041)
* [core] align raster-dem tiles to pixel grid (#11119)Molly Lloyd2018-02-061-2/+2
| | | | | | * align raster-dem tiles to pixel grid * revert ignored hillshade tests
* [core] Don't crash on line labels with 0 glyphs.Chris Loer2018-02-061-2/+3
| | | | Fixes issue #10956.
* [core] Account for overscaling in debug collision circles.Chris Loer2018-02-064-3/+10
| | | | | Fixes issue #11116. Port of GL JS issue $6041.
* Reset tileset-based render sources when any tileset properties changed. (#11042)Asheem Mamoowala2018-02-056-24/+27
|
* [android] - blacklist adreno 2xx for VAO supportTobrun2018-01-311-2/+3
|
* [core] don't force downloading of Open Sans fontsKonstantin Käfer2018-01-251-1/+1
| | | | When a SymbolLayer doesn't have a text-font defined, we automatically add Open Sans/Arial Unicode MS. However, when the SymbolLayer is only used for rendering icons, it doesn't have text-field defined either. In those cases, we still force downloading Open Sans/Arial Unicode MS during offline pack creation. If the user doesn't use this font, this change should save ~15MB and a few seconds in download time.
* [core] align implementations of local and asset file sourceKonstantin Käfer2018-01-251-0/+2
|
* [core] align raster imagery rendering to pixel rid to avoid blurrinessKonstantin Käfer2018-01-246-10/+30
|
* 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