title: Convert String to latlng google maps
body: <p>I want to convert a String with a pattern like "(53.324523, 43.252352)" into a latlng. I already found the right function:</p>
  
  <pre><code>var input = latlngArray[i];
  var latlngStr = input.split(",",2);
  var lat = parseFloat(latlngStr[0]);
  var lng = parseFloat(latlngStr[1]);
  latlngArray[i] = new google.maps.LatLng(lat, lng);
  </code></pre>
  
  <p>The problem is that I can't get a proper lat. When I use alert to display it it only says NaN, while the lng variable displays the right value.</p>
  
  <p>Got it. Thx for the help.</p>
  
  <pre><code>var input = latlngArray[i].substring(1, latlngArray[i].length-1);
  var latlngStr = input.split(",",2);
  var lat = parseFloat(latlngStr[0]);
  var lng = parseFloat(latlngStr[1]);
  latlngArray[i] = new google.maps.LatLng(lat, lng);
  </code></pre>