Commit Graph

12345 Commits

Author SHA1 Message Date
Tobrun
aa43dfd6c1 [android] - add convinience step expression (#11641) 2018-04-10 14:26:22 +02:00
Tobrun
ce75c3b3e7 [android] - add javadoc code examples for Android (#11540) 2018-04-10 13:45:46 +02:00
Tobrun
c2a78d0d72 [android] - add paused state to map renderer, don't render snapshot when paused (#11358) 2018-04-10 11:10:14 +02:00
Tobrun
44ce5ab087 Rework expression conversion (#11490)
* [android] - rework expression conversion
2018-04-10 11:09:42 +02:00
Łukasz Paczos
351ac83c75 [android] - fixed gesture events listeners lists documentation (#11630) 2018-04-10 09:57:00 +02:00
Anand Thakker
8d26f74091 Fix style parsing bug for constant expressions (#11606)
* 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
2018-04-09 17:59:18 -04:00
Tobrun
c1dabbde8d [android] - add delete local refs calls for make jni strings 2018-04-09 20:14:45 +02:00
Ivo van Dongen
14423a225b [android] release local refs early 2018-04-09 17:46:02 +03:00
Minh Nguyễn
1af1cbe721 [ios, macos] Equate valueForKey: with valueForKeyPath: 2018-04-06 13:47:49 -07:00
Minh Nguyễn
f9e32d59ad [ios, macos] Distinguish between conditionals and expressions in case expression 2018-04-06 13:47:49 -07:00
Asheem Mamoowala
e32a0586f2 Change MGLMapPointMake to MGLMapPointForCoordinate 2018-04-06 10:06:05 -07:00
Łukasz Paczos
6f639dba20 [core] re-bind uniform locations after re-linking program (#11618)
- 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)
2018-04-06 16:28:36 +02:00
Asheem Mamoowala
cc01781db7 [ios, macos] Projection Matrix and LatLng projection to Mercator methods 2018-04-05 18:04:25 -07:00
Asheem Mamoowala
dc495e1c9d [core] Add Projection matrix to CustomLayerRenderParameters to transform web mercator world coordinates to GL coordinates. 2018-04-05 18:04:25 -07:00
Osana Babayan
275d753e91 [android] updated mapbox-sdk-services to 3.0.1 (#11593)
* [android] updated mapbox-sdk-services to 3.0.1

* [android] - downgrade tooling for MAS-3.0.1
2018-04-05 11:38:02 -04:00
Anand Thakker
c50a74d1c2 Remove unused lambda capture (#11602)
Fixes #11588
2018-04-05 10:57:45 -04:00
Łukasz Paczos
d5a3e5be7a Release android v6.0.0 beta.6 (#11592)
* [android] updated changelog for 6.0.0-beta.6
2018-04-05 10:53:55 +02:00
Łukasz Paczos
db3cf229f8 [android] - bumped telemetry version to 3.0.0-beta.4 (#11590) 2018-04-04 13:36:31 +02:00
Tobrun
5d8844152d Rework logical condition convenience expressions (#11555)
* [android] - rework expression logical operator api to match actual usage
2018-04-04 12:41:34 +02:00
Łukasz Paczos
25d0f7157d [android] invalidate camera position before delivering onMapReady (#11585) 2018-04-04 11:55:46 +02:00
Tobrun
1730756e87 [android] - throw illegal argument exception when attempting to convert an PropertyValue as an expression literal (#11572) 2018-04-04 11:33:37 +02:00
Julian Rex
ddd8fb7a05 [ios] Added explicit dependency to address occasional test build failures. (#11581) 2018-04-03 16:59:53 -04:00
Jason Wray
c5c02c069e [ios] Bump podspecs for ios-v4.0.0-beta.3 2018-04-02 19:33:10 -04:00
Jason Wray
fa0fd2c63e [ios] Prepare changelog for ios-v4.0.0-beta.3 2018-04-02 19:33:08 -04:00
Asheem Mamoowala
099fcc3b3c Use a host interface for CustomLayer instead of function pointers (#11553)
Use a host interface for CustomLayer instead of function pointers

Co-authored-by: Julian Rex <julian.rex@mapbox.com>
2018-04-02 16:15:25 -07:00
Minh Nguyễn
c3079c6155 [ios, macos] Corrected documentation
Mentioned MGLComputedShapeSource in a few more places. Updated symbol style layer documentation to refer to aftermarket expression functions. Copyedited some heatmap style layer documentation.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
8fb65f0989 [ios, macos] Clarified source options
Also moved options to the primary classes that use them.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
9faed7293b [ios, macos] Eliminated MGLAbstractShapeSource
MGLComputedShapeSource is now a direct subclass of MGLSource and sibling of MGLShapeSource.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
a877b6dbe8 [ios, macos] Renamed MGLVectorSource to MGLVectorTileSource 2018-04-02 10:42:54 -07:00
Minh Nguyễn
1044064017 [ios, macos] Mention update-examples in contributing guide 2018-04-02 10:42:54 -07:00
Minh Nguyễn
29a8efab26 [ios, macos] Renamed MGLRasterSource to MGLRasterTileSource
Also updated various source class listings to reflect the addition of image and raster DEM sources.
2018-04-02 10:42:54 -07:00
Chris Loer
a2399a57a2 [core] Make FeatureIndex own GeometryTileData.
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.
2018-04-02 10:39:22 -07:00
Chris Loer
11961d5c31 [core] Consolidate GeometryTile symbol/nonSymbolBuckets
Conversion to one-phase tile loading removed any need to track them separately.
2018-04-02 10:39:22 -07:00
Chris Loer
7f42e3970e [core] Convert GeometryTileWorker to "one-phase" loading
Modest simplification refactoring (issue #10457).
Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
2018-04-02 10:39:22 -07:00
Jason Wray
6762cd0a8f [ios, build] Enable ios-sanitize-address build on CircleCI 2018-03-30 19:59:09 -04:00
Jason Wray
8c6abaf3fa [ios] Fix heap buffer overflow in two-coordinate MGLPolyline 2018-03-30 19:59:09 -04:00
Minh Nguyễn
59e92904c3 Eviscerate mbgl expression to Foundation JSON object conversion (#11389)
* [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
2018-03-30 16:43:55 -07:00
Jason Wray
b6866f764e [ios, docs] Fix formatting in Predicates & Expressions guide (#11574)
- Code ticks within HTML tables do not convert to code blocks.
- Pipes within Markdown tables are interpreted as new columns, even within ticks.
2018-03-30 19:25:30 -04:00
Minh Nguyễn
d066e94103 [core] Fixed to-rgba with zero opacity 2018-03-30 15:36:32 -07:00
Minh Nguyễn
f4d9fb816d [core] Round-trip linear interpolators 2018-03-30 15:36:30 -07:00
Julian Rex
cf5d2ca4ef [ios] Fix for integration tests running on device. Refs #11297
Moves Mapbox framework from integration target to be be embedded in host app.
2018-03-30 14:26:49 -04:00
Bruno de Oliveira Abinader
c6b8d9dbb4 [test] Update Map.PrefetchTiles 2018-03-30 01:45:52 -04:00
Jason Wray
23ccfce176 [ios] Update mapbox-events-ios to v0.4.0 2018-03-29 14:07:39 -04:00
Minh Nguyễn
8c5eb6ca9c Install aftermarket expression functions (#11472)
* [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>
2018-03-29 10:25:05 -07:00
Chris Loer
e5a3a7a451 [core] Fix potential race condition crash in symbol querying..
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.
2018-03-29 09:04:23 -07:00
Chris Loer
f9b6d5f09c [core] Fix potential race condition crash in symbol querying..
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.
2018-03-29 09:04:23 -07:00
Fabian Guerra Soto
2aaa038ef1 [ios, macos] Add lookup and feature operators. (#11528)
* [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.
2018-03-28 18:09:17 -04:00
Łukasz Paczos
fbd6e2b618 Release Android v6.0.0-beta.5 (#11537)
* [android] Updated changelog for 6.0.0-beta.5 release
2018-03-28 15:35:33 +02:00
Chris Loer
3c18610d1f [core] Add 'apiBaseURL' argument to mbgl-offline util. 2018-03-27 15:26:38 -07:00
Łukasz Paczos
7f18b0bbb2 [android] bumped gestures library version to 0.2.0 (#11535) 2018-03-27 18:23:07 +02:00