title: How to show polyline using OpenLayer
body: <p>Using the following code I get my desired result i.e I get the polyline on my given latitude, longitude</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;OpenLayers Example&lt;/title&gt;
          &lt;script src="http://openlayers.org/api/OpenLayers.js"&gt;&lt;/script&gt;
          &lt;/head&gt;
          &lt;body&gt;
            &lt;div style="width:100%; height:100%" id="map"&gt;&lt;/div&gt;
            &lt;script defer="defer" type="text/javascript"&gt;
              var map = new OpenLayers.Map('map');
              var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                  "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
  
  
  
      var start_point = new OpenLayers.Geometry.Point(0,10);
      var start_point_1= new OpenLayers.Geometry.Point(0,15);
      var start_point_2= new OpenLayers.Geometry.Point(5,20);
      var end_point = new OpenLayers.Geometry.Point(30,0);
      var end_point_1 = new OpenLayers.Geometry.Point(40,0);
  
      var myTrip =[start_point, start_point_1, start_point_2 , end_point, end_point_1];
      var vector = new OpenLayers.Layer.Vector();
      vector.addFeatures([new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(myTrip ))]);
      map.addLayers([vector]);
  
  
              map.addLayers([wms]);
              map.zoomToMaxExtent();
            &lt;/script&gt;
  
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>Output</p>
  
  <p><img src="https://i.stack.imgur.com/p1MOc.jpg" alt="enter image description here"></p>
  
  <p>But when I am using google map it's not working i.e it's just showing me simple map.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;OpenLayers Example&lt;/title&gt;
      &lt;script src="http://openlayers.org/api/OpenLayers.js"&gt;&lt;/script&gt;
      &lt;script src="http://maps.google.com/maps/api/js?v=3.2&amp;sensor=false"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;div style="width:100%; height:100%" id="map"&gt;&lt;/div&gt;
        &lt;script defer="defer" type="text/javascript"&gt;
          var map = new OpenLayers.Map('map');
          var wms = new OpenLayers.Layer.Google(
                  "Google Streets", // the default
                  {numZoomLevels: 20}
              );
  
        var lonlat = new OpenLayers.LonLat(73.589,19.54).transform(
              new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
              new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator
            );
  
          var zoom = 7;
  
  
  
  var start_point = new OpenLayers.Geometry.Point(0,10);
  var start_point_1= new OpenLayers.Geometry.Point(0,15);
  var start_point_2= new OpenLayers.Geometry.Point(5,20);
  var end_point = new OpenLayers.Geometry.Point(30,0);
  var end_point_1 = new OpenLayers.Geometry.Point(40,0);
  
  var myTrip =[start_point, start_point_1, start_point_2 , end_point, end_point_1];
  var vector = new OpenLayers.Layer.Vector();
  vector.addFeatures([new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(myTrip ))]);
  map.addLayers([vector]);
  
  
          map.addLayer(wms);
          map.zoomToMaxExtent();
          map.setCenter(lonlat, zoom);
        &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>output</p>
  
  <p><img src="https://i.stack.imgur.com/cL0di.jpg" alt="enter image description here"></p>
  
  <p>Why is this not working ,How can I make this work. If instead of openlayer I directly use Google Map API I can get the desired result.</p>