I've searched for info on this for a couple of days and haven't found a solid solution as of yet.

I'm building a site for a travel agency. It will have agency created content (vacation packages, cruises, tours etc.) as well as user created content (blogs, tips, trip reviews etc.). I want to use the Location & Gmap modules so the nodes have location information and can be viewed on google maps. I got this to work but now I'm stuck.

What I can't wrap my head around is how will users search through and find the content they're looking for. I want them to be able to search based on location (continent, country, state/ or city) and node type (travel product, tips, reviews, etc.) . All this while making the search as user friendly as possible. I'm not sure which is the best way to accomplish this?

I'm fairly new to Drupal but from my basic understanding it's the location based filtering or categorizing which is the challenging part.

I tried Calais for auto-tagging which is a great concept but location tagging was inconsistent.

Any help would be appreciated.

Comments

frdesign’s picture

Someone recently asked me if I ever figured out how to filter Gmap content. I thought I'd share my response in case anyone can think of a better way of solving his problem.

This is my understanding what Gmap and Location modules (+ several other related modules) do:

Location module (besides many other things) adds
- a new group of attributes to a user profile
- a new data type that can be added to a node via CCK

Gmap module (besides many other things) makes use of Google Maps API

Some of the modules (Node locations?, User locations?) offer
- user locations map www.yourdomain/map/user and
- node location map www.yourdomain/map/node

These maps show ALL users, who entered location in their profile - regardless of roles, and
ALL nodes that have populated location fields - regardless of node type (content type).

I was hoping to find a way how can I use these existing maps with some basic filters, e.g.
how to show only a specific role or
how to show only nodes of certain content type

I was hoping that these maps are driven by specific views that I can modify but, if I am not mistaken, the queries are hard-coded somewhere in the modules.

Thank you,

Here's my response:

At some point when you have a chance I recommend studying drupal's hooks. They're very powerful and easy to use once you understand the basic concepts. I'm not a programmer by trade, I'm a graphic designer, but I taught myself basic PHP and drupal hooks and have been able to do things I never could have done with PHP alone. Pro Drupal Development is a great book to get you started. To someone like yourself who's already a programmer it would probably be a piece of cake.

Now to answer your questions:

I was hoping to find a way how can I use these existing maps with some basic filters, e.g.
how to show only a specific role or how to show only nodes of certain content type

I was hoping that these maps are driven by specific views that I can modify but, if I am not mistaken, the queries are hard-coded somewhere in the modules.

You're in luck. Although the maps that come with Gmap seem to be hardcoded as you say, creating a custom map which would allow you to filter content is pretty straight forward with the Views module.

Basically create a view that lists nodes, create an exposed filter for node type, choose Gmap for style and you're good to go. Save the view as a page by creating a the path and menu link, or save as a block and place into your page. On a side note View's preview for Gmap is currently broken, you'll get a message that says "Javascript required" or something like that. Ignore it, once you go to the real map it will work.

I've never created a Gmap for users but the same approach specified above should work.