[eluser]ShoeLace1291[/eluser]
I downloaded the GoogleMapAPI from the Wiki on CI. I don't get any errors at all, but when I try to display the map, nothing shows up. I use database info as parameters for the setmarkerbyaddress function.
Controller:
Code:
$this->load->library('Cigooglemapapi');
$this->cigooglemapapi->setAPIKey('ABQIAAAANQXe8cHUlwFywQG6jhOuChT0wySnT1BJZAIfKVFDuRIipGn2kBTzWBo6WJdbB9rIsTKXc-PbNVkniQ');
$query = $this->db->query("SELECT * FROM restaurant WHERE url = '".$this->uri->segment(2)."'");
$row = $query->row();
$this->cigooglemapapi->addMarkerByAddress($row->MailingAddress." ".$row->City." ".$row->State." ".$row->Zipcode, $row->restaurantName, $row->restaurantName);
$data = array(
'map' => $this->cigooglemapapi->printMap()
);
$this->load->view('restaurant_view', $data);
View File:
Code:
<div id='content_container'>
<div id='content'>
<?php $this->cigooglemapapi->printMap(); ?>
</div>