Wednesday, Apr 30th

Last update12:32:47 AM GMT

Add Announcement Here

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

Guest
Guest
useravatar
Offline
Posts
User info in posts
Administrator has disabled public posting

Re: Gmap View to show Gmap

Hi

That is a great question. I would like to have gmaps in my Drupal sites to display various data too (pictures for instance).

Can you send us the link to your website?

Let us know how it goes,

Good luck

Guest
Guest
useravatar
Offline
Posts
User info in posts
Administrator has disabled public posting

Re: Gmap View to show Gmap

My site is internal to my work place and not accessible via the internet,, sorry.
So far I have not found a solution that doesn't require coding.

Guest
Guest
useravatar
Offline
Posts
User info in posts
Administrator has disabled public posting

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.

Guest
Guest
useravatar
Offline
Posts
User info in posts
Administrator has disabled public posting

Impressum

  • office of arts GmbH
    Seltersstrasse 1
    12305 Berlin
  • Büro c/o SpeakEazy, Kulmer Straße 20a, 10783 Berlin
  • Telefon :  0175 721 30 35 Thomas Frenz
                    0160 959 55 184 Boris Hampel
                
  •  Handelsregister : HRB 118870 B
  • Ust.ID : DE264910410
  • Geschäftsführer : Thomas Frenz
  • Mailadresse : tf[at]officeofarts.de
You are here