I'm trying to use Biostall's Google Maps v3 API to map out a series of addresses, but when I try to type in an address, the Lon Lat produced is 0, 0 every time. It only works if I specifically put in the longitude and latitude of each address. Even the entries which Biostall used on his example video and documentation don't work. I'm trying to also use the geocodeCaching feature, please help.
$this->load->library('googlemaps');
$config = array();
$config['zoom'] = 'auto';
$config['geocodeCaching'] = TRUE;
$config['region'] = 'US';
$config['sensor'] = FALSE;
$this->googlemaps->initialize($config);
$marker = array();
$marker['position'] = '37.429, -122.1519';
$marker['animation'] = 'DROP';
$this->googlemaps->add_marker($marker);
$marker = array();
$marker['position'] = '1600 Amphitheatre Parkway in Mountain View, Santa Clara County, California United States';
$marker['animation'] = 'DROP';
$this->googlemaps->add_marker($marker);
$data['map'] = $this->googlemaps->create_map();
echo print_r($data['map']['markers']);
The marker output:
Array ( [marker_0] => Array ( [latitude] => 37.429 [longitude] => -122.1519 ) [marker_1] => Array ( [latitude] => 0 [longitude] => 0 ) ) 1
This is the map produced:
BIOSTALL's suggestion outputted this: Lat: 0 Lng: 0 Err: OVER_QUERY_LIMIT data_location: http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway+in+Mountain+View%2C+Santa+Clara+County%2C+California+United+States&sensor=false®ion=US