Commit Graph

3493 Commits

Author SHA1 Message Date
Konstantin Käfer
fcc3808c83 [core] align raster imagery rendering to pixel rid to avoid blurriness 2018-01-24 17:02:18 -08:00
Minh Nguyễn
fb5b8d34f2 Reimplement style values atop NSExpression (#10726)
* [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
2018-01-24 00:04:02 -08:00
Konstantin Käfer
d4ed8d1a44 [core] fix style parsing crash when a layer's paint property is not an object 2018-01-23 13:45:14 -08:00
Molly Lloyd
f3294200c6 [core] add raster-dem source type and hillshade layer type (#10642) 2018-01-23 10:49:23 -08:00
Chris Loer
b2e71abfee Prune unused layers from CrossTileSymbolIndex
Fixes issue #10939 -- removed layers would leak entries in the CrossTileSymbolIndex.
2018-01-19 14:50:42 -08:00
Chris Loer
fa57224791 [core] GeometryTileData needs to be updated in lockstep with FeatureIndex 2018-01-18 14:36:22 -08:00
Chris Loer
656a6373b9 [core] Synchronize state of CollisionIndex and FeatureIndexes.
Fixes issue #10778, in which mismatch between FeatureIndex and CollisionIndex could lead to inconsistent results or even invalid array access.
2018-01-18 14:36:22 -08:00
Chris Loer
b3d3ab0e31 [core] Prevent symbols at the same zoom from sharing a crossTileID.
Port of GL JS PR #5994.
Fixes issue #10844, which would allow multiple symbols in a tile to share the same crossTileID as one of their duplicate parent-tile symbols. Once the symbols shared a crossTileID, they would permanently remain "duplicates" of each other, even after increasing zoom level allowed the CrossTileSymbolIndex to distinguish between them.
2018-01-17 12:49:30 -08:00
Ansis Brammanis
6782d7af37 [core] fix symbol flickering after data updates 2018-01-11 14:07:00 -05:00
Ansis Brammanis
68159f8d01 [core] fix updating CrossTileSymbolIndex after bucket update
emplace does not overwite existing entries
2018-01-11 14:07:00 -05:00
John Firebaugh
542713fefe [core] Add warning for invalid text-font values 2018-01-10 15:31:12 -08:00
John Firebaugh
76ed5079a5 [core, ios, macos, android] Add data-driven-styling support for text-font 2018-01-10 15:31:12 -08:00
John Firebaugh
c9da6e4959 [core] Account for circle-stroke-width in queryRenderedFeatures 2018-01-10 14:22:44 -08:00
John Firebaugh
cedda5ef4f [core] Handle NaN input to interpolate and step 2018-01-10 13:45:00 -08:00
John Firebaugh
0eb4b5cc0e [core] Omit inferred type annotations for 'coalesce' arguments 2018-01-09 17:27:02 -08:00
John Firebaugh
e887cda986 [core] Fix alpha handling in rgba and to-rgba operators 2018-01-09 16:46:52 -08:00
John Firebaugh
a4ab4f68e2 [core] Enable implicit type assertions for array types 2018-01-09 16:13:26 -08:00
John Firebaugh
a13027c1b6 [core] Improve typing for !=, == expressions 2018-01-09 16:10:51 -08:00
Lauren Budorick
43a9bd3fba [core] Use separate shaders for background and clipping 2018-01-09 15:02:49 -08:00
Chris Loer
966606a107 [core] Update debug collision circle shader.
Fixes issue #10876.
2018-01-09 13:14:02 -08:00
Konstantin Käfer
145a0ee6d0 [core] blacklist binary program loading for Vivante GC4000 GPUs 2018-01-09 09:55:05 -08:00
Thiago Marcos P. Santos
fef095f785 [windows][core] Use Qt's own zlib on Windows 2018-01-08 22:58:20 +02:00
Thiago Marcos P. Santos
5b789aa4d6 [windows][core] Include what you use 2018-01-08 22:58:20 +02:00
Thiago Marcos P. Santos
f880baaeb7 [windows][qt] Remove std:: namespace of some functions
Not available on Windows.
2018-01-08 22:58:20 +02:00
Bruno de Oliveira Abinader
af183f3952 [ios] Ignore Boost's 'implicit conversion loses integer precision' warning 2018-01-08 22:58:20 +02:00
Ansis Brammanis
feab36a9fb [core] port minor collision changes from -js (#10764) 2018-01-08 12:57:03 -05:00
Asheem Mamoowala
10a44050f4 Support TileJSON bounds property (#10701)
* [core] Parse TileJSON bounds property
* [core] Add TileRange and LatLngBounds::contains(CanonicalTileID)
Move LatLngBounds::contains impl to cpp file
* [core] Skip tile creation outside of tileset bounds
* [core] Fix TileRange for wrapped bounds and use for CustomTileLoader instead of LatLngBounds comparisons for tiles.
2018-01-05 06:35:31 -08:00
Ansis Brammanis
aa158bb20c [core] fix #10833 loading overscaled tiles
This reverts a regression in ed5438fc21
which set `tileZoom = idealZoom` for all types of tiles.

The second change makes it so that panTiles get loaded only if they have
a lower *data zoom* (only if they cover a larger area).
2018-01-05 10:51:38 +02:00
Fabian Guerra
6fa57b7d48 Merge branch 'release-agua' back to master. 2018-01-04 17:13:55 -06:00
Chris Loer
5bfa20d71d Fix distant collision perspective ratios (#10794).
Analog of GL JS issue #5911.
Add native ignore for tilejson-bounds.
2018-01-04 14:24:37 -08:00
Fabian Guerra
187b6dc31c Merge branch 'release-agua' into master
# Conflicts:
#	circle.yml
#	cmake/core-files.cmake
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/build.gradle
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/CameraChangeDispatcher.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/text/LocalGlyphRasterizer.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/BitmapUtils.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DebugModeActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/LocalGlyphActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MyLocationTintActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_local_glyph.xml
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/descriptions.xml
#	platform/darwin/src/MGLMapSnapshotter.mm
#	platform/darwin/src/MGLRendererConfiguration.h
#	platform/ios/CHANGELOG.md
#	platform/ios/DEVELOPING.md
#	platform/ios/INSTALL.md
#	platform/ios/README.md
#	platform/ios/resources/bg.lproj/Localizable.strings
#	platform/ios/resources/es.lproj/Localizable.strings
#	platform/ios/resources/vi.lproj/Localizable.strings
#	platform/ios/src/MGLMapView.mm
#	platform/macos/macos.xcodeproj/project.pbxproj
#	src/mbgl/text/glyph_manager.cpp
2018-01-04 12:55:19 -06:00
Bruno de Oliveira Abinader
ed5438fc21 [core] Allow prefetching tiles for all source types 2018-01-03 16:58:54 +02:00
Konstantin Käfer
498dbf27b9 [core] don't tie Annotation geometries to Map maxzoom
Instead, geometry generation via GeoJSONVT is now bound to the hardcoded limit of the annotation tile source.
2018-01-02 20:17:15 +01:00
Konstantin Käfer
ac32b41493 [core] don't tie Annotation geometries to Map maxzoom
Instead, geometry generation via GeoJSONVT is now bound to the hardcoded limit of the annotation tile source.
2018-01-02 19:41:07 +01:00
Asheem Mamoowala
6a9eec8ed5 Fix CustomLayer context retain count (#10765)
* [core] RenderCustomLayer should de-initialize old context

* [iOS, macOS] Use toll-free bridging to retain/release MGLOpenGLStyleLayer instead of a separate array.
2017-12-20 14:51:30 -08:00
Lauren Budorick
920057c9d6 [core] Better align fill-extrusion vertex layout 2017-12-20 15:17:11 -05:00
Chris Loer
f1f2ebb019 [core] Hook LocalGlyphRasterizer "font family" configuration up to Renderer 2017-12-18 12:17:22 -08:00
Chris Loer
a53818a10b [core] Enable local glyph generation using TinySDF.
- Platform-specific LocalGlyphRasterizer is responsible for deciding which glyphs to rasterize locally and for implementing the rasterization.
 - Default platform implementation doesn't locally generate any glyphs -> no behavior change
 - Unit test uses StubLocalGlyphRasterizer, which returns a single fixed bitmap for all CJK glyphs
 - Rename glyph_loader.test to glyph_manager.test
2017-12-18 12:17:22 -08:00
Chris Loer
2e3e88f027 [core] C++ port of TinySDF 2017-12-18 12:17:22 -08:00
Minh Nguyễn
40f20a1339 [core] Migrated upcase, downcase to platform code
Replaced manual, per-character upper- and lowercasing code with calls to platform-specific code that affects a wider range of characters.
2017-12-14 09:14:54 -08:00
Asheem Mamoowala
f545d21df0 [core] Overzoomed image sources vanish (#10677)
Use z0 tile coordinates instead of screen coordinates to compute ideal zoom for image sources
2017-12-13 12:52:23 -08:00
Chris Loer
3fed2358d6 [core] Include bucket name in queryRenderedSymbols duplicate feature filter
- Port of GL JS PR #5703
 - Fixes issue #10616
2017-12-11 15:05:18 -08:00
Chris Loer
cb380064bb [ios,macos] Darwin implementation of a CoreText-based LocalGlyphRasterizer.
- Changing font weight does not currently appear to be working.
 - Glyph metric extraction code not working; currently unused.
2017-12-11 10:43:00 -08:00
Chris Loer
1661af1cb4 [core] Enable local glyph generation using TinySDF.
- Platform-specific LocalGlyphRasterizer is responsible for deciding which glyphs to rasterize locally and for implementing the rasterization.
 - Default platform implementation doesn't locally generate any glyphs -> no behavior change
 - Unit test uses StubLocalGlyphRasterizer, which returns a single fixed bitmap for all CJK glyphs
 - Rename glyph_loader.test to glyph_manager.test
2017-12-11 10:43:00 -08:00
Chris Loer
730054276e [core] C++ port of TinySDF 2017-12-11 10:43:00 -08:00
Lauren Budorick
a0199efa9a Correct ColorMode::Replace 2017-12-07 13:01:42 -08:00
Asheem Mamoowala
ca9d9bb857 [core] Use wrapped bounds check for CustomTileLoader 2017-12-07 09:53:36 -08:00
Asheem Mamoowala
31a216459c [core] Mark custom geometry tiles stale without clearing data 2017-12-06 19:44:12 -08:00
Konstantin Käfer
f16ecf5907 [core] don't include .cpp file 2017-12-05 15:53:48 +01:00
Konstantin Käfer
8757164ac8 [build] standardize on -fvisibility=hidden for all targets
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
2017-11-29 17:31:33 +01:00