[SOLVED] How to display Google map nodes locations in a Views block?

| | 1 min read

Drupal Gmap module is a very useful module for embedding the functionality of Google Maps in your website. Currently the only way to access this map is to go to the "yoursitee.com/map/node and find all the relevant info on a single map. There is no direct way to access i location nodes on a single map, inside a block or panel pane, or on pages other than yoursitee.com/map/node. However there is a workaround for this. Read on to find out more.

The fix is simple. Follow the steps below

  • Create a block
  • Enable PHP input format
  • Copy and paste the following code there.
    <?php
             echo "<h2>Title</h2>";
             return gmap_location_node_page(NULL);
          ?>

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. Do you need professional help in building your Drupal site? We can provide a wide range of Drupal services to help you deploy your Drupal site easily and quickly. Get in touch with us to know more.

Reference: