본문 바로가기

Sanpomichi Project

Naver Map API Polyline

반응형

연결 선 삽입 기능 

 path = [];
  	for (var i=0, ii=markerList.length; i<ii; i++) {
  	   var position = new naver.maps.LatLng(markerList[i].position);
  	   path.push(position);
  	}
	
	polyline = new naver.maps.Polyline({
	    map: map,
	    path:path,
	    clickable: true,
	    strokeColor: '#5347AA',
	    strokeStyle: 'longdash',
	    strokeOpacity: 0.5,
	    strokeWeight: 5
	});
반응형