Php 在ZF2中启动GMAP的问题
我正在尝试使用此模块,但遇到了一个问题Php 在ZF2中启动GMAP的问题,php,google-maps,zend-framework2,Php,Google Maps,Zend Framework2,我正在尝试使用此模块,但遇到了一个问题 Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for GMaps\Service\GoogleMap 我已经按照github自述中的说明进行了操作,并且下载了zip文件,并将其解压缩到我的供应商目录中 据我所知,调用服务定位器的行 $map = $this->getServiceLocator()->get('GMaps\Se
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for GMaps\Service\GoogleMap
我已经按照github自述中的说明进行了操作,并且下载了zip文件,并将其解压缩到我的供应商目录中
据我所知,调用服务定位器的行
$map = $this->getServiceLocator()->get('GMaps\Service\GoogleMap');
没有指向正确的地方。不幸的是,我对服务定位器工作原理的了解还不足以解决问题,尽管我试图通过深入文档来解决这个问题。这对我来说有点过头了
你有其他可以使用的工具吗?
当我点击地图上的一个点时,我需要得到纬度和经度。
但它不会发射
如果我将以下内容放在config/application.config.php文件中:
<?php
return array(
// This should be an array of module namespaces used in the application.
'modules' => array(
'Auth',
'Application',
'User',
'GMaps',
),
在克隆到供应商中之后,您必须首先加载模块,以便在应用程序中配对和使用
在项目的config/application.config.php
文件中,添加GMaps
模块,如下所示:
<?php
return array(
'modules' => array(
'Application',
'GMaps',
),
// ...
);
<?php
return array(
'modules' => array(
'Application',
'GMaps',
),
// ...
);