0

Как изменить коэффициент масштабирования при перемещение карты в yandex maps api. Есть следующий код:

destinations = {
            'Germany': [51.150443,10.453979],
            'Russia': [64.397509,100.102416],
            'Belarus': [53.902692,27.573522]
        },
        menuContainer = $('#mapMenu');
        for (var item in destinations) {
            (function (title, geoPoint) {
                $("<li><a href=\"javascrtipt:void(0)\">" + item + "</a></li>")
                    .find('a')
                    .bind('click', function () {
                        menuContainer.find('a').css('text-decoration', 'underline');
                        $(this).css('text-decoration', 'none');
                            myMap.panTo(geoPoint, { });
                        return false;
                    })
                    .end()
                    .appendTo(menuContainer);
            })(item, destinations[item])
        }

1 ответ 1

1

Думаю, вам нужно вот это:

http://api.yandex.ru/maps/doc/jsapi/2.x/ref/reference/Map.xml#setZoom

Добавить после строки

myMap.panTo(geoPoint, { });

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.