[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:
@@ -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());
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user