Commit Graph

182 Commits

Author SHA1 Message Date
Konstantin Käfer
5cc3d7a733 [core] move GLContextMode to RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Sudarsana Babu Nagineni
7af00a404f [core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
1cc1d4ea08 [core] Add setter/getter for size property in MapOptions 2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
11afef7825 [core] Add interface to change the orientation through MapOptions 2019-03-28 16:41:15 +02:00
Bruno de Oliveira Abinader
ac6855a473 [core] Fix signature of fluent interface setters 2019-03-23 09:12:44 +02:00
Bruno de Oliveira Abinader
d5868d3da8 [core] Remove file source from public Map ctor 2019-03-20 21:30:08 +02:00
Ander Conselvan de Oliveira
5733440747 [core] Group Map LatLngBounds, min and max zoom methods
Group bounds, minimum and maximum zoom related methods together using
the new BoundOptions.

v2: Document that getBounds() initializes all optional fields.
  - Add test for getBounds() on a map with default values.
2019-03-14 18:33:11 +02:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00
Thiago Marcos P. Santos
7cdc39bee9 [Qt] Fix race when locking a FileSource
We were returning the FileSource, it could have expired
already. We _need_ to check if the lock() on the weak
pointer worked before returning.
2019-03-08 20:56:45 +02:00
Sudarsana Babu Nagineni
5e2b6bf636 [core] Add MapOptions to define properties of Map
To simplify the Map constructor, introduce MapOptions
interface to define the properties that can be set on
a Map.
2019-03-08 18:20:55 +02:00
Thiago Marcos P. Santos
7b7ad9d39b [qt] Also use the base API URL as key for sharing the cache.
Otherwise we will have a URL pointing to different servers and
potentially different data.
2019-03-04 19:33:45 +02:00
Bruno de Oliveira Abinader
586b22c0df [core] Remove map coordinate setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
ba7427b4ac [core] Transform{State}: s/angle/bearing/ 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
73ac3c784f [core] Remove map bearing setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
21a39306da [core] Remove map pitch setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
f5f10ec119 [core] Remove map zoom setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
491fce6879 [core] Added Map::pitchBy() 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
02f2b9c75c [core] Added Map::scaleBy() 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
362231e2d0 [qt] Cleanup QMapboxGL::coordinateZoomForBounds() 2019-03-04 14:45:32 +02:00
Thiago Marcos P. Santos
edc6a5dd8b [qt] Share the same file source only if using the same access token
If access tokens are different, we cannot share the file source,
because it will override the previously set access token.
2019-02-27 13:31:21 +02:00
xylosper
0c66ce9a95 [qt] fix missing alpha channel for QColor
`QColor::name()` produces `#rrggbb` format where alpha is missing.
Use `rgba(...)` string instead when convert `QColor` to mapbox style.

Note: `QColor::name(QColor::HexArgb)` produces `#aarrggbb` format string,
but mapbox does not support this format apparently.
2019-02-20 16:16:34 +02:00
xylosper
26af7265c3 [qt] add global projection functions
There are 3 methods in QMapboxGL which can be static method.

QMapboxGL::metersPerPixelAtLatitude
QMapboxGL::projectedMetersForCoordinate
QMapboxGL::coordinateForProjectedMeters

Add these functions into QMapbox namespace as global functions.
The methods in QMapboxGL are kept for backward compatibility.
2019-02-12 11:08:26 +02:00
Thiago Marcos P. Santos
2a535a8f5e [qt] Use QVector instead of QList
For our use case `QVector` is more efficient and will
do less memory allocations.

Fixes: #13830
2019-01-30 16:22:13 +02:00
Bruno de Oliveira Abinader
963dd5e567 [Qt] Support local font family in QMapboxGLSettings 2019-01-04 17:27:41 -04:00
Thiago Marcos P. Santos
cd92a231b3 [qt] Deprecate Qt4 and old versions of Qt5
Not enough adoption to keep the platform alive.
2018-11-13 22:55:26 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Bruno de Oliveira Abinader
98c36fc06e [core] CameraOptions receives and outputs angle and pitch as degrees, not radians 2018-10-19 12:05:16 +02:00
Bruno de Oliveira Abinader
6c4cb063c2 [Qt] UpdateParameters should always be available when rendering 2018-10-01 23:51:33 +03:00
Konstantin Käfer
112bbc7ab2 [core] make style/conversion.hpp implementation private 2018-08-19 13:09:16 +02:00
John Firebaugh
b2f60a4bf2 [core] Eliminate setProperty & co. 2018-08-13 12:39:44 -07:00
Bruno de Oliveira Abinader
66f5be3864 [Qt] Check if property value is a valid JSON string 2018-08-06 18:08:02 +03:00
Bruno de Oliveira Abinader
58d8b771a1 [Qt] QMapboxGL::set{Paint,Layout}Property should return bool 2018-08-01 13:36:11 +03:00
Asheem Mamoowala
7c585244ab Use Filter::serialize() in QMapboxGL::getFilter() 2018-07-23 09:12:26 -07:00
Asheem Mamoowala
1067dd7ea2 [qt] Add QMapboxGL::getFilter() 2018-06-27 12:15:55 +03:00
Bruno de Oliveira Abinader
ae61b9d35f [Qt] Add QMapboxGL::layerIds() 2018-06-12 16:32:47 +03:00
Konstantin Käfer
d66251234d [core] don't use floating point versions of pow/log
GLIBC 2.27 added new versioned symbols of powf and logf, while the double versions of pow and log remained stable.
Prefer the double version to avoid introducing a dependency on a newer version of GLIBC than strictly necessary.
See https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00000.html
2018-06-04 10:43:21 +02:00
Thiago Marcos P. Santos
0767bf0686 [qt] Only share a FileSource if it points to the same path
Previously all QMapboxGL objects were sharing the same cache created
by the first instantiated object. Now it will share the cache only
if it points to the same path.

Fixes #11766
2018-04-26 11:07:48 -07:00
Fabian Guerra
e08b6fe87f Merge branch 'release-boba' into master
# Conflicts:
#	circle.yml
#	include/mbgl/style/expression/let.hpp
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapKeyListener.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
#	platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/geometry/LatLngBoundsTest.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
#	platform/android/gradle/dependencies.gradle
#	platform/android/src/example_custom_layer.cpp
#	platform/android/src/geojson/point.cpp
#	platform/darwin/src/NSPredicate+MGLAdditions.mm
#	platform/darwin/test/MGLExpressionTests.mm
#	platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/ios/app/MBXViewController.m
#	src/mbgl/renderer/layers/render_custom_layer.cpp
#	src/mbgl/style/conversion/filter.cpp
#	src/mbgl/style/expression/interpolate.cpp
#	src/mbgl/style/expression/value.cpp
#	test/style/filter.test.cpp
2018-04-23 10:44:02 -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
Bruno de Oliveira Abinader
803a4d46ed [Qt] Added QMapboxGL::MapLoadingFailure enum 2018-03-05 14:41:58 -05:00
Bruno de Oliveira Abinader
fc140e265b [Qt] Expose mapLoadingFailed signal 2018-03-05 14:41:58 -05:00
Bruno de Oliveira Abinader
380f5dc88b [qt] Rename Qt SDK to 'Mapbox Maps SDK for Qt' 2018-02-27 16:28:55 +02:00
Thiago Marcos P. Santos
d229cbb031 [qt] Add an interface for Static rendering 2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
36a0c98713 [qt] Refresh the docs 2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
6542e6ee37 [qt] Make sure that methods are being called on the right thread 2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
673730ccd4 [qt] Implement FBO handling
Needed for rendering 3D extrusions properly.
2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
4f8a23cd8f [qt] Expose an interface to create a renderer on a separated thread
If not called, it will render on the main thread as usual.
2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
a062f3e17b [qt] Update map rendering via RendererObserver 2018-02-09 20:28:54 +02:00
Thiago Marcos P. Santos
e7e8cb4547 [qt] Render asynchronously 2018-02-09 20:28:54 +02:00