Answer the question
In order to leave comments, you need to log in
How to draw a straight line from Placemark to Placemark (yandex map)?
Hello! Can someone tell me how to draw a straight line from one point to another in the yandex map
ymaps.ready(init);
function init() {
var myMap = new ymaps.Map("map", {
center: [55.72, 37.44],
zoom: 10
});
var polyline = new ymaps.Polyline([
[55.80, 37.50],
[55.70, 37.40]
], {
balloonContent: "Ломаная линия"
}, {
strokeColor: "#000000",
strokeWidth: 4,
strokeOpacity: 0.5
});
var polyline2 = new ymaps.Polyline([
[55.84, 37.52],
[53.90, 37.41]
], {
balloonContent: 'Другая ломанная линия',
}, {
strokeColor: "#000000",
strokeWidth: 4,
strokeOpacity: 0.5
})
myMap.geoObjects
.add(polyline)
.add(polyline2)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question