Embed Google map block in theme
Permalink
I'm trying to embed the Google maps block into a page type. The page type has an address attribute and I want to get a map using the address data(City, Postal code).
I've done the following:
$bt = BlockType::getByHandle( 'google_map' );
$bt->controller->title = 'Google Maps';
$bt->controller->location = $pageAddress;
$bt->controller->zoom = '16';
$bt->render('view');
But the map doesn't render just the title.
I think it has something to do with the javascript & css not being added to the header.
Any help or advice would be appreciated.
I've done the following:
$bt = BlockType::getByHandle( 'google_map' );
$bt->controller->title = 'Google Maps';
$bt->controller->location = $pageAddress;
$bt->controller->zoom = '16';
$bt->render('view');
But the map doesn't render just the title.
I think it has something to do with the javascript & css not being added to the header.
Any help or advice would be appreciated.
If you search back through the forums you will find the thread with more details.