Question

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

Was it helpful?

Solution

I suggest you look at the Yandex API examples

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top