Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
CameraUpdateFactory.newLatLngBounds(LatLngBounds bounds,
int width, int height, int padding);
What is the difference between bounds and the width/height ints?
Official doc says that
Returns a CameraUpdate that transforms the camera such that the specified latitude/longitude bounds are centered on screen within a bounding box of specified dimensions at the greatest possible zoom level.
But to me is not clear. Could you semplify it for me ?
Thanks
The LatLngBounds
object represents a bounding box on the Earth's surface. The width
and height
parameters represent a bounding box on the phone's screen. This method takes the LatLngBounds
and zooms the camera such that the entire bounds fits within a rectangle of width width
and height height
and centers the map on that rectangle.
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.