- Index
- » General
- » General discussion
- » Gmap View to show Gmap
Gmap View to show Gmap
Gmap View to show Gmap
I installed the Location module and the Gmap modules.. They work great.
I looked every where to find info on how to edit the default Node view in order to show the google map under the Node body. I cant figure this one out...
This worked: I used a code snippet to alter the body template. Content Types > Edit > Template tab > Affect body output check box > Body Template:
<?php
if ( ($location['latitude'] != 0) && ($location['longitude'] != 0) && ($teaser != 1) )
{
$homes=array('id' => 'outfittermap',
'zoom' => 8,
'width' => '300px',
'height' => '200px',
'type' => 'Map',
'latitude' => $location['latitude'],
'longitude'=> $location['longitude'],
'markers' =>
array( array('markername' => 'blue',
'latitude' => $location['latitude'],
'longitude' => $location['longitude']
))
);
$outfittermap = theme('gmap', array('#settings' => $homes));
print $outfittermap;
}
?>
BUT, I rather not use code snippets to alter templates.. I want utilize the Gmap view. How do I use Gmap and Views?
Thanks
Re: Gmap View to show Gmap
If you enable the location map block, then for any node that has latitude and longitude ( path: /node/xxx) , a gmap will be displayed. You can adjust the weight of the block or the region for showing the block, to display this in the order desired in relation to the rest of the content.
- Index
- » General
- » General discussion
- » Gmap View to show Gmap
Board Info
- Board Stats:
- Total Topics:
- 2896
- Total Polls:
- 0
- Total Posts:
- 23
- Dormant:
- User Info:
- Total Users:
- 52
- Newest User:
- Name
- Members Online:
- 0
- Guests Online:
- 695
- Online:
- There are no members online
Forum Legend:
- Topic
- Nový
- Locked
- Sticky
- Active
- New/Active
- New/Locked
- New Sticky
- Locked/Active
- Active/Sticky
- Sticky/Locked
- Sticky/Active/Locked