title: polyline with label in javascript
body: <p>This is my code which is used to add a polyline ,but i want to add a label on click on polyline.When i click on the polyline,it shows a label .</p>
  
  <pre><code>      &lt;script&gt;
          var x=new google.maps.LatLng(52.395715,4.888916);
          var stavanger=new google.maps.LatLng(58.983991,5.734863);
        var amsterdam=new google.maps.LatLng(52.395715,4.888916);
             var london=new google.maps.LatLng(51.508742,-0.120850);
  
            function initialize()
              {
               var mapProp = {
                  center:x,
                  zoom:4,
                mapTypeId:google.maps.MapTypeId.ROADMAP
                };
  
                    var map=new                            google.maps.Map(document.getElementById("googleMap"),mapProp);
  
                 var myTrip=[stavanger,amsterdam,london];
                       var flightPath=new google.maps.Polyline({
                      path:myTrip,
                    strokeColor:"#0000FF",
                     strokeOpacity:0.8,
                    strokeWeight:2
                   });
  
                          flightPath.setMap(map);
                    }
  
                    google.maps.event.addDomListener(window, 'load', initialize);
                    &lt;/script&gt;
                     &lt;/head&gt;
  
                       &lt;body&gt;
                       &lt;div id="googleMap" style="width:500px;height:380px;"&gt;&lt;/div&gt;
                       &lt;/body&gt;
                    &lt;/html&gt; 
  </code></pre>
  
  <p>help me with how to add labels.</p>