Can Location accept one line addresses

Events happening in the community are now at Drupal community events on www.drupal.org.
bedlam's picture

I don't think it can, but I've overlooked the bleeding obvious before :)

I've got a project that uses feedapi to create event nodes from a Google calendar. This part works fine, but I'd like to display a map on each event node. I expected this to be relatively straightforward with GMap/Location/cck, but I don't see any way to use a one line address to do it.

In the Google calendar interface, the address field is a one-line input element. It's a simple task to do by hand in a module, node template or template.php, but I'd rather not write it myself when 98.375% of the features needed already exist in modules. It also occurs to me that or use cases involving external data, it's probably relatively common to get address info on one line...

In any case, am I missing an obvious feature in Location somewhere?

I'm also willing to look at patching the relevant module, but since I have no particular experience with the location/gmap modules, suggestions about the implementation (and about where to look!) would be welcome.

Comments

I'd think you would need feed

drew reece's picture

I'd think you would need feed mapper to be able to split the address, or get the data in another form…

This looks like it is a possible patch?
http://drupal.org/node/495690

Thanks, I'll have a look at

bedlam's picture

Thanks, I'll have a look at those patches (though on a quick review, I can't make out from the thread whether or not the basic function I need is actually part of them...)

I don't see any reason to split the address--the Google maps API at least has no difficulty whatsoever with a urlencoded address string on one line. Besides that, parsing an address intelligently is

  1. a job already performed quite well by the maps API, and
  2. an fairly tricky problem to solve, given that the maps API is quite tolerant of whether or not addresses contain commas (i.e. there may be no obvious place to split the address), and even of whether or not the address is complete in the first place...

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

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