summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2017-03-24 17:55:55 +0100
committerGitHub <noreply@github.com>2017-03-24 17:55:55 +0100
commit83cef9eb686991d5ba31f89e3fe11cafcb4fd5bf (patch)
tree65ef816b3ff45d68d3e7ab04aca8fa7bebf70005
parent80915992ab4e970ca005009ca1175bae24cb448b (diff)
downloadqtlocation-mapboxgl-83cef9eb686991d5ba31f89e3fe11cafcb4fd5bf.tar.gz
[android] - update VectorSource javadoc (#8521)
* [android] - update VectorSource docs on VectorSource creation * [tests] Test only CameraOptions center, zoom in CameraToLatLngBounds
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/VectorSource.java4
-rw-r--r--test/map/map.test.cpp7
2 files changed, 5 insertions, 6 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/VectorSource.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/VectorSource.java
index cff5ab6353..7230492d0e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/VectorSource.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/VectorSource.java
@@ -31,10 +31,10 @@ public class VectorSource extends Source {
}
/**
- * Create a vector source from a remote url
+ * Create a vector source from a remote url pointing to a TileJSON resource
*
* @param id the source id
- * @param url the url
+ * @param url the TileJSON resource url
*/
public VectorSource(String id, URL url) {
this(id, url.toExternalForm());
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 8f81a5d8c5..b31b4e6ccb 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -83,12 +83,11 @@ TEST(Map, CameraToLatLngBounds) {
ASSERT_EQ(bounds, map.latLngBoundsForCamera(camera));
+ // Map::cameraForLatLngBounds only sets zoom and center.
CameraOptions virtualCamera = map.cameraForLatLngBounds(bounds, {});
ASSERT_NEAR(*camera.zoom, *virtualCamera.zoom, 1e-7);
- ASSERT_NEAR(*camera.angle, *virtualCamera.angle, 1e-10);
- ASSERT_NEAR(*camera.pitch, *virtualCamera.pitch, 1e-10);
- ASSERT_NEAR(camera.center->latitude, virtualCamera.center->latitude, 1e-10);
- ASSERT_NEAR(camera.center->longitude, virtualCamera.center->longitude, 1e-10);
+ ASSERT_NEAR(camera.center->latitude, virtualCamera.center->latitude, 1e-7);
+ ASSERT_NEAR(camera.center->longitude, virtualCamera.center->longitude, 1e-7);
}
TEST(Map, Offline) {