Pergunta

I have no knowledge of jquery and I would like to change a Yandex map position. The javascript function is as it follows:

    function fid_0000(ymaps) 
    {
         var map = new ymaps.Map("ymaps-map-id_0000", {center: [11.111111,22.222222], zoom: 17, type: "yandex#map"});
    };

and HTML is:

<div id="ymaps-map-id_0000" style="width: 450px; height: 450px;"></div>

How do I change its coordinates, possibly with a select tag, without reloading the page?

TIA

Foi útil?

Solução

I suggest you look at the Yandex API examples

Particularly, look at the code example of Changing the Map Center would be most useful.

Outras dicas

You can use map.setCenter([lat, lng]);

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top