Commit Graph

737 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
586b22c0df [core] Remove map coordinate setters/getters 2019-03-04 14:45:32 +02:00
Thiago Marcos P. Santos
056073a904 [build] Use the correct define on Windows
https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html
2019-02-19 16:20:56 +02:00
Jason Wray
5a5b8520cc [core] Remove old sqlite3 usage note 2019-02-14 10:51:49 -08:00
Michael Muesch
24468956fc Ability to disable any layer using pre-processing flags. 2019-01-17 18:56:58 +02:00
Alexander Shalamov
ab160ac321 [core] Notify requests about network reachability in priority order 2019-01-14 17:34:37 +02:00
Alexander Shalamov
2da9d483ac [android] Implement google benchmark runner for Android platform 2019-01-11 09:49:36 +02:00
Konstantin Käfer
6f60ccf08e [build] generate header maps instead of -files.txt 2019-01-09 10:26:53 +01:00
Chris Loer
b7e2b11a75 [core] Support for excluding ideographic glyphs from offline downloads. 2018-12-21 15:13:48 -08:00
Julian Rex
1c7cd243c4 [core,ios,macos] Updates default styles to streets v11, etc. (#13585) 2018-12-18 16:00:19 -05:00
Alexander Shalamov
a228f3d80a [core] Refactor duplicated code in Asset and File sources 2018-12-17 11:37:56 +02:00
Alexander Shalamov
f076a1fe39 [core] Use util::readFile for Local and Asset file sources
Use exception free util::readFile instead of util::read_file for
LocalFileSource and AssetFileSource implementations.
2018-12-17 11:37:56 +02:00
Konstantin Käfer
1d8235f5b8 [build] rework platform/default directory and add -files.txt for vendored libs 2018-12-14 11:03:03 +01:00
Mikhail Pozdnyakov
ebd87a5442 [core, android, darwin] Move layer factories to separate files 2018-12-10 18:20:32 +02:00
Mikhail Pozdnyakov
92352de87d [core] layermanager folder
Move `LayerManager` and `LayerFactory` abstract classes to a dedicated folder.
2018-11-30 19:09:17 +02:00
Mikhail Pozdnyakov
ad03e42b28 [core] LayerManager can disable annotations
At the moment, the annotations implementation in the `mapbox-gl-native`
core is creating concrete layer instances apart from `LayerManager/LayerFactory`
code path.

So, annotations must be disabled if the `LayerManager` implementation does
not provide line, fill or symbol layers (those, used by the annotations).

Note: in future, annotations implementation will be moved from the core to the
platform SDK level(see https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation)
and `LayerManager` won't need to disable it.
2018-11-28 17:18:38 +02:00
Mikhail Pozdnyakov
361982fef8 [core][Android][Darwin] LayerManager creates RenderLayer instances
`LayerManager` is now responsible for `RenderLayer` instances creation,
so that there is a single entry point for creating of objects, which
correspond to a certain layer type.

The `LayerType type` field is dropped from `Layer::Impl`.
2018-11-27 18:10:21 +02:00
Chris Loer
afdc243042 [core] Expose "local ideograph font family" in MapSnapshotter. 2018-11-24 09:57:32 -08:00
Huyen Chau Nguyen
9a606caf0b [core] define number of concurrent downloads in online file source variable 2018-11-15 12:19:48 -08:00
Mikhail Pozdnyakov
33818233cf [core][android] Introduce mbgl::style::LayerTypeInfo
The `LayerTypeInfo` contains static meta data about certain layer type.

Each layer module should have a single immutable `LayerTypeInfo` instance
for the represented layer type. Both `LayerImpl` and `LayerFactory` from the
module always refer to the same `LayerTypeInfo` instance, so address of this
instance can be used as a layer module Id during the process life time.
2018-11-15 18:32:31 +02:00
Bruno de Oliveira Abinader
db2e1b2e5f [core] Add RendererState::{pixelForLatLng,latLngForPixel} 2018-11-14 12:22:22 +02:00
Mikhail Pozdnyakov
5a70f2b150 noexcept specifier for layer factory methods 2018-11-07 16:34:20 +02:00
Mikhail Pozdnyakov
ffdeef3a26 Refer corresponding LayerFactory instance from the Layer::Impl 2018-11-07 16:34:20 +02:00
Thiago Marcos P. Santos
7ff85374a7 [build] Remove #pragma diagnostic for boost
Boost is now included as a system header and the compiler
should ignore it when issuing warnings.
2018-11-01 16:29:37 +02:00
Bruno de Oliveira Abinader
a7b3f40f44 [build] GCC 7+ complains about -Wimplicit-fallthrough in utf.cpp 2018-10-25 16:23:40 +03:00
Bruno de Oliveira Abinader
55710cbb67 [core] Added RendererState::has{Image,Layer,Source} 2018-10-25 16:23:40 +03:00
Huyen Chau Nguyen
fa78bcadfd [core] add tests for handling requests with different priorities
- ensure that low priority requests are handled last
- add option to set the number of maximum concurrent requests for tests
- some style fixups
2018-10-23 12:47:10 +02:00
Huyen Chau Nguyen
40693e00a8 [core] add logic of high and low priority requests to OnlineFileSource
- only process low priority requests (=offline requests) if there are no outstanding regular requests
- favour regular requests over low priority ones
2018-10-23 12:47:10 +02:00
Huyen Chau Nguyen
1e3a744d22 [core] add priorities to resources
- priorities can be low or regular
- offline downloads should have low priority to not throttle "regular requests"
2018-10-23 12:47:10 +02:00
Konstantin Käfer
282c71e8e9 [core] unify UTF-8/16 conversion to <boost/locale/encoding_utf.hpp> 2018-10-23 12:23:40 +02:00
Bruno de Oliveira Abinader
ea51b11dcc [core] Introduce mbgl::RendererState 2018-10-19 12:05:16 +02:00
Bruno de Oliveira Abinader
b94be6e68f [core] Add TransformState::getCameraOptions() 2018-10-19 12:05:16 +02:00
Chris Loer
f510b577aa [core] Promote DefaultFileSource::put to general use. 2018-10-17 12:53:24 -07:00
Chris Loer
fc11d2e872 [core, test] Add BiDi unit test
- Port of arabic.test.js from mapbox-gl-rtl-text
- Modify BiDi::getLine to remove trailing nulls in the event UBIDI_REMOVE_BIDI_CONTROLS causes the string to shorten.
- Patch vendored ICU to avoid undefined undefined bit shifting behavior (triggered sanitizer failure)
2018-10-15 13:15:46 -07:00
Chris Loer
bc71825774 [core] Bidi support for styled text.
Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it.
2018-10-15 13:15:46 -07:00
Konstantin Käfer
4004a85a79 [android] explicitly set temp directory for SQLite3 2018-09-26 13:47:28 +02:00
Konstantin Käfer
153acd981b [core] Always request 1x and @2x sprite images for portability
When creating a offline region, we've previously only requested the sprite image for the specified resolution. This lead to offline packs not being usable on devices that have a different pixel ratio. We're now requesting both 1x and 2x sprites. Some devices use even higher or fractional pixel ratios. However, we only ever use 1x and 2x sprite images in our requests.
2018-09-24 11:35:44 +02:00
Asheem Mamoowala
d5f0e4b41e Use named function instead of lambda for SQlite3 log config 2018-09-21 12:13:26 +02:00
Fabian Guerra Soto
a938c3ef68 [ios, macos] Offline regions merge. (#12791)
* [ios, macos] Add offline regions merge.

* [ios, macos] Update changelogs.

* [ios, macos] Fix refreshing the offline packs after new content is added.

* [ios, macos] Update MGLOfflineStorage's add contents of file documentation.

* [ios, macos] Add MGLOfflineStorage test cases for adding file contents.

* [ios, macos] Add offline merge test database.

* [ios, macos] Add packs parameter to MGLBatchedOfflinePackAdditionCompletionHandler.

* [core] Fix a query mege duplication.

* [ios, macos] Remove unnecessary pack iteration.

* [ios, macos] Fix packs update KVO notifications.

* [ios, macos] Add localization strings.

* [core] Fix query readability.

* [ios, macos] Fix MGLOfflineStorageTest, cleanup the cache database after the test.

* [ios, macos] Fix offline packs, updating triggers a crash.
2018-09-17 15:31:43 -07:00
Konstantin Käfer
071129bf61 [linux,qt] Remove remainder of WebP support 2018-09-13 13:27:44 +02:00
Konstantin Käfer
30e570aae7 [core] add polyfill for codecvt for STLs that don't have it yet 2018-09-11 11:43:54 +02:00
Asheem Mamoowala
d4f4136414 Enforce Offline tile limit when merging sideloaded databases 2018-08-28 07:14:54 -07:00
Asheem Mamoowala
eb72fe580b Require minimum side-loaded database user_version=6 2018-08-28 07:14:54 -07:00
Asheem Mamoowala
fcab3a81cd Add unit tests and fixtures for OfflineDatabase::mergeDatabase 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
Asheem Mamoowala
48381efa11 SQL Statements to merge an attached database with name 'side' into the main database.
Co-authored-by: kkaefer <mail@kkaefer.com>
2018-08-28 07:14:54 -07: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
084c28f0bb [core] recreate offline database when it is deleted out from under our feet 2018-08-14 17:03:46 -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
Vladimir Kondrashov
9ecb0997ef [core] Fix out of range exception for string compare 2018-08-14 11:16:10 -07:00