Closed freiyer closed 10 years ago
I need a little bit more info to help you. AFAIR, the error should give your the exact line number & filename where the error occured. Can you copy/paste it?
Here it is :
ClassNotFoundException: Attempted to load class "MapTypeIdHelper" from namespace "Ivory\GoogleMap\Helper" in C:\wamp\www...\app\cache\dev\appDevDebugProjectContainer.php line 2484. Do you need to "use" it from another namespace?
in C:\wamp\www...\app\cache\dev\appDevDebugProjectContainer.php line 2484 at ErrorHandler->handleFatalError(object(ExceptionHandler), array('type' => '1', 'message' => 'Class 'Ivory\GoogleMap\Helper\MapTypeIdHelper' not found', 'file' => 'C:\wamp\www...\app\cache\dev\appDevDebugProjectContainer.php', 'line' => '2484')) in C:\wamp\www...\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php line 212 at ClassNotFoundFatalErrorHandler->handleError(array('type' => '1', 'message' => 'Class 'Ivory\GoogleMap\Helper\MapTypeIdHelper' not found', 'file' => 'C:\wamp\www...\app\cache\dev\appDevDebugProjectContainer.php', 'line' => '2484'), object(FatalErrorException)) in C:\wamp\www...\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php line 238
Added this in my appkernel.php as it says in doc : new Ivory\GoogleMapBundle\IvoryGoogleMapBundle(),
Thanks for your answer btw :-)
IMO, your issue is related on the fact you have installed the bundle without the library. How do you install it? from composer? Basically, this bundle simply integrates the library egeloen/ivory-google-map into Symfony2 and I just check the Ivory\GoogleMap\Helper\MapTypeIdHelper
class exists.
I did not install it with composer. I just downloaded it, put it in my bundle folder and give the path to appkernel.php. So I just need to install the egeloen/ivory-google-map library too ?
Yep and autoload it obviously. That's all!
@freiyer Does it fix your issue?
I think Google map and Geocoder libraries works well now. No errors anymore but I've some difficulties now to use the bundle service.
Did a simple controller :
class GeolocalisationController extends Controller {
public function gmapAction() {
$map = $this->get('ivory_google_map.map');
return $this->render('Bundle:Geolocalisation:geoloc.html.twig', array(
"map" => $map,
));
}
}
and the Twig render
{{ google_map_container(map) }} {{ google_map_js(map) }}
But no map pops out yet.
All right problem solve my map rendered well.
I'm working on a Symfony base CMS that makes things a bit thougher than expected.
But thank you very much for your help.
Hi, I'm trying to use the bundle but I'm getting this message :
ClassNotFoundException: Attempted to load class "MapTypeIdHelper" from namespace "Ivory\GoogleMap\Helper"
Any ideas ??