title: How to pass json encoded php array to google maps latlng to redraw polygon
body: <p>I have been working on redrawing polygons onto a google map but am stuck now.</p>
  
  <p>I have a php array gathering latitude and longitude info from a mysql database.
  which is then json encoded to be used in javascript.
  The json gives me what i need, but my question is how do i process the json further
  to be used in the new google.maps.LatLng(); constructor when it needs 2 parameters??</p>
  
  <p>Here is what have so far.
  The json looks like this printed out:</p>
  
  <p>["-29.446736427714118\r\n-28.562776229541612\r\n151.33620268749996\r\n150.85280424999996\r\n"]</p>
  
  <p>It gives me my numbers in an array as i need it but how do i pass it as 2 parameters
  into the following code??</p>
  
  <p>Thanks to anyone in advanced!!</p>
  
  <pre><code>var coords = [  
  
  var polygons = [];
  
  
      var pol = new google.maps.LatLng(Latit,Longit);
  
  ];
  </code></pre>
  
  <p>//Construct the polygon
    polygons.push(new google.maps.Polygon({
     path: coords</p>
  
  <p>}));
    polygons[polygons.length-1].setMap(map); //Your map ob</p>