A PHP Error was encountered

Severity: Warning

Message: file_get_contents(http://maps.google.com/maps/api/geocode/json?address=Adelaide%2C+Australia&sensor=false): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden

Filename: libraries/Googlemaps.php

Line Number: 2157

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/Googlemaps.php

Line Number: 2161

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/Googlemaps.php

Line Number: 2177

Demonstrations | Drawing Manager | Google Maps V3 API CodeIgniter Library
Demos:
Simple Marker | Multiple Markers | Polyline | Polygon | Circle | Rectangle | Ground Overlay | Directions | Clustering Markers
Geolocation | Drawing Manager | Styling The Map | Traffic Overlay | Bicycling Overlay | Panoramio Layer | Street View
KML Layer | Places API Integration | Places Input Autocomplete
Get Co-ordinates At Clicked Position | Add Marker At Clicked Position | Get Co-ordinates Of Dragged Marker
Pass Co-ordinates Back To The Database | Multiple Maps On The Same Page
The Code

Controller File:

$this->load->library('googlemaps');

$config['center'] = 'Adelaide, Australia';
$config['zoom'] = '13';
$config['drawing'] = true;
$config['drawingDefaultMode'] = 'circle';
$config['drawingModes'] = array('circle','rectangle','polygon');
$this->googlemaps->initialize($config);
$data['map'] = $this->googlemaps->create_map();

$this->load->view('view_file', $data);

View File:

<html>
<head><?php echo $map['js']; ?></head>
<body><?php echo $map['html']; ?></body>
</html>

Return to Library Homepage