From 4d8ab250fc6ac54baf619c2700d1659ee9a799ea Mon Sep 17 00:00:00 2001 From: Kevin Avrillon Date: Mon, 6 Feb 2017 15:26:37 +0100 Subject: [PATCH] fix(yandex): change zoom level when one marker --- src/providers/yandex/Yandex.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/providers/yandex/Yandex.js b/src/providers/yandex/Yandex.js index 4aeb58d..ae28e91 100644 --- a/src/providers/yandex/Yandex.js +++ b/src/providers/yandex/Yandex.js @@ -54,6 +54,11 @@ class Yandex extends Map { // Center the map this.map.setBounds(bounds); + + // If one marker: readjust zoom because bounds are too small to show tiles + if (this.points && this.points.length === 1) { + this.setZoom(16); + } } load(callback, loadingMask) {