I think I might have mentioned this before, possibly at the CivicSpace forums, but I wanted to file a formal enhancement request here :)

It is my understanding that the location API currently only allows one address per node. This is a request to allow N number of addresses to be associated to a given node.

This would have a lot of practical applications for the modules that currently use it. For example, let's say you were creating an event and you were a national or regional organization. You might be holding this event in multiple places and you'd want to have the ability for your users to search for the location closest to them.

Comments

boris mann’s picture

-1 specifically based on your scenario...create an event per location, then each location can have its own invitations, comments, RSVPs, etc. etc. The node is the smallest unit of content in Drupal, and a 1:1 relationship between nodes and locations makes sense.

robertdouglass’s picture

+1, but not for the scenario described. I feel that locations should be elevated to node status themselves, and that the binding between location and another node, as we know it today, should happen as a relationship between peers. My reasoning for this is simple; an even has a location, and the location exists after the event has gone away. There is no reason to dispose of the event. In fact, the whole idea of a venue isn't possible unless one can define a location for location's sake.

Now Boris, you might argue at this point that the solution is to define a venue node, say with flexinode, make it location aware, and voila, you've got a venue.... and you're right. But how do you then associate the location of that venue with an event?

Furthermore, I think that the location module itself would be simpler if it didn't need to do *everything* in the nodeapi function, and rather focused on making location nodes.

I'm working on a module that treats locations this way. If it becomes production-worthy it'll come back here. Anyone interested in the code that exists at this point can contact me.

robertdouglass’s picture

Leave it to me to mangle the main sentence in my argument:

My reasoning for this is simple; an event has a location, and the location exists after the event has gone away. There is no reason to dispose of the location.

rbrooks00’s picture

That's a good solution as well Robert, and probably the right way to go if you wanted to implement this feature.

I have a few applications in mind for my sites but I wanted to try and create a more general example people could relate to. If I blew the scenario I apologize, but I do think it is a good feature to add.

dww’s picture

i agree that separating the concept of location into its own node makes a lot of sense. i'm currently setting up a 4.6 drupal site to manage the on-line calendar for a brazilian percussion ensemble i direct. this functionality would be very handy, since nearly all the events i schedule happen at one of maybe 5 or 6 venues. it'd be nice when creating events to just select a location from a dropdown menu, instead of re-typing all the info over and over again. if i need a different location, i just create a new node, and viola. plus, as someone mentioned, the venue exists after the event expires, so there's no sense destroying the info about the venue.

spudart’s picture

Version: 6.x-3.x-dev » 4.6.x-1.x-dev

Speaking of multiple locations per node. It would be really nice if you could specify two locations for things like a parade. Where there is one starting point and then there is a stopping point. Much like how Google Maps displays directions.

dww’s picture

+1 for start/end locations. great use case for N locations per node.

Ian Ward’s picture

Hi Robert, and everyone,
Has the multiple locations per node idea gone anywhere in the last couple months? We're thinking of making some functionality like this, and we think the location as node approach might work well. Do you all think a location as a node should be a flexinode, so that you can have other fields besides title/description as part of the data in the node? Here's an example - Imagine there are 56 meteorites that hit earth on one night – you have a content node called "The Night The Sky Fell" and then you have 56 location nodes for the 56 places the meteorites struck, but each location you want to have a date/time associated w/ them because the 56 meteorites struck over a course of 6 hours. Then, do you want location nodes w/ more than a title - w/ the ability to add fields like dates, images, additional text fields, etc., a la flexinode/cck?

Then, what is wrong w/ the idea of just using location module as it is right now, on flexinode/cck location-enabled nodes, and making the relation to show multiple locations per node w/ a relation module, such as clipper? I guess the ability to search by location, and pull up the associated content nodes, not the location nodes?

What do you all think?

Ian

bdragon’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of http://drupal.org/node/217512.

Although location currently has support for multiple locations at the moment, they aren't reusable. After I split the location table, it will be possible to reuse locations.