• 1. Atletika

    • Královna sportu
    • Nejvšestranější sport. odvětví
    • Pohybový základ sportů
    • Více...
  • 2. Badminton

    • Kolektivní síťová hra
    • Rychlost a dynamika
    • Rekreační sport
    • Více...
  • 3. Běžecké lyžování

    • Nejnáročnější sport
    • Všestranný rozvoj těla
    • Zimní krajina na lyžích
    • Více...
  • 4. Florbal

    • Nejvíce se rozvíjející hra
    • Nejoblíbenější školní sport
    • Týmová hra podobná hokeji
    • Více...
Naše sporty

Friday, 27.December 2024, 12:44

Poslední aktualizace08:22:20 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

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
loga-eu
Nacházíte se zde: General General discussion Gmap View to show Gmap