I ma using GMap Google map library in my CodeIgniter application like the follow but when I browse the page it shows the ReferenceError: onLoadmap is not defined
I don't know what is the problem please help me to fix this problem.
Controller:
$this->load->library("GMap");
$this->gmap->GoogleMapAPI();
// valid types are hybrid, satellite, terrain, map
$this->gmap->setMapType('hybrid');
$this->gmap->addDirections("Some Street, Some Town, Some City, Some Country", "57 Cardigan Lane, Leeds, UK", 'map_directions', $display_markers=true);
$this->gmap->disableSidebar();
$data['headerjs'] = $this->gmap->getHeaderJS();
$data['headermap'] = $this->gmap->getMapJS();
$data['onload'] = $this->gmap->printOnLoad();
$data['sidebar'] = $this->gmap->printSidebar();
$data['map'] = $this->gmap->printMap();
$this->load->view('welcome_message',$data);
View:
<html lang="en">
<head>
<meta charset="utf-8">
<title>Map Test</title>
<?php echo $headerjs; ?>
<?php echo $headermap; ?>
</head>
<body>
<?php echo $onload; ?>
<?php echo $map; ?>
<?php echo $sidebar; ?>
<div id="map_directions"></div>