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.

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
Someone asked about the same last week. We recommended just embedding the google map javascript rather than attempting to hard code the block.

If you search back through the forums you will find the thread with more details.
LaZion replied on at Permalink Reply
yep, I just ended up embedding the Google maps embed code in an iframe thanks.