Multiple node locations feed one map?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jstriebel's picture

At this point, I'm essentially working with a restaurant directory. I need to have (1) a map on each page (node) denoting the location of the restaurant, and (2) an overall map that features the locations from each restaurant (so a multi-node map). These locations will need to be read from a postal add

  1. I've been able to create this single map using OpenLayers, GeoField, and Geocoder. But I'd also like this map to have the ability to input a start address and give directions. So far I haven't been able to accomplish that.

  2. I'm currently unable to figure out how to pull addresses from multiple nodes onto one map. I'm not even sure where to begin on that one.

This presentation has helped me get to where I am, but I'm still not quite where I need to be. http://www.slideshare.net/pvhee/mapping-in-drupal-7-using-openlayers

Any help is appreciated.

Comments

I'm using openlayers on D6,

cbandes's picture

I'm using openlayers on D6, but I suspect it is pretty similar. To get a bunch of node locations to display on one map all I did was make a new view with an openlayers data display. I filtered it against a taxonomy that I had built for sorting locations (so, one display filters 'library' and one filters 'museum' etc) and then I assign the map preset to use each of these displays as a layer.

I was pretty happy with how that worked, but I need directions also, and I can't find a way to do that with openlayers, so I'm looking into alternatives :/

D7 documentation

ifrik's picture

Cbandes, you can use Openlayers with Views on D7 in the same way to filter the results and add them as layers an one map.
There are a few changes in D7: mainly the need for another module to input the data, and the re-naming of some terms such as presets but for the rest in still works like it did before.
Check https://drupal.org/node/1481374 - "Getting Started with OpenLayers in Drupal 7" for a step-by-step introduction.

Site builder and Documentation WG member

using views

ifrik's picture

jstriebel, you will probably need to use Views to create a map with several nodes.
You can use the same (contextual) filters, arguments and relationships to create an Openlayers Data Overlay as you would do to create view that lists these nodes. Then you can add them that to a map.
Check the handbook for a detailed step-by-step explanation: https://drupal.org/node/1481374

Site builder and Documentation WG member

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: