ymaps.ready(init);
function init() {
ymaps.geocode('г.Оренбург', { results: 1 }).then(function (res) {
var firstGeoObject = res.geoObjects.get(0),
myMap = new ymaps.Map("map", {center: firstGeoObject.geometry.getCoordinates(), zoom: 12});
myMap.controls.add("mapTools");
myMap.controls.add("zoomControl");
myMap.controls.add("typeSelector");
myMap.controls.add('searchControl');
myMap.container.fitToViewport();
attachReverseGeocode(myMap);
var myGeocoder = ymaps.geocode("светлый15", {results: 1, boundedBy: myMap.getBounds()});
myGeocoder.then(function (res) {
myMap.geoObjects.add(res.geoObjects);
var coords = res.geoObjects.get(0).geometry.getCoordinates();
MyPl = new ymaps.Placemark(coords, {}, {
preset: 'islands#yellowGlyphCircleIcon',
iconGlyph: 'glass',
});
myMap.geoObjects
.add(MyPl)
}, function (err) {});
var myGeocoder = ymaps.geocode("автоматики8а", {results: 1, boundedBy: myMap.getBounds()});
myGeocoder.then(function (res) {myMap.geoObjects.add(res.geoObjects);}, function (err) {});
});