Google Maps ライン について
var coordinatesArray = []; //coordinatesArrayに値をセット function addSolidPolyline(coordinatesArray){ polyline = new google.maps.Polyline({ path: coordinatesArray, strokeColor:"#FF0000", strokeOpacity:0.7, strokeWeight:3, editable:true, draggable:true, }); polyline.setMap(googlemap); }
var coordinatesArray = []; //coordinatesArrayに値をセット function addDashedPolyline(coordinatesArray){ var lineSymbol = { path: 'M 0,-1 0,1', strokeOpacity:opacity, scale: 4 }; var dotline = new google.maps.Polyline({ path: coordinatesArray, strokeOpacity: 0, icons: [{ icon: lineSymbol, offset: '0', repeat: '20px' }], strokeColor:"#FF0000", strokeOpacity:0,//元の線を隠す strokeWeight:3, editable:true, draggable:true, map:googlemap }); }