javascript - How to dynamically change the 'repeat' property of Polyline in Google maps v3? -


this code drawing line on 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 draw dashed line. want change property dynamically. this: setrepeat('20px');

you must re-assign icons-property of line, e.g.:

  line.set('icons',[{icon:line.icons[0].icon,                      offset:line.icons[0].offset,                      repeat:'50px'}]); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -