Autozoom mode #25
vb64
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By default, this mode is disabled. You can enable autozoom mode when displaying objects on the map both in regular views and in the Django admin panel.
The autozoom mode works differently depending on the number of objects that you want to display on the map.
If the list of displayed objects is empty, the autozoom mode is disabled.
If the list contains one object, then the map center is set to the coordinates of this object, and the map scale is set to the value of the autozoom parameter (10 for the examples above).
If the list contains more than one object, the program determines the minimum rectangle that contains all the displayed objects. The center of the map is set to the coordinates of the center of this rectangle. The scale of the map is set in such a way as to contain the given rectangle with some indents along the edges.
This discussion was created from the release Autozoom mode.
Beta Was this translation helpful? Give feedback.
All reactions