i want to add marker directly on Gmaps on location based on address we supply. Or else i want the location based on name, longitude and latitude what we supply. FYI: i am using gmap and locatin modules for druapl 7. Please help on the same. Thank you in adavance

2 Answers 2


To make a marker for a corporate contact page, I think it will be good to put just HTML code provided by Google Map in the template file.

Or else you can create a block and put script in block body and render it using Full HTML.

To generate HTML code create marker on Google map, Click on the Button right to Print and it will give you the code for iframe

enter image description here


The basic method isn't very hard, just not obvious in spots.

  1. Download the Location and Gmap modules. Enable at a minimum, Location, Location CCK and Gmap.
  2. Get a Google maps API key at http://code.google.com/apis/maps/signup.html
  3. Configure GMAP at admin/config/services/gmap and enter the key that you received in the previous step. If you save the configuration at this stage the Gmap configuration page should show the default map so you know if you've entered in the key correctly.
  4. Go to configure content types at admin/structure/types and create a new content type or edit an existing content type adding a new field of type 'Location'. Configure what detail you want to gather for a location.
  5. Add some address detail for an existing or new node.
  6. Add the Location Map block at admin/structure/block to the desired region.
  7. View node with google maps goodness!

I'm not sure why but using the manage display options of the content type don't seem to have any effect. If it's a big issue I would raise an issue in one or the other's issue queue, but that's always been enough for me and it's there if you want to template it. The Gmap is also available as an attachment in views which can map multiple nodes.


  • All that above is true, but having been through this may I say that if the site requires just a single location for a corporate contact page, I believe installing all those modules is an overkill. I chose to use node suggestion template for such a page, and tailored the GMap v3 api javascript swift code by hand. If you're going to display location(s) per node though, things start to look differently and the modules are a must. Commented Apr 6, 2012 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.