you must re-assign the icons-property of the line, e.g.:
line.set('icons',[{icon:line.icons[0].icon,
offset:line.icons[0].offset,
repeat:'50px'}]);
문제
This is the code to drawing a line on the map in Google maps v3:
var line = new google.maps.Polyline({
path: lineCoordinates,
strokeOpacity: 0,
icons: [{
icon: lineSymbol,
offset: '0',
repeat: '20px'
}],
map: map
});
The repeat
property can help us to draw dashed line. But I want to change this property dynamically. Something like this:
setRepeat('20px');
해결책
you must re-assign the icons-property of the line, e.g.:
line.set('icons',[{icon:line.icons[0].icon,
offset:line.icons[0].offset,
repeat:'50px'}]);