Commit Graph

869 Commits

Author SHA1 Message Date
ryanhamley
31cca05fc6 Port symbol-z-order symbol layout style-spec property to Native 2018-09-07 13:05:19 -07:00
Julian Rex
315a9e3cdf [ios, macos] Call snapshotter (Obj-C) completion block on dealloc/cancel if snapshot hasn't finished. (#12355) 2018-09-05 11:53:12 -04:00
Nadia Barbosa
7017ac512e [ios, macos] Allow -convertCoordinateBounds to span antimeridian 2018-09-04 18:57:18 -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
Minh Nguyễn
65ae97613e [ios, macos] Fixed typo in style authors guide 2018-08-29 13:49:07 -07:00
Konstantin Käfer
1e454642c8 [build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL for GLFW 2018-08-27 14:07:40 -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
Konstantin Käfer
52275f835a [build] add plain text file lists for iOS/macOS 2018-08-23 14:09:48 +02:00
Chris Loer
fd1767efba [core, test] Bump GL JS pin to bring gl-native back in sync with gl-js.
Requires changing `generate-style-code` to treat 'formatted' as being the same as 'string' until gl-native gets 'formatted' support with https://github.com/mapbox/mapbox-gl-native/pull/12624.
To make nitpick happy, PropertyFunction.java uses the latest "text-field" description from v8.json. It's technically correct, just kind of pointless since the "If a plain `string` is provided" clause will always be true.
2018-08-21 22:02:51 -07:00
Mikhail Pozdnyakov
5ce64b786c [ios, macos] Introduce MGLShapeSourceOptionLineDistanceMetrics
Exposes access to
https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson-lineMetrics
2018-08-21 13:49:35 +03:00
Nadia Barbosa
50059659d1 Warn if MGLShapeSource is initialized with MGLShapeCollection
Move warning from ShapeCollection to ShapeSource

Try checking MGLComputedShapeSources

Include MGLShapeCollection header

Add changelog entry
2018-08-20 15:45:03 -07:00
Ivo van Dongen
ca0f2f925d [darwin] arbitrary offline region 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
Konstantin Käfer
6e06e55b95 WIP: use expected<T, E> for passing on errors 2018-08-14 17:03:46 -07:00
Nadia Barbosa
41169403a2 Rename link title 2018-08-14 16:38:38 -07:00
Nadia Barbosa
66a09b924f Fix line break 2018-08-14 16:38:38 -07:00
Nadia Barbosa
04705f4364 Addiional darwin fixes and Jazzy template updates 2018-08-14 16:38:38 -07:00
Nadia Barbosa
9bd23a7362 Update darwin docs 2018-08-14 16:38:38 -07:00
Jason Wray
f117865e8e [ios] Remove Xcode 7 compatibility typedefs 2018-08-09 13:46:53 -04:00
Jason Wray
ec7b920603 [ios] Standardize exception definitions 2018-08-09 13:35:28 -04:00
Bruno de Oliveira Abinader
3952ff5c34 [core] Replace unique_any with peer from mapbox-bindgen 2018-08-08 14:14:34 +03:00
John Firebaugh
9bdd765a02 [core] Merge DataDrivenPropertyValue into PropertyValue (#12513) 2018-07-31 14:21:47 -07:00
Lloyd Sheng
9c90509750 [iOS] Add fallbacks for name fields (#12387)
* Add fallbacks for name fields

* Add a fallback for `name_zh-Hant`

* Update changelog
2018-07-26 13:53:12 +08:00
Minh Nguyễn
3a97734cd2 [ios, macos] Fixed typos in expression conversion error messages 2018-07-25 04:25:45 -07:00
Jason Wray
cdd3553641 [darwin] Use FOUNDATION_EXTERN instead of plain extern
FOUNDATION_EXTERN is an alias for extern in most cases, but also covers us in the event that a method could be mismangled by the compiler as C++ (when we want C-style mangling, for Obj-C compatibility).
2018-07-24 18:14:32 -04:00
Jason Wray
14dc94e65f [ios] Simplify and (internally) document MGLPointRounded()
`UIScreen.nativeScale` is available beginning in iOS 8, so the conditional is no longer necessary.
2018-07-24 18:14:32 -04:00
Jason Wray
08b08878d3 [ios] Move private geometry symbol visibility definitions to header 2018-07-24 18:14:32 -04:00
Jason Wray
4205cf7b10 [ios] Fix symbol mangling issue with MGLMapPointForCoordinate()
`MGLMapPointForCoordinate()` was `extern`-defined in a C header, but implemented in an Obj-C++ source file and mangled as a C++ symbol. `FOUNDATION_EXTERN` is C++-aware and will force C-style symbol mangling, which fixes the undefined symbol issue in consumer Obj-C projects.
2018-07-24 18:14:27 -04:00
Chris Loer
0b2221cb74 [android, ios, macos] Generate symbol-placement: line-center wrappers 2018-07-23 13:33:27 -07:00
Fabian Guerra Soto
681e0141de [ios] Mapbox's Location Manager new API. (#12013)
* [ios] The new location manager API provides two new protocols MGLLocationManager and MGLLocationManagerDelegate to handle the location cycle and updates respectively. This enables developers to chose the appropriate location provider according to their needs, or transition between outdoors/indoors location updates.

It does provide a default implementation based on CLLocationManager.
2018-07-20 14:14:43 -07:00
John Firebaugh
2c5d0e74a1 [ios, macos] Convert token strings to expressions on input
Removes mgl_expressionByReplacingTokensWithKeyPaths and associated code. Converting on output is no longer necessary: from the prior commit, core converts token strings to expressions at parse time; all that's necessary is to ensure that the runtime styling API does so as well.
2018-07-20 12:35:00 -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
Lloyd Sheng
782c58be00 Correct MGL_MATCH documentation (#12378) 2018-07-18 14:29:29 +08:00
Minh Nguyễn
ec8ac3c64f [ios, macos] Allow unwrapped arguments in match expressions 2018-07-09 16:03:03 -07:00
Minh Nguyễn
f11ab91fc4 [ios, macos] Convert predicate options to collators 2018-07-09 16:02:40 -07:00
Jason Wray
19605cb4b4 [ios, macos] Remove duplicate MGLTileSourceOptionDEMEncoding declaration 2018-07-06 16:53:06 -04:00
Julian Rex
56ab3318a3 [ios] [macos] Added -[MGLSnapshot coordinateForPoint:] and associated test. 2018-07-05 18:50:21 +02: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
10a6d1bf23 [ios, macos] Try to make darwin "resolvedLocale" BCP 47 compliant 2018-07-03 10:03:05 -07:00
Chris Loer
cb1328d1d0 [ios, macos] Darwin "collator" implementation
- Uses NSString for comparison
 - Uses NSLocale for loading locales
2018-07-03 10:03:05 -07:00
Minh Nguyễn
71a72d269a [ios, macos] Autolocalize into Japanese, Korean
Added Japanese and Korean to the list of languages for which the Mapbox Streets source has dedicated name fields.
2018-07-03 09:11:01 -07:00
John Firebaugh
6dfe56510c [darwin] Replace use of *Stops with expressions DSL 2018-06-29 15:38:11 -07:00
Molly Lloyd
e1af62e87d [core] add raster-resampling property (#12176)
* update style-code for raster-resampling

* implement user-defined raster-resampling

* invert filter condition

* raster-resampling -> raster-resampling-mode for darwin language conventions
2018-06-21 14:37:17 -07:00
Jason Wray
b84a184d2d [ios, build] Completely remove support for Fabric (#12106) 2018-06-18 22:03:59 -04:00
Minh Nguyễn
ee790818d8 [ios, macos] Look more widely for IBDesignablesAgent
The IBDesignablesAgent helper process has been renamed for each platform as of Xcode 10, so cast a wider net when trying to detect it.
2018-06-13 11:49:21 -07:00
Julian Rex
ed76230925 [ios,macos] Fixed crash in -[MGLStyle localizeLabelsIntoLocale:] on iOS 9.3 (#12123) 2018-06-11 15:23:40 -04:00
Chris Loer
8fdcd76d6e [ios, macos] Use NSCAssert instead of assert. 2018-06-04 11:32:20 -07:00
Julian Rex
df4d8bab31 [ios, macos] Raise exception if MGLMapSnapshotter is used from thread without active run loop. 2018-06-04 11:32:20 -07:00