I override node display for content type Match Fixtures by creating node--match-fixtures.tpl.php file and put code below:

$location = $content['field_stadium'][0]['#locations'];
$stadium_map = array('id' => 'stadium_map',
             'latitude' => $location['latitude'],
             'longitude'=> $location['longitude'],
             'zoom'     => 13,
             'width'    => '100%',
             'height'   => '400px',
             'type'     => 'Satellite',

echo theme('gmap', array('#settings' => $stadium_map)) 

But it show wrong map and also not 100% width. I use gmap and location module. What is the correct way?


If its showing the wrong map, you might be displaying the wrong view mode. Make sure you have set the gmap display for view mode full.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.