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

Как правильно добавить описание к баллонам на карте?

$
0
0

Добрый вечер. 

Подскажите создал баллоны и хочу к ним добавить описание (placemark), но вот как это сделать для не одного, а многих баллонов?

 



var myMap;
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
});

var objects = ymaps.geoQuery([{
type: 'Point',
coordinates: [44.7272, 37.7620]
}, {
type: 'Point',
coordinates: [44.6765, 37.7797]
}, {
type: 'Point',
coordinates: []
}, {
type: 'Point',
coordinates: [44.6852, 37.7822]
}, {
type: 'Point',
coordinates: [44.6766, 37.7858]
}, {
type: 'Point',
coordinates: [44.7235, 37.7629]
}, {
type: 'Point',
coordinates: [44.7342, 37.7859]
}, {
type: 'Point',
coordinates: [44.7484, 37.7585]
}, {
type: 'Point',
coordinates: [44.6884, 37.7690]
}, {
type: 'Point',
coordinates: [44.7241, 37.7742]
}]);
myMap.geoObjects.add(objects.clusterize());
myMap.controls.add('zoomControl', {
left: 5,
top: 5
}).add('typeSelector').add('mapTools', {
left: 35,
top: 5
});
}, function (err) {
alert(err.message);
});
}

 

.

Viewing all articles
Browse latest Browse all 7380

Trending Articles



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