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

Baloon в API 2.x

$
0
0

Ребят, не могу добавиь балуны на карту, помогите 

 

var map = new ymaps.Map("ymaps-map-id_1234567890123456", {
  center: [ 55.76, 37.64 ],
zoom: 7,
type: "yandex#map"
});

map.controls
.add("zoomControl")
.add("mapTools");
map.geoObjects
.add(new ymaps.Polyline([
[ 55.76, 37.64 ],
[ 37.64, 55.76 ]
], {
balloonContent: ""
}, {
strokeColor: "ff0000",
strokeWidth: 5,
strokeOpacity: 0.5
}))

  .add(new ymaps.balloon.open(
    [55.76, 37.64], {
     contentBody: 'Москва'
}, {
    closeButton: false
}));


};
 

.

Viewing all articles
Browse latest Browse all 7380

Trending Articles



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