Answer the question
In order to leave comments, you need to log in
How to draw multiple stroke?
Please help me outline the area of the polygon. The difficulty is that the stroke should consist of 3 parts: a thick red line and a thin white line on both sides of it.
JSFIDDLE
My attempt is here:
ymaps.ready(init);
var myMap,
currCoords = [55.76, 37.64];
const polygonMocks = [
[55.75, 37.50],
[55.80, 37.60],
[55.75, 37.70],
[55.70, 37.70],
[55.70, 37.50]
];
function init(){
myMap = new ymaps.Map("map", {
center: currCoords,
zoom: 18
});
const p = new ymaps.Polygon([polygonMocks], {
hintContent: "Многоугольник"
}, {
fill: false,
strokeColor: ['#fff', '#f00', '#fff'],
strokeWidth: [2, 10, 2],
outline: true
});
myMap.geoObjects.add(p);
};
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