How can I pull the "Node Locations" map into a block or panel set? From what I can tell, the only way to access this map is to view the "www.mysite.com/map/node" page. I need to display all of my location nodes on a single map, inside a block or panel pane, on pages other than "www.mysite.com/map/node".

The "Location map" block that comes with the Gmap module is great, but it only displays a single node/marker, and only when you're viewing a location node's page (eg. "www.mysite.com/my-location"). This works great on the individual location node pages, but I'd also like to include this block elsewhere on the site, where it would display all of the location nodes on a single map.

Thanks!

Comments

Anonymous’s picture

Status: Active » Closed (fixed)

I was able to create a View which pulls in all of the location nodes. I created a View of type "location", and selected "Gmap" under "Basic settings - Style". I apologize. I didn't know how to implement this in Views 2 when I posted this support request. Hopefully someone else will stumble across this post and it will help them out.

firemountain’s picture

Thank you this helped me.

you just choose location as the views type and then Gmap as the style

firemountain’s picture

oh and make sure you have java on your comp,

guenoz’s picture

Ok,

here was my problem :

I wanted to display the same map displaying on map/node page but on different blocks in several different pages,
so I tried what everybody is using for that kind of need : Gmap, location and view module, or location ckk module, but
in both cases, I could make the map displaying with all the marker, but when clicking the marker the info box was displaying the label of each field I wanted to display but not the field content itself, all empty !!

I even tried to display the rows as full node or teaser but then I got error messages I couldn't manage to resolve

So finally I went into gmap_location.module file, find the name of that function used on map/node page,
which is gmap_location_node_page

I create a block, using php input format :

<?php
echo '<h2>Map of *******</h2>';
return gmap_location_node_page(NULL);
?>

and that is it, I make the map presents on map/node page displaying in a block,

hope this help for simple need, as we cannot choose the fields to display or not in my solution

Forgive my english, I know it is pretty bad, but if I write in French you won't understand me ;)

hferree’s picture

guenoz -- You're the best! Thanks for the script!

stevensunsunsun’s picture

Thank you!

MorganG’s picture

I need to show multiple node locations maps in multiple blocks. Anyone know if that is possible?

amitnaik’s picture

hey thanks @guenoz its working like a charm! thanks for sharing code.