Quantcast
Channel: Клуб API Карт
Viewing all articles
Browse latest Browse all 7380

Как вставить свой адрес в input ymaps-input__control?

$
0
0

В яндекс-картах обновилась разметка и теперь класс «ymaps-input__control» (строка поиска на карте) переименовался в «ymaps-2-1-15-input__control». Как теперь универсально обратиться к этому текстовому полю?


код был такой:

 


$('#auto_location_btn').on('click', function(){

        var $map_input      = $('.ymaps-input__control');

        var $city_input     = $('#city_id');

        var $district_input = $('#district_id');

        var $street_input   = $('#street_id');

        var $house_number   = $('#house_number');

 

        $map_input.val(

            $city_input.find('option:selected').text() + ' ' +

                $district_input.find('option:selected').text() + ' ' +

                $street_input.find('option:selected').text() + ' ' +

                $house_number.val()

        );

    });

 

 

.

Viewing all articles
Browse latest Browse all 7380

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>