CHANGELOG.md 29.5 KB
Newer Older
1
2
# Changelog

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
3
4
## master

5
6
## maps-v1.6.0

zmiao's avatar
zmiao committed
7
8
9
10
### ✨ New features

- [core] Add support for `Polygon`, `MultiPolygon` geometry types in `distance` expression. ([#16446](https://github.com/mapbox/mapbox-gl-native/pull/16446))

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
11
12
13
14
15
16
17
18
19
20
### 🐞 Bug fixes

- [core][tile mode] Labels priority fixes ([#16432](https://github.com/mapbox/mapbox-gl-native/pull/16432))

  This change does the following:

  - strictly arranges all the intersecting labels accordingly to the style-defined priorities
  - fixes placement order of the variable labels.
    Before this change, all variable labels that could potentially intersect tile borders were placed first, breaking the style label placement priority order. Now, all the variable labels, which do not actually intersect the tile borders, are placed accordingly to the style-defined priorities

Minh Nguyễn's avatar
Minh Nguyễn committed
21
## maps-v1.6.0-rc.2
Kevin Li's avatar
Kevin Li committed
22

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
23
24
25
26
27
28
29
30
31
32
### ✨ New features

- [core] Introduce Source::setMinimumTileUpdateInterval API ([#16416](https://github.com/mapbox/mapbox-gl-native/pull/16416))

  The `Source::setMinimumTileUpdateInterval(Duration)` method sets the minimum tile update interval, which is used to throttle the tile update network requests.

  The corresponding `Source::getMinimumTileUpdateInterval()` getter is added too.

  Default minimum tile update interval value is `Duration::zero()`.

zmiao's avatar
zmiao committed
33
34
35
36
37
38
- [core] Indroduce `distance` expression. ([#16397](https://github.com/mapbox/mapbox-gl-native/pull/16397))
   
  The `distance` expression returns the shortest distance between two geometries. The returned value can be consumed as an input into another expression for changing a paint or layout property or filtering features by distance.

  Currently, the `distance` expression supports `Point`, `MultiPoint`, `LineString`, `MultiLineString` geometry types.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
39
40
41
42
43
44
45
46
- [core] Introduce style::Source::setVolatile()/isVolatile() API ([#16422](https://github.com/mapbox/mapbox-gl-native/pull/16422))

  The `Source::setVolatile(bool)` method sets a flag defining whether or not the fetched tiles for the given source should be stored in the local cache.

  The corresponding `Source::isVolatile()` getter is added too.

  By default, the source is not volatile.

47
48
- [ios, macos] Allow specifying multiple fonts or font families for local font rendering ([#16253](https://github.com/mapbox/mapbox-gl-native/pull/16253))

49
  By default, CJK characters are now set in the font specified by the `text-font` layout property. If the named font is not installed on the device or bundled with the application, the characters are set in one of the fallback fonts passed into the `localFontFamily` parameter of `mbgl::Renderer::Renderer()` and `mbgl::MapSnapshotter::MapSnapshotter()`. This parameter can now contain a list of font family names, font display names, and font PostScript names, each name separated by a newline.
50
51

### 🐞 Bug fixes
52
53
54

- [ios, macos] Fixed error receiving local file URL response ([#16428](https://github.com/mapbox/mapbox-gl-native/pull/16428))

55
56
57
58
- [ios, macos] Corrected metrics of locally rendered fonts ([#16253](https://github.com/mapbox/mapbox-gl-native/pull/16253))

  CJK characters are now laid out according to the font, so fonts with nonsquare glyphs have the correct kerning. This also fixes an issue where the baseline for CJK characters was too low compared to non-CJK characters.

59
60
## maps-v1.6.0-rc.1

Juha Alanen's avatar
Juha Alanen committed
61
62
63
64
### ✨ New features

- [core] Move logging off the main thread ([#16325](https://github.com/mapbox/mapbox-gl-native/pull/16325))

Alexander Shalamov's avatar
Alexander Shalamov committed
65
66
67
68
- Add source property to limit parent's tile overscale factor ([#16347](https://github.com/mapbox/mapbox-gl-native/pull/16347))

  The new property sets a limit for how much parent tile can be overscaled.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
69
70
71
72
73
74
75
76
77
- [core][tile mode] Introduce API to collect placed symbols data ([#16339](https://github.com/mapbox/mapbox-gl-native/pull/16339))

  The following methods are added to the `Renderer` class in implemented in the Tile map mode:
  - `collectPlacedSymbolData()`
    enables or disables collecting of the placed symbols data

  - `getPlacedSymbolsData()`
    if collecting of the placed symbols data is enabled, returns the reference to the `PlacedSymbolData` vector holding the collected data.

78
- [core] Enable circle-sort-key property ([#15875](https://github.com/mapbox/mapbox-gl-native/pull/15875/))
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
79
80
81
82
83

  Adds support for `circle-sort-key` property, consistent with `symbol-sort-key`.

  Sorts drawing order by sort key both within-tile and cross-tile.

Gali Nelle's avatar
Gali Nelle committed
84
85
86
87
- [core] Add LocationIndicator layer ([#16340](https://github.com/mapbox/mapbox-gl-native/pull/16340))

  Adds a new layer type, `location-indicator`, that can be used to add a source-less indicator to the map, comprising raster images and a precision radius in meters.

88
- Add generic setter for Layer's 'source' property ([#16406](https://github.com/mapbox/mapbox-gl-native/pull/16406))
Alexander Shalamov's avatar
Alexander Shalamov committed
89

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
### 🐞 Bug fixes

- [core][tile mode] Reduce cut-off labels (part 2) ([#16369](https://github.com/mapbox/mapbox-gl-native/pull/16369))

  Now, the intersecting symbols are placed across all layers _symbol by symbol_ according to the following rules:

  1. First we look, which of the tile border(s) the symbol intersects and prioritize the the symbol placement accordingly (high priority -> low priority): `vertical & horizontal -> vertical -> horizontal`
  2. For the symbols that intersect the same tile border(s), assuming the tile border split symbol into several sections, we look at the minimal section length. The symbol with a larger minimal section length is placed first.
  3. For the symbols that intersect the same tile border(s), and have equal minimal section length, we look at the anchor coordinates.
  4. Finally, if all the previous criteria are the same, we look at the symbol key hashes.

- [core][tile mode] Fix variable placement for labels with the `icon-text-fit` property set ([#16382](https://github.com/mapbox/mapbox-gl-native/pull/16382))

  The `symbolIntersectsTileEdges()` util in `mbgl::TilePlacement` now considers icon shift for the variable symbols with enabled icon-text-fit setting, thus providing more accurate results.

105
106
- [core] Correctly log a warning instead of crashing when a non-existent image is attempted to be removed. ([#16391](https://github.com/mapbox/mapbox-gl-native/pull/16391))

107
108
- [core] Fix segfault resulting from an invalid geometry ([#16409](https://github.com/mapbox/mapbox-gl-native/pull/16409))

109
110
- [macos] Restored support for macOS 10.11–10.14 ([#16412](https://github.com/mapbox/mapbox-gl-native/pull/16412))

111
112
## maps-v1.5.1

Alexander Shalamov's avatar
Alexander Shalamov committed
113
114
### 🐞 Bug fixes

Alexander Shalamov's avatar
Alexander Shalamov committed
115
116
117
118
- [core] Fix assert in gfx resources cleanup ([#16349](https://github.com/mapbox/mapbox-gl-native/pull/16349))

  Fix a resource leak assertion in `gl::Context::~Context()` that is evaluating false in scenarios where graphics context has been marked as lost.

Alexander Shalamov's avatar
Alexander Shalamov committed
119
120
121
122
- Hillshade bucket fix for mapbox-gl-native-ios #240 ([#16362](https://github.com/mapbox/mapbox-gl-native/pull/16362))

  When dem tiles are loaded, border in neighboring tiles is updated, too leading to bucket re-upload. if std::move moved indices / vertices previously, they are empty and we get crash. Re-upload requires that only DEM texture is re-uploaded, not the quad vertices and indices.

123
124
## maps-v1.5.0

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
125
126
### ✨ New features

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
127
- [core] Add Renderer::clearData() ([#16323](https://github.com/mapbox/mapbox-gl-native/pull/16323))
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
128

129
  The newly added `Renderer::clearData()` method allows to clear render data and thus save memory and make sure outdated tiles are not shown. It clears data more agressively than `Renderer::reduceMemoryUse()` does, as it clears not only the cache but all orchestration data, including the data used by the currently rendered frame.
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
130

131
132
- [android] Add jni binding for styleable snapshotter ([#16286](https://github.com/mapbox/mapbox-gl-native/pull/16286))

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
133
134
135
136
137
138
139
140
141
- [core] Ability to set generic layer properties using setProperty method ([#16324](https://github.com/mapbox/mapbox-gl-native/pull/16324))
  This change enables the following new keys for the `mbgl::Layer::setProperty()` API:
  - "filter" invokes `setFilter()`
  - "minzoom" invokes `setMinZoom()`
  - "maxzoom" invokes `setMaxZoom()`
  - "source-layer" invokes `setSourceLayer()`

  The newly-added API is used in the style-conversion code, which made this code much simpler.

Alexander Shalamov's avatar
Alexander Shalamov committed
142
143
- [android] Expose getLayer, getSource and Observer interface for snapshotter ([#16338](https://github.com/mapbox/mapbox-gl-native/pull/16338))

zmiao's avatar
zmiao committed
144
145
146
147
148
149
### 🐞 Bug fixes

- [core] Use `TileCoordinates` instead of `LngLat` for `within` expression calculation ([#16319](https://github.com/mapbox/mapbox-gl-native/pull/16319))

  Fix the issue that `within` expression evaluates point features inconsistently across zoom levels if the point lies near the boundary of a GeoJSON object ([#16301](https://github.com/mapbox/mapbox-gl-native/issues/16301))

zmiao's avatar
zmiao committed
150
- [core][tile mode] Reduce cut-off labels ([#16336](https://github.com/mapbox/mapbox-gl-native/pull/16336))
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
151
152
153
154
155

  Place tile intersecting labels first, across all the layers. Thus we reduce the amount of label cut-offs in Tile mode.

  Before, labels were arranged within one symbol layer (one bucket),which was not enough for several symbol layers being placed at the same time.

zmiao's avatar
zmiao committed
156
157
- [core] Fix issue that `within` expression returns incorrect results for geometries crossing the anti-meridian ([#16330](https://github.com/mapbox/mapbox-gl-native/pull/16330))

158
159
## maps-v1.4.1

Kevin Li's avatar
Kevin Li committed
160
161
162
163
164
165
### 🐞 Bug fixes

- [android] Fix wrong method call in map_snapshotter ([#16308](https://github.com/mapbox/mapbox-gl-native/pull/16308))

  In map_snapshotter, a wrong method call will cause Sanpshotter not works with a style url in Android. This change makes it call the right method to let Snapshotter works.

166
## maps-v1.4.0
167

Alexander Shalamov's avatar
Alexander Shalamov committed
168
169
170
171
172
173
174
175
176
177
### ✨ New features

- [android] Add jni binding for line-sort-key and fill-sort-key ([#16256](https://github.com/mapbox/mapbox-gl-native/pull/16256))

  With this change, android sdk will be able to get sort key for LineLayer and FillLayer.

- Styleable MapSnapshotter ([#16268](https://github.com/mapbox/mapbox-gl-native/pull/16268))

  New feature provides means of modifying style of a MapSnapshotter. The new API enables several use-cases, such as: adding route overlays, removing extra information (layers) from a base style, adding custom images that are missing from a style.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
178
179
180
181
- [core] Improve stability of symbol placement when the map is tilted ([#16287](https://github.com/mapbox/mapbox-gl-native/pull/16287))

  These changes improve performance and bring more stability to the symbol placement for the tilted view, which is mainly used for navigation scenarios.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
182
183
184
185
186
187
### 🐞 Bug fixes

- [core] Fix iterators in addRegularDash() ([#16249](https://github.com/mapbox/mapbox-gl-native/pull/16249))

  Fixes possible crashes when using styles with line patterns.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
188
189
- [default] Fix possible crash at RunLoop::wake() ([#16255](https://github.com/mapbox/mapbox-gl-native/pull/16255))

190
- [android] Update toGeoJSON in android_conversion.hpp ([#16243](https://github.com/mapbox/mapbox-gl-native/pull/16243))
191
192
193

  Before this chage, `toGeoJSON` method in `android_conversion.hpp` could not convert an Object (Map in android) to GeoJSON object.

194
  But `within` expression needs to accept an Object and then convert it to the GeoJSON object, now `toGeoJSON` method can convert both string and Object to GeoJSON.
195

zmiao's avatar
zmiao committed
196
197
- [core] Fix `within` expression algorithm so that `false` value will be returned when point is on the boundary.  Allow using different GeoJSON formats as arguments of `within` expression.([#16232](https://github.com/mapbox/mapbox-gl-native/pull/16232))

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
198
199
  A valid GeoJSON argument should contain one of the following types:  `"Feature"`, `"FeatureCollection"`,`"Polygon"` or `"MultiPolygon"`.

200
- [core] [tile mode] placement algorithm must consider icons bounding boxes ([#16277](https://github.com/mapbox/mapbox-gl-native/pull/16277))
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
201
202
203
204

  Tile mode placement algorithm now checks if bounding boxes for both label text and icon are intersecting the edges of the tiles.

  Before, it checked only text bounding boxes and thus label icons might have got cut off.
zmiao's avatar
zmiao committed
205

Alexander Shalamov's avatar
Alexander Shalamov committed
206
207
208
209
- [core] Calculate size of an ambient cache without offline region's resources ([#15622](https://github.com/mapbox/mapbox-gl-native/pull/15622))

  Resources that belong to an offline region, should not contribute to the amount of space available in the ambient cache.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
210
211
212
213
 - [core][tile mode] Fix assertion at `line-center` placement handling ([#16293](https://github.com/mapbox/mapbox-gl-native/pull/16293))

  The `Symbol Intersects Tile Edges` placement algorithm should not be applied to the symbols with `line-center` placement.

214
215
216
217
 - Fixed using of the `in` expression as a layer filter ([#16272](https://github.com/mapbox/mapbox-gl-native/pull/16272))

  The bug was caused by `mbgl::style::conversion::isExpression()` always returning `false` for the `in` expression.

Alexander Shalamov's avatar
Alexander Shalamov committed
218
219
220
221
222
223
224
225
226
227
### 🧩  Architectural changes

- Changes to `MapSnapshotter` threading model ([#16268](https://github.com/mapbox/mapbox-gl-native/pull/16268))

  Snapshotter's threading model has been changed. Previously, `Map` and `HeadlessFrontend` that is responsible for rendering snapshot, were running on a dedicated thread. After [#16268](https://github.com/mapbox/mapbox-gl-native/pull/16268), `Map` object lives on client thread, so that the client can access `Style` object, while `HeadlessFrontend` lives on a dedicated `Snapshotter` thread.

##### ⚠️  Breaking changes

- Signature of a `MapSnapshotter`'s constructor has been changed
- Signature for a `MapSnapshotter::snapshot` method has been changed
Alexander Shalamov's avatar
Alexander Shalamov committed
228
- Size of an offline regions do not affect ambient cache size ([#15622](https://github.com/mapbox/mapbox-gl-native/pull/15622))
229

zmiao's avatar
zmiao committed
230
231
232
233
##### 📌 Known issues

- When feature is exactly on the geometry boundary, `within` expression returns inconsistent values for different zoom levels  ([#16301](https://github.com/mapbox/mapbox-gl-native/issues/16301))

234
235
## maps-v1.3.0 (2020.02-relvanillashake)

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
236
237
238
239
240
241
242
243
244
245
### 🐞 Bug fixes

- [core] Fix offline region download freezing ([#16230](https://github.com/mapbox/mapbox-gl-native/pull/16230))

  Downloaded resources are put in the buffer and inserted in the database in batches.

  Before this change, the buffer was flushed only at the network response callback and thus it never got flushed if the last required resources were present locally and did not initiate network requests - it caused freezing.

  Now the buffer is flushed every time the remaining resources container gets empty.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
246
247
### ✨ New features

Alexander Shalamov's avatar
Alexander Shalamov committed
248
249
250
251
- [core] Add Layer::serialize() method ([#16231](https://github.com/mapbox/mapbox-gl-native/pull/16231))

  New method allows serialization of a layer into a Value type, including all modifications done via runtime style API. New method is also an enabler for Style object serialization (sources, layers, etc).

252
253
- [android] Add jni binding for min and max pitch ([#16236](https://github.com/mapbox/mapbox-gl-native/pull/16236))

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
254
255
256
257
- [offline] Offline tool does not hang on 404 error ([#16240](https://github.com/mapbox/mapbox-gl-native/pull/16240))

  The missing resource gets skipped and teh offline region download continues.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
258
259
260
261
262
263
264
265
##### ⚠️  Breaking changes

- Changes to `mbgl::FileSourceManager::getFileSource()` ([#16238](https://github.com/mapbox/mapbox-gl-native/pull/16238))

  It returns now `mbgl::PassRefPtr<FileSource>` (previously was `std::shared_ptr<FileSource>`) in order to enforce keeping the strong reference to the returned object.

  Breaking code example:
  `auto fs = FileSourceManager::getFileSource(); fs->..`
266

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
267
268
269
270
271
272
273
274
275
276
277
278
279
  Posible fix:
  `std::shared_ptr<FileSource> fs = `;

- The `mbgl::OnlineFileSource` class cannot be used directly ([#16238](https://github.com/mapbox/mapbox-gl-native/pull/16238))

  Clients must use the parent `mbgl::FileSource` interface instead.

  Breaking code example:
  `std::shared_ptr<OnlineFileSource> onlineSource = std::static_pointer_cast<OnlineFileSource>(FileSourceManager::get()->getFileSource(..));`

  Possible fix:
  `std::shared_ptr<FileSource> onlineSource = FileSourceManager::get()->getFileSource(..);`

Alexander Shalamov's avatar
Alexander Shalamov committed
280
281
282
283
284
285
286
287
288
289
## maps-v1.2.1 (2020.02-release-vanillashake)

### 🐞 Bug fixes

- [core] Revert shader changes from [#16189](https://github.com/mapbox/mapbox-gl-native/pull/16189), which will cause incorrect label positioning ([#16235](https://github.com/mapbox/mapbox-gl-native/pull/16235))

  This is a back porting from GL JS [#9333](https://github.com/mapbox/mapbox-gl-js/pull/9333)

- [ios] Restored support for iOS 9–11 by default ([#16241](https://github.com/mapbox/mapbox-gl-native/pull/16242))

290
291
## maps-v1.2.0 (2020.02-release-vanillashake)

Alexander Shalamov's avatar
Alexander Shalamov committed
292
293
294
295
296
### ✨ New features

- [core] Global settings API ([#16174](https://github.com/mapbox/mapbox-gl-native/pull/16174))

  Global settings API provides means of managing non-persistent in-process settings. Initial implementation contains support for experimental option for setting thread priorities.
Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
297
298
299
300
301
302
303

- Expose READ_ONLY_MODE_KEY property for DatabaseFileSource ([#16183](https://github.com/mapbox/mapbox-gl-native/pull/16183))

  The `READ_ONLY_MODE_KEY` property is exposed for `DatabaseFileSource`.

  This property allows to re-open the offline database in read-only mode and thus improves the performance for the set-ups that do not require the offline database modifications.

Alexander Shalamov's avatar
Alexander Shalamov committed
304
305
306
307
- [core] Add runtime API for setting tile prefetch delta for a Source ([#16179](https://github.com/mapbox/mapbox-gl-native/pull/16179))

  The new `Source::setPrefetchZoomDelta(optional<uint8_t>)` method allows overriding default tile prefetch setting that is defined by the Map instance.

308
- [core] Add support for `within expression`. Implement the use of `within expression` with paint propery and filter expression. ([#16157](https://github.com/mapbox/mapbox-gl-native/pull/16157))
309

310
  The `within expression` enables checking whether a feature is inside a pre-defined geometry set/boundary or not. This `within expression` returns a boolean value, `true` indicates that the feature being evaluated is inside the geometry set. The returned value can be then consumed as input by another expression or used directly by a paint/layer property.
311

312
  Support for using `within expression` with layout property will be implemented separately.
313

314
315
316
- [core] Add support for using `within expression` with layout property. ([#16194](https://github.com/mapbox/mapbox-gl-native/pull/16194))

- [core] Add support for `in expression`. ([#16162](https://github.com/mapbox/mapbox-gl-native/pull/16162))
317

318
  The `in expression` enables checking whether a Number/String/Boolean type item is in a String/Array and returns a boolean value.
319

zmiao's avatar
zmiao committed
320
- [core] Add support for using `within expression` with features having `'LineString'` geometry type. ([#16220](https://github.com/mapbox/mapbox-gl-native/pull/16220))
321

zmiao's avatar
zmiao committed
322
323
  `within expression` now supports features with geometry types: `'Point'` or `'LineString'`.

Alexander Shalamov's avatar
Alexander Shalamov committed
324
325
326
327
328
329
### 🐞 Bug fixes

- [core] Don't provide multiple responses with the same data for 304 replies ([#16200](https://github.com/mapbox/mapbox-gl-native/pull/16200))

  In cases when cached resource is useable, yet don't have an expiration timestamp, we provided data to the requester from the cache and the same data was returned once 304 response was received from the network.

Karim Naaji's avatar
Karim Naaji committed
330
331
- [core] Fix potential visual artifact for line-dasharray ([#16202](https://github.com/mapbox/mapbox-gl-native/pull/16202))

Alexander Shalamov's avatar
Alexander Shalamov committed
332
333
334
335
- Store gfx::DrawScope objects with associated render objects. ([#15395](https://github.com/mapbox/mapbox-gl-native/pull/15395))

  We used some shared SegmentVectors, e.g. for drawing raster or background tiles. In longer running maps, this lead to resource accumulation. By storing the SegmentVectors and the contained gfx::DrawScope objects, we ensure that resources get released when the associated render objects vanish.

Alexander Shalamov's avatar
Alexander Shalamov committed
336
337
338
339
- [core] Fix sprite sheet merging in Style::Impl::onSpriteLoaded ([#16211](https://github.com/mapbox/mapbox-gl-native/pull/16211))

  If we get a new sprite sheet from the server, we need to merge current sprite sheet with a new one, while overwriting duplicates and keeping old unique images in a style.

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
340
341
342
343
344
345
346
347
348
349
350
351
352
353
### 🏁 Performance improvements

 - [core] Loading images to style optimization ([#16187](https://github.com/mapbox/mapbox-gl-native/pull/16187))

   This change enables attaching images to the style with batches and avoids massive re-allocations. Thus, it improves UI performance especially at start-up time.

### 🧩  Architectural changes

##### ⚠️  Breaking changes

 - [core] Loading images to style optimization ([#16187](https://github.com/mapbox/mapbox-gl-native/pull/16187))

   The `style::Style::getImage()` semantics changed - it now returns `optional<style::Image>`.

354
355
## maps-v1.0.1 (2020.01-release-unicorn)

Alexander Shalamov's avatar
Alexander Shalamov committed
356
357
358
359
360
361
### 🐞 Bug fixes

- [core] Use std::list instead of std::map for factory instance ([#16161](https://github.com/mapbox/mapbox-gl-native/pull/16161))

  Factory 'get' method can be invoked recursively and stable iterators are required to guarantee safety.

362
363
364
365
366
367
368
369
- [tile mode] Improvements in symbol placement on tile borders ([#16159](https://github.com/mapbox/mapbox-gl-native/pull/16159))

  In tile mode, the placement order of two symbols crossing a tile border is defined by their anchor Y values.

  Symbols crossing the borders between two neighboring tiles are placed with priority.

  It improves symbol placement stability in the tile map mode.

370
## maps-v1.0.0 (2020.01-release-unicorn)
371

372
373
### ✨ New features

Alexander Shalamov's avatar
Alexander Shalamov committed
374
375
376
377
- [core] Implement stretchable icons ([#16030](https://github.com/mapbox/mapbox-gl-native/pull/16030))

  [Stretchable icons](https://github.com/mapbox/mapbox-gl-js/issues/8917) allow defining certain areas of an icon that may be stretched, leaving the remaining areas of an icon at a fixed size.

Alexander Shalamov's avatar
Alexander Shalamov committed
378
379
380
381
- [core] Port line-sort-key and fill-sort-key ([#15839](https://github.com/mapbox/mapbox-gl-native/pull/15839))

  The new feature allows to sort line and fill layer features. Similar to `symbol-sort-key`.

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
- [core] Add image sections to format expression ([#15937](https://github.com/mapbox/mapbox-gl-native/pull/15937))

  The new feature allows to embed images into labels.

- [core] Introduce OfflineDatabase::runPackDatabaseAutomatically() API ([#15967](https://github.com/mapbox/mapbox-gl-native/pull/15967))

  The new API allows to enable / disable automatic packing of a database.

- [core] Decouple offline storage vacuum and the deleteRegion API ([#15899](https://github.com/mapbox/mapbox-gl-native/pull/15899))
  - introduce `OfflineDatabase::pack()` standing for incremental vacuum
  - make packing optional at offline region deletion

- [core] Implement image expression (#15877)

  The [image expression](https://docs.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-image) allows determining an image's availability.

- [core] Add batch conversion of latLngs to/from screenCoords ([#15891](https://github.com/mapbox/mapbox-gl-native/pull/15891))

  This patch introduces batch conversion between LatLng and ScreenCoordinate in Gl-Native core, so for multiple conversions with single point/latLng previously now it can be done with invoking one function call by passing vector of points/latLngs.

402
### 🐞 Bug fixes
403
404
405
- [tile mode] Fix variable symbols placement ([#16141](https://github.com/mapbox/mapbox-gl-native/pull/16141)

  This change allows the variable symbols to cross the tile border only if their anchor is the first anchor from the `text-variable-anchor` list.
406

Alexander Shalamov's avatar
Alexander Shalamov committed
407
408
409
410
- [core] Use weak scheduler inside mailbox ([#16136](https://github.com/mapbox/mapbox-gl-native/pull/16136))

  If there are pending requests that are completed after main scheduler is destructed, worker threads may try to push messages to destructed scheduler's queue.

411
412
- [core] Fix a crash in GeoJSON source parsing, caused by `GeoJSONVTData` ownership error ([#16106](https://github.com/mapbox/mapbox-gl-native/pull/16106))

413
414
415
416
- [core] Stable position of labels at tile borders in tile mode ([#16040](https://github.com/mapbox/mapbox-gl-native/pull/16040))

  These changes allow to avoid cutting-off labels on tile borders if the variable text placement is enabled.

Alexander Shalamov's avatar
Alexander Shalamov committed
417
418
419
420
- [core] Fix really overscaled lines ([#16045](https://github.com/mapbox/mapbox-gl-native/pull/16045))

  We resample lines after sharp corners in some situations. When tiles were really overscaled, sometimes we didn't have enough precision to represent the resampled vertex because it was too close. Disabling this after a certain point prevents this ([#16018](https://github.com/mapbox/mapbox-gl-native/issues/16018)).

421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
- [core] Don't use signed int type for anchor segment ([#16008](https://github.com/mapbox/mapbox-gl-native/pull/16008))

  Erroneous signed to unsigned implicit conversion was used when PlacedSymbol(s) were created in SymbolLayout and signed values were used as indexes in a few other places.

- [core] Increase padding in CollisionIndex for MapMode::Tile ([#15880](https://github.com/mapbox/mapbox-gl-native/pull/15880))

  This increases the padding to 1024 for MapMode::Tile which should be enough to completely include all the data two zoom levels past the data source's max zoom level. Beyond that, 1024 should be enough of a padding to make clipped labels unlikely.

- [core] Blacklist VAO extension for Adreno (TM) 4xx GPUs ([#15978](https://github.com/mapbox/mapbox-gl-native/pull/15978))

  Blacklist in order to avoid crashes in a driver (Android 5.1.1)

- [core] Retain thread pool in GeoJSONSource ([#15992](https://github.com/mapbox/mapbox-gl-native/pull/15992))

  Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yeld.

- [core] Fix supercluster lambdas capturing ([#15989](https://github.com/mapbox/mapbox-gl-native/pull/15989))

  Fix wrapping of the parameters in supercluster map/reduce lambdas (Previously, local variables were wrapped by reference).

- [core] fix rendering of dashed lines with round caps ([#15947](https://github.com/mapbox/mapbox-gl-native/pull/15947))

  In [#15862](https://github.com/mapbox/mapbox-gl-native/pull/15862), we introduced individual textures for line dash patterns to eliminate atlas overflows. Unfortunately, this broke dashed lines that had round caps (dashed lines with straight caps still rendered correctly). Line pattern textures for round caps were now using 256×15 pixel textures.

- [core] Fix incorrect resizing of TileCache ([#15943](https://github.com/mapbox/mapbox-gl-native/pull/15943))

- [core] Avoid GeoJSON source flickering on style transitions ([#15907](https://github.com/mapbox/mapbox-gl-native/pull/15907))

  Before this change, all GeoJSON source cleared tile pyramid at the style transition and it caused flickering.

- [core] Use individual textures for line dash patterns ([#15862](https://github.com/mapbox/mapbox-gl-native/pull/15862))

  This moves the LineAtlas from a shared texture that contained SDF dash patterns to use individual textures.

- [core] Fix collisions with icon-text-fit and variable placement ([#15828](https://github.com/mapbox/mapbox-gl-native/pull/15828))

  When deciding the placement position it was only checking whether there were text collisions. Now, if icon-text-fit is used it now checks whether the icon fits before accepting a placement position.

- [core] Fix icon-text-fit ([#15634](https://github.com/mapbox/mapbox-gl-native/pull/15634))

  This fixes rendering by account for the 1px texture padding around icons that were stretched with icon-text-fit.

463
464
### 🏁 Performance improvements

Mikhail Pozdnyakov's avatar
Mikhail Pozdnyakov committed
465
466
467
468
469
470
- [core] Cross tile index performance ([#16127](https://github.com/mapbox/mapbox-gl-native/pull/16127))

  For overscaled tiles, index only the symbols inside the viewport.

  Find matches only among the buckets that have the same leader Id.

471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
- [core] Calculate GeoJSON tile geometries in a background thread ([#15953](https://github.com/mapbox/mapbox-gl-native/pull/15953))

  Call `mapbox::geojsonvt::GeoJSONVT::getTile()` in a background thread, so that the rendering thread is not blocked.

- [core] Make requests for expired resources lower priority than requests for new resources ([#15950](https://github.com/mapbox/mapbox-gl-native/pull/15950))

- [core] Add Scheduler::scheduleAndReplyValue() API ([#15885](https://github.com/mapbox/mapbox-gl-native/pull/15885))

  This change converts GeoJSON features to tiles for the loaded source description in a background thread and thus unblock the UI thread.

- [core] Enable incremental vacuum for Offline DB ([#15837](https://github.com/mapbox/mapbox-gl-native/pull/15837))

  Thus we avoid re-creating the whole database and keeping the backup file as it happens on calling VACUUM.

- [core] Fix image requests for already obtained images ([#15825](https://github.com/mapbox/mapbox-gl-native/pull/15825))

  Before this fix, repeated request for an already obtained image was erroneously treated as pending, and it prevented from the tiles load completion.

489
### 🧩  Architectural changes
490
491
492
493

- [core] Merge style::Layer::set{Layout,Paint}Property ([#15997](https://github.com/mapbox/mapbox-gl-native/pull/15997))

- [core] Use expected.hpp from mapbox-base ([#15898](https://github.com/mapbox/mapbox-gl-native/pull/15898))
494
495
496

##### ⚠️  Breaking changes

Alexander Shalamov's avatar
Alexander Shalamov committed
497
498
499
500
- [core] Cross tile index performance (#16127)

  Introduces public [mblg::Renderer::render](https://github.com/mapbox/mapbox-gl-native/pull/16127/files#diff-5a977e0401792825d7fcf522d48df11fR34) API break.

501
- [core] Refactor DefaultFileSource codebase ([#15768](https://github.com/mapbox/mapbox-gl-native/pull/15768))
502
503
504
505
506
507
508
509
510
511
  - Adds `FileSourceManager` interface that provides access to `FileSource` instances and means of registering / unregistering `FileSource` factories
  - Splits `DefaultFileSource` into smaller parts
  - Adds `DatabaseFileSource` interface and it's default implementation
  - Removes inter-dependencies between concrete `FileSource` classes
  - All sources operate on dedicated thread, except `MainResourceLoader` that acts as a dispatcher and works on thread that requested it.
  - Removes `ResourceOptions::withCacheOnlyRequestsSupport` method

- [core] Remove Map::cycleDebugOptions ([#16005](https://github.com/mapbox/mapbox-gl-native/pull/16005))

  This function was mostly used by the Android API, which is no longer necessary.