From: Chuck Scott Date: Fri, 13 Sep 2019 15:57:58 +0000 (-0400) Subject: Added check for map zoom for members lists to enforce a reasonable initial map zoom... X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3e70ef4bcb38d0a8a924475e03f2052950164d23;p=WP-Plugins%2Fglm-member-db.git Added check for map zoom for members lists to enforce a reasonable initial map zoom (max zoom 15) --- diff --git a/views/front/members/list.html b/views/front/members/list.html index cae9af9e..8d42cfe0 100755 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -586,8 +586,11 @@ 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 *}