From c17f08bf5b02804bf178d9dcd7f1b18e3d2f1714 Mon Sep 17 00:00:00 2001 From: Markus Ankenbrand Date: Sat, 5 Nov 2016 21:01:05 +0100 Subject: [PATCH] Wait half a second before adjusting zoom --- single.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/single.php b/single.php index 5900446..8ad3515 100644 --- a/single.php +++ b/single.php @@ -116,9 +116,11 @@ bounds.extend(marker.getPosition()); } map.fitBounds(bounds); - if(map.getZoom() > 15){ - map.setZoom(15); - } + window.setTimeout(function(){ + if(map.getZoom() > 15){ + map.setZoom(15); + } + }, 500) }