From d5cae4c6b745137cdabd48f5b3737d14663603a9 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sun, 23 Nov 2014 11:41:25 +0100 Subject: [PATCH] Map now pans when marker is outside viewport --- static/js/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/app.js b/static/js/app.js index a0f64fc..51d1b31 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -130,6 +130,9 @@ var These3Words = (function () { this.label = label; this.marker.setPosition(latLng); this.marker.setTitle(label); + if (!this.map.getBounds().contains(latLng)) { + this.map.panTo(latLng); + } };