-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add bearing and tilt to getCameraForLatLngBounds #12290
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
A couple of comments, most of them pointing to the docs.
|
||
|
||
/** | ||
* Get a camera position that fits a provided bounds, padding and tilt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also mention a bearing.
|
||
|
||
/** | ||
* Get a camera position that fits a provided bounds, padding and tilt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should mention bearing instead of padding.
/** | ||
* Get a camera position that fits a provided bounds and padding. | ||
* Get a camera position that fits a provided bounds and the current camera tilt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also mention that it includes the current bearing.
|
||
|
||
/** | ||
* Get a camera position that fits a provided bounds and padding and the current camera tilt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also mention that it includes the current bearing.
} | ||
|
||
/** | ||
* Get a camera position that fits a provided shape with a given bearing and padding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't mention padding nor bearing.
* | ||
* @param geometry the geometry to constrain the map with | ||
* @param padding the padding to apply to the bounds | ||
* @return the camera position that fits the bounds and padding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The camera position will fit the geometry inside.
} | ||
|
||
/** | ||
* Get a camera position that fits a provided shape with a given bearing and padding. | ||
* | ||
* @param geometry the geometry to constrain the map with | ||
* @param bearing the bearing at which to compute the geometry's bounds | ||
* @param tilt the tilt at which to compute the geometry's bounds | ||
* @return the camera position that fits the bounds and padding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No padding, but bearing and tilt.
* @param padding the padding to apply to the bounds | ||
* @param bearing the bearing at which to compute the geometry's bounds | ||
* @param tilt the tilt at which to compute the geometry's bounds | ||
* @return the camera position that fits the bounds and padding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also bearing and tilt.
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<!-- TODO remove zoom #6747--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check that to-do?
@@ -76,6 +75,8 @@ | |||
|
|||
private String style; | |||
|
|||
private float pixelRatio; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are adding an option to set the pixel ratio, I think this value should also be pushed to the UiSettings
during map initialisation.
… tilt and bearing transformation in old api
Closes #12238
Todo: