Welcome Guest, Not a member yet? Register   Sign In
Google Maps-contribution in the Wiki **SOLVED**
#6

[eluser]JOKERz[/eluser]
heres my controller

Code:
function maps(){
        $data['subtitle'] = 'Test map';
        
        $this->load->library('Cigooglemapapi');
        $this->cigooglemapapi->setAPIKey('myAPIkey');        
        $this->cigooglemapapi->width  = '800px';
        $this->cigooglemapapi->height = '300px';
        $this->cigooglemapapi->disableTypeControls();
        $this->cigooglemapapi->disableSidebar();
        $this->cigooglemapapi->disableDirections();
        $this->cigooglemapapi->setControlSize('small');
        $this->cigooglemapapi->setMarkerIcon(base_url().'icon.png',base_url().'/icon_shadow.png',13,30,20,1);
        
        $x='Brisbane';          
        $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().'<style type="text/css">
        v\:* {
        behavior:url(#default#VML);
        }
        </style>';
        $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 </head> tag, and $HEAD_AFR is place after <body>

hope it help Wink


Messages In This Thread
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 07-27-2007, 08:28 AM
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 01-08-2008, 11:13 AM
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 01-08-2008, 11:21 AM
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 03-15-2008, 03:28 AM
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 03-15-2008, 08:57 AM
Google Maps-contribution in the Wiki **SOLVED** - by El Forum - 06-18-2008, 11:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB