I'm trying to use this module, https://github.com/gowsram/zf2-google-maps- , but I'm running into a problem.
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for GMaps\Service\GoogleMap
I have followed the instruction in the github readme, and have cloned the project into my vendors directory.
From what I understand, the line which calls the ServiceLocator,
$map = $this->getServiceLocator()->get('GMaps\Service\GoogleMap');
isn't pointing to the right place. Unfortunately my knowledge of how the service locator works isn't deep enough to figure out how to fix the problem, despite attempts to remedy this by diving into the docs. It's all a little over my head.
Thanks for any input you may be able to provide!
Have you edited your application.config.php
file so that the modules
array contains GMaps
? From the look of the error, the module isn't running since the service is not registered with the ServiceManager.
That step appeared to be skipped over in the installation instructions but you should add it to your application config so it runs the module's Module.php
code.
application.config.php
return array(
'modules' => array(
'Application',
'GMaps',
),
/...
);