Commit Graph

1985 Commits

Author SHA1 Message Date
Chris Loer
f510b577aa [core] Promote DefaultFileSource::put to general use. 2018-10-17 12:53:24 -07:00
Chris Loer
d0cd49f516 [ios, macos] Minimal darwin wrappers of 'format' expression
Add support for `MGL_FUNCTION('format', <text>, <options dictionary>)`
2018-10-15 13:15:46 -07:00
Chris Loer
ce76bde13d [core] Initial implementation of 'format' expression 2018-10-15 13:15:46 -07:00
John Firebaugh
2e93a9ddcf [core] For string-valued properties, do coercion rather than assertion 2018-09-19 14:54:38 -07:00
John Firebaugh
89b075f592 [core] Auto-convert concat arguments to strings 2018-09-19 14:54:38 -07:00
John Firebaugh
2c48b5a292 [core] Implement array assertion fallback behavior
This was added in gl-js in #7095.
2018-09-13 15:55:34 -07:00
Chris Loer
d735d89835 [core] Port "collision group" plumbing to gl-native.
[node] Hook up map-wide "crossSourceCollisions" option, defaulting to true.
[test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
2018-09-12 14:10:46 -07:00
Konstantin Käfer
4a3c4edb59 [android] add support for gnustl 2018-09-11 11:43:54 +02:00
ryanhamley
31cca05fc6 Port symbol-z-order symbol layout style-spec property to Native 2018-09-07 13:05:19 -07:00
Chris Loer
50f9381ad3 [core] Fix cubic-bezier interpolation for zooms outside stop range.
Fixes issue #12812.
Using `util::interpolationFactor` handles the case where inputLevels.min == inputLevels.max, so it returns an interpolation factor of "0" instead of dividing by 0.
2018-09-06 11:10:10 -07:00
Molly Lloyd
2cdbe934c2 [windows, qt] fix windows compiler errors, remove tao + tuple polyfill 2018-08-31 13:08:47 -07:00
Molly Lloyd
4a5dc37245 [core] Implement CrossFadedDataDrivenProperty to add support for feature expressions in *-pattern properties 2018-08-31 13:08:47 -07:00
Konstantin Käfer
5e9bbfdd44 [core] introduce TypeListConcat and TypeList::ExpandInto 2018-08-31 13:08:47 -07:00
Konstantin Käfer
abc5043339 [core] simplify attribute/location types 2018-08-31 13:08:47 -07:00
Asheem Mamoowala
d4f4136414 Enforce Offline tile limit when merging sideloaded databases 2018-08-28 07:14:54 -07:00
Asheem Mamoowala
065f5ca87e [core] Add DefaultFileSource::mergeRegions API and CLI support in the mbgl-offline tool. 2018-08-28 07:14:54 -07:00
Mikhail Pozdnyakov
fb5afd34b9 [core] Add line-gradient property
Porting of https://github.com/mapbox/mapbox-gl-js/pull/6303
See the link above for the description of the feature and
its limitations).

Based on patch from @lbud (Lauren Budorick).
2018-08-23 19:01:40 +03:00
Ivo van Dongen
fae099933b [core] offline region definition - add support for arbitrary geometries 2018-08-20 22:49:01 +03:00
Konstantin Käfer
112bbc7ab2 [core] make style/conversion.hpp implementation private 2018-08-19 13:09:16 +02:00
John Firebaugh
8ca419fb2e [core] Evict unused font stacks from GlyphManager 2018-08-17 09:38:39 -07:00
Konstantin Käfer
6e06e55b95 WIP: use expected<T, E> for passing on errors 2018-08-14 17:03:46 -07:00
Konstantin Käfer
fa7b70945f [core] harden OfflineDatabase 2018-08-14 17:03:46 -07:00
Konstantin Käfer
a3b6fc1498 [build] vendor std::expected polyfill 2018-08-14 17:03:46 -07:00
John Firebaugh
d886d3e4c0 [core] Factor out setVisibility conversion 2018-08-13 12:39:44 -07:00
John Firebaugh
b2f60a4bf2 [core] Eliminate setProperty & co. 2018-08-13 12:39:44 -07:00
Sudarsana Babu Nagineni
fc0745a699 [core] Fix build when building Qt Location plugin for Android
- log2 is not available on Android before API 18.
- Android doesn't have 'round' on the std:: namespace when using g++.

Co-authored-by: Thiago Marcos P. Santos <thiago@mapbox.com>
2018-08-10 11:19:24 +03:00
Bruno de Oliveira Abinader
3952ff5c34 [core] Replace unique_any with peer from mapbox-bindgen 2018-08-08 14:14:34 +03:00
Mikhail Pozdnyakov
15a2623147 [core] Add lineMetrics to GeoJSONOptions
This patch also bumps geojson-vt-cpp version to 6.6.0,
which enables the `lineMetrics` option.
2018-08-08 12:53:32 +03:00
Mikhail Pozdnyakov
0ec4a84c31 Rename EvaluationContext::heatmapDensity to colorRampParameter
More generic name as the same class member is to be used by the
linear gradient properties.
2018-08-07 18:31:59 +03:00
Anand Thakker
d25e1a1e7f Relax typing for comparison operators (#12537)
* Relax typing for comparison operators

Ports https://github.com/mapbox/mapbox-gl-js/pull/6961

* Review comments

* Lint fixes
2018-08-02 13:48:47 -04:00
John Firebaugh
9bdd765a02 [core] Merge DataDrivenPropertyValue into PropertyValue (#12513) 2018-07-31 14:21:47 -07:00
John Firebaugh
9a1bb1ad14 [core] Tweak conversions to reduce binary size
* return {} → return nullopt
* error = { "..." } → error.message = "..."
2018-07-30 17:17:38 -07:00
John Firebaugh
bf7785618a [core] Simplify CompoundExpression implementation 2018-07-30 14:08:27 -07:00
Sudarsana Babu Nagineni
15a1c7b71f Fix compilation errors with libc++ on QNX 7
This patch fixes the compilation errors on QNX 7:
1) QNX 7 compiler (i.e qcc based GCC 5.4.0 with libc++ from LLVM) has a
limited c++11 feature support and causing the compilation
errors with the inheriting constructors. This fixes the issues by
providing the required constructors explicitly.

2) Resolves an ambiguous overload error with optional<T>
2018-07-30 12:38:24 +03:00
Bruno de Oliveira Abinader
cb714d57c5 [core] Replace expressions RTTI with enums + static cast 2018-07-24 10:06:18 +03:00
Chris Loer
f9b36f9f5b [core] Add symbol-placement: line-center
- Remove unused/vestigial 'maxCameraDistance'
- Create a single collision circle for line labels that are less than half the width of a collision circle
2018-07-23 13:33:27 -07:00
Asheem Mamoowala
1d8664a2ae Keep original input for filters using legacy syntax. 2018-07-23 09:12:26 -07:00
John Firebaugh
af89318b1d [core] Convert token strings to expressions 2018-07-20 12:35:00 -07:00
John Firebaugh
c8edbb0500 [core] Replace {Source,Camera,Composite}Function with PropertyExpression 2018-07-20 11:56:30 -07:00
John Firebaugh
a6727921fc [core] Convert legacy functions directly to expressions 2018-07-13 13:37:27 -07:00
John Firebaugh
f7e2fe5e38 [core] Simplify Value conversions
Use a single template function for each of {to,from}ExpressionValue, always dispatching to ValueConverter.

Remove unused ValueConverter::ExpressionType typedefs.
2018-07-12 09:42:55 -07:00
Bruno de Oliveira Abinader
68bed94cd1 [core] Harden Projection::project() 2018-07-09 22:02:49 +03:00
Mikhail Pozdnyakov
514485502d Rename HeatmapColorPropertyValue to ColorRampPropertyValue
Based on patch from @lbud (Lauren Budorick).

Give `HeatmapColorPropertyValue` a more generic name,
since the same value type will be used for both `heatmap-color`
and `line-gradient` properties.
2018-07-05 15:11:14 +03:00
Anand Thakker
cfd436c287 [core] Avoid blocking in Thread<Object> constructor (#12151)
* Introduce AspiringActor, EstablishedActor

This pair of objects represents the two-phase (parent-thread /
child-thread) construction that's needed to support constructing
Thread<Object> without blocking until the child thread is up and
running.

An `AspiringActor<O>` is responsible for:
 - ownership of the actor's `Mailbox`
 - allocating the memory for (but *not* constructing) the target object `O`

Using these two pieces--the mailbox and a stable address for `O`--an
`AspiringActor<O>` can accept messages for the target object, or provide
`ActorRef<O>`s that do so, before the object has actually been
constructed by the corresponding `EstablishedActor<O>`.  (Such messages
are queued in the mailbox until after the object is constructed.)

This allows for an `AspiringActor<O>` to be created and safely used by a
thread other than the one on which the target object will (eventually)
live.

An `EstablishedActor<O>` is responsible for managing the lifetime of the
target object `O` and the open/closed state of the parent's `mailbox`.

The `O` object's lifetime is contained by that of its owning
`EstablishedActor<O>`: the `EstablishedActor` constructor executes the
`O` constructor via "placement new", constructing it at the address
provided by the parent `AspiringActor`, and the `~EstablishedActor`
destructor similarly executes the `~O` destructor (after closing the
mailbox). `EstablishedActor` should therefore live entirely on the
thread intended to own `O`.

* Remove Actor#{invoke,ask}
2018-07-03 17:17:39 -04:00
Chris Loer
9ff5d34ef2 [core] Introduce "collator" expressions
Cross platform parsing and evaluation code.
2018-07-03 10:03:05 -07:00
Bobby Sudekum
4286d5869c Add pitch argument to cameraThatFits functions (#12213) 2018-07-02 16:30:18 -07:00
John Firebaugh
647959a853 [core] Add assertions to expression constructors 2018-06-29 15:38:11 -07:00
John Firebaugh
25ac89e018 [core] Remove stops-based *Function constructors 2018-06-29 15:38:11 -07:00
John Firebaugh
6dfe56510c [darwin] Replace use of *Stops with expressions DSL 2018-06-29 15:38:11 -07:00
John Firebaugh
542a4b4501 [core] Replace use of *Stops with expressions DSL 2018-06-29 15:38:11 -07:00