Google Maps-contribution in the Wiki **SOLVED**

Hello to all,

I'm quite new to Code Igniter, a so called newbie Smile

My problem right now is in the Google Maps-implementation from a tutorial in the Wiki.

I'm starting to understand bits 'n pieces of the MVC-approach, but the Google Maps-example made me a bit uncertain.

My problem:

I've included both the API class and the Cigooglemapsapi.php-file in the Lib-folder.

And also put the HTML-part (the code in the bottom of in the Controllers-folder.

Right here is the problem.

Because, isnt that HTML-part supposed to be in the View-folder?

Than use a controller like:


class Googlemap extends Controller {

    function Googlemap()
    function index()

Apparently, im doing something terrible wrong, because I don't get even a error-message. Only a blank page with no html or nothing.

Right now I'm clueless like Alicia Silverstone.

Thanks for any help.

How did you fix this? Im just getting a blank page too.

Got it... for anyone else having the problem I just put the following in controller instead of view:


I have followed all the links and managed to get GoogleMaps up and running here

If anyone is interested then here is the source code

Special Notes:

The source file is only the application folder so you will need to integrate CI's system folder.

The installation source files are on a subdomain of



I wrote the CI port of the library a long time ago. The example showed the syntax, it wasn't meant to be the way to code an application, just showcase syntax and usage.

There should be a new version out of the original library over at the Smarty forums. You can probably just replace the old class with the new one as long as you don't touch the extended Cigooglemapsapi class.

heres my controller

function maps(){
        $data['subtitle'] = 'Test map';
        $this->cigooglemapapi->width  = '800px';
        $this->cigooglemapapi->height = '300px';
        $this->cigooglemapapi->addMarkerByAddress($x, $x, "myHTML content");
        $x='Milton Brisbane';          
        $this->cigooglemapapi->addMarkerByAddress($x, $x, array('title'=>'text values','title2'=>'text values2','title3'=>'text values3','title4'=>'text values4'));

        $data['HEAD_BFR'] = $this->cigooglemapapi->getHeaderJS().' '.$this->cigooglemapapi->getMapJS().'&lt;style type="text/css"&gt;
        v\:* {
        $data['HEAD_AFR'] = $this->cigooglemapapi->getOnLoad();
        $data['gMap'] = $this->cigooglemapapi->getMap();
        //i dont use sidebar
        //$data['sideBar'] = $this->cigooglemapapi->getSidebar();
        $this->load->view('maps', $data);

$HEAD_BFR is place before &lt;/head&gt; tag, and $HEAD_AFR is place after &lt;body&gt;

hope it help Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.