Added check for map zoom for members lists to enforce a reasonable initial map zoom...
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 13 Sep 2019 15:57:58 +0000 (11:57 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 25 Oct 2019 14:01:34 +0000 (10:01 -0400)
views/front/members/list.html

index cae9af9..8d42cfe 100755 (executable)
 
                             leafletMap.addLayer(markerGroup);
 
-                            // Get outer bounds of all markers in the Feature Group
+                            // Get outer bounds of all markers in the Feature Group - Don't let it zoom in too far
                             leafletMap.fitBounds(markerGroup.getBounds());
+                            if (leafletMap.getZoom() > 15) {
+                                leafletMap.setZoom(15);
+                            }
 
                         {/if} {* mapItems *}