[android] - update VectorSource javadoc (#8521)

* [android] - update VectorSource docs on VectorSource creation

* [tests] Test only CameraOptions center, zoom in CameraToLatLngBounds
This commit is contained in:
Tobrun
2017-03-24 17:55:55 +01:00
committed by GitHub
parent 80915992ab
commit 83cef9eb68
2 changed files with 5 additions and 6 deletions

View File

@@ -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());

View File

@@ -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) {