Welcome Guest, Not a member yet? Register   Sign In
help me codeigniter google maps v3 api library
#2

[eluser]hungdp[/eluser]
See in : http://biostall.com/demos/google-maps-v3...r-library/
has example code

Controller File:
Code:
//import library google maps
$this->load->library('googlemaps');

//here is position u want display
$config['center'] = '37.4419, -122.1419';

$config['zoom'] = 'auto';
$this->googlemaps->initialize($config);

$marker = array();
$marker['position'] = '37.429, -122.1419';
$this->googlemaps->add_marker($marker);

$data['map'] = $this->googlemaps->create_map();

$this->load->view('view_file', $data);

View File:
Code:
<html>
<head><?php echo $map['js']; ?></head>
<body><?php echo $map['html']; ?></body>
</html>


Messages In This Thread
help me codeigniter google maps v3 api library - by El Forum - 03-21-2013, 09:56 PM
help me codeigniter google maps v3 api library - by El Forum - 03-22-2013, 02:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB