Calculating zoomToSpan () degrees based on min / max lat / lng to display in mapView

I have a cluster of overlay elements in a mapView.
I know where the top / bottom / left / right objects are.
I want to use the zoomToSpan () method to zoom in on this area.

What is the correct way to calculate lat / lng degrees for this method?

+3
source share
3 answers

I found that someone else posted a good solution to this problem here: http://www.anddev.org/zoom_and_span_on_a_cluster_of_points-t464.html

Good luck

+3
source

This question has been asked before, and there is a great answer with code:

Android MapView - , ItemizedOverlay

+2

Would you like to just use something like this:

mapController.zoomToSpan(overlay.getLatSpanE6(), overlay.getLonSpanE6());
0
source

Source: https://habr.com/ru/post/1745564/


All Articles