【发布时间】:2016-12-24 21:39:41
【问题描述】:
我的控制器文件:
$this->load->library('googlemaps');
$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);
我的视图文件:
<html>
<head><?php echo $map['js']; ?></head>
<body><?php echo $map['html']; ?></body>
</html>
我的文件夹库项目中有 CodeIgniter-Google-Maps-V3-API-Library。
我的源文件:https://github.com/BIOSTALL/CodeIgniter-Google-Maps-V3-API-Library
我问谷歌,但她建议我在https://developers.google.com/maps/documentation/javascript/get-api-key 中创建 API_KEY
现在,我有 api 密钥,但如何安装呢?
【问题讨论】:
标签: php codeigniter google-maps google-maps-api-3