Welcome Guest, Not a member yet? Register   Sign In
Google Maps on View Files
#1

[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'>
        &lt;?php $this->cigooglemapapi->printMap(); ?&gt;
</div>


Messages In This Thread
Google Maps on View Files - by El Forum - 10-16-2009, 02:18 PM
Google Maps on View Files - by El Forum - 10-16-2009, 07:43 PM
Google Maps on View Files - by El Forum - 10-16-2009, 08:27 PM
Google Maps on View Files - by El Forum - 10-28-2009, 09:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB