[Question] Appropriate zoom level for CameraOptions
Opened this issue · 0 comments
Question: How can I determine the zoom level for a set of coordinates?
For example I have a set of GPS-Coordinates in longitude
and latitude
and want to plot a path like in this example: Linelayer and I can set a zoom
in CameraOptions
.
Now it could be possible that the path could be rather small and with the zoom
level too high the path area would be very small and there would be displayed a lot of unnecessary/irritating information.
On the other hand if I have a rather long path and my zoom
level and visible area would be too small, a lot of information will be lost (cropped out).
So depending on the min/max lon
/lat
I would be successfully be able to calculate a center, what map area should be shown, but I am missing information on calculating the zoom
level to display all information in the correct aspect.
Are there any tricks in order to achieve this?