I made a database of coordinates and other hurricane information.
<?php
include '/database_connector.php'; //include database connection information
$new = array();
$result=mysqli_query($con, "select * from Spots15 where `Name` = 'Ana' or 'One'");
while($row=mysqli_fetch_array($result)){
$lat = $row['LAT'];
$long = $row['LONG'];
$latlong = $lat.", ". $long;
array_push($new, $latlong);
}
echo json_encode($new);
?>
This is the correct output. This is the output that the api wants
["31.5, -77.6","31.5, -77.7","31.5, -77.5","31.6, -77.8","31.5, -77.5","31.5, -77.3","31.6, -77.3","31.7, -77.4","31.9, -77.3","32.1, -77.4","32.2, -77.5","32.4, -77.6","32.6, -77.8","32.7, -77.9","32.7, -78.1","32.9, -78.3","32.9, -78.3","33.1, -78.2","33.2, -78.3","33.6, -78.5","33.8, -78.7","34.0, -78.9","34.1, -78.9","34.1, -78.9","34.4, -78.6"]
I would like to pass these to the google map api can plot the coordinated on the map.
var four=new google.maps.LatLng(28.2,-96.0);