2gis / mapsapi

Карты 2ГИС — это точные данные обо всех объектах города, включая новостройки, с детализацией до заборов и внутриквартальных проездов.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why does the test require 13 instead of 15? PATH: src\DGCustomization\test

operasfantom opened this issue · comments

describe('#panBy', function () {
it('should set zoom to 13 after panBy to place without project', function () {
map.setView([55.005582426668404, 82.93081283569337], 15, {animate: false}); //15?
map.panBy([1e15, 0]);
expect(map.getZoom()).to.be(13); //13?
});
});

Because map.baseLayer contains tiles up to 13 zoom by default, and up to 18 zoom in 2GIS regions. If a user move outside of the region, map will zoom out automatically. The mechanic will disable, if another tile layer add to the map.