F
F
Froks2017-04-24 19:40:11
css
Froks, 2017-04-24 19:40:11

How to move google maps?

How can you save the position of the map in this state?
By default, the place with the label is placed in the center, but I need a little to the right
207b38bea9284359be68e7e1e6d453df.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexandrBirukov, 2017-04-24
@AlexandrBirukov

ymaps.ready(init);
function init() {
    var myMap = new ymaps.Map("map", {
            center: [56.14822654594537, 40.35968193879493],
            zoom: 15,
            controls: []
        }, {
            searchControlProvider: 'yandex#search'
        }),
        // Создаем геообъект с типом геометрии "Точка".
        myGeoObject = new ymaps.GeoObject({
            // Описание геометрии.
            geometry: {
                type: "Point",
                coordinates: [56.147865709609, 40.35978386273748]
            }
        });

    myMap.geoObjects
        .add(myGeoObject)
        .add(new ymaps.Placemark([56.147865709609, 40.35978386273748], {
            balloonContent: '<strong>Ключ 585</strong><br> 600014, г. Владимир, ул. Лакина, д.4'
        }, {
            preset: 'islands#icon',
            iconColor: '#C70C01'
        }));

    myMap.behaviors.disable('scrollZoom');
}

Where it says center you insert the center of the map, where coordinates are the coordinates of your point

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question