htmldrupaldrupal-6

How can I add a Google Map with Drupal?


I have a page that works fine pulling users and locations from a Drupal database ..

http://www.wpcreations.net/gmaptest/map.html

This is a working version. I know Drupal has a module that does the job and I am using parts of it. But for some reason if I use the map include it fails. But I can make an HTML page that does the same thing and works. Is there a way to put all the code from my HTML page in the site? Or, how can I force the map/markers to appear? I tried to use an iframe and that did not work.

Sorry, I'm new to Drupal. I'm using version 6.19 and can't go higher. Thanks for your time.


Solution

  • You need a combination of 3 modules that will help you solve your task:

    1. Location - enable: Location + User Locations
    2. Views - enable: Views + Views UI
    3. GMap Module - enable: GMap
    4. Keys - Optional

    After you install the modules you have to configure them:

    Now to demonstrate the concept:

    Go to the page view and if everything work you should see your users on a map.

    You can get creative and, just like a page view, build different blocks and place them in different places on your site. Advantages is that you can place them pretty much anywhere you want.