Saturday, Jul 27th

Last update12:45:09 PM GMT

  • Create an account
    *
    *
    *
    *
    *
    Fields marked with an asterisk (*) are required.
Mesaj
  • You are now subscribed to the topic Gmap View to show Gmap
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

Board Info

Board Stats:
 
Total Topics:
4654
Total Polls:
0
Total Posts:
1109
Dormant:
User Info:
 
Total Users:
17
Newest User:
Sukran
Members Online:
0
Guests Online:
1473

Online: 
There are no members online

Forum Legend:

 Topic
 Yeni
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked

Bizi Takip Ediyor musunuz ?

Biz neredeyiz ?

  • Gökkuşağı Mahallesi 1104. Sok. 19/24 Balgat - Çankaya - Ankara

  • Tel: (+90) 505 8894038

www.muhder.com