Node Location module, or Location CCK

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

Hi All,

I want to attach Location (http://drupal.org/project/location) to a CCK node type and face 2 choices:

  • Use the Node Location module that comes with the Location version 6.x-3.1-rc1, OR
  • Use the Location CCK module

Did anyone encounter similar problems like this before and what was your experience ?
Also, did anyone use Location in multi-language sites ? It seems to me that the fields like City, Zipcode, State/Province doesn't support i18n very well.

Thanks for any helps in advanced.

cheers
-halhx

Comments

I'm new into this and I

izmeez's picture

I'm new into this and I really don't know. It probably depends on the case. However, what I've read seems to be favouring Location CCK. This leaning seems to fit well with the whole approach of cck fields for a variety of functions, such as date, node reference, user reference, and more seem to be developed by the day.

It leaves me wondering if there's any need to turning on node location or user locations although they might be handy for general use. Here some other comments http://drupal.org/node/375259

While using cck and creating fields I wondered if the word "group" was changed to "fieldset" so that it is not confused with OG and it possibly also more descriptive of its function. I just realized I should mark that issue as a feature request, so I'll do that. http://drupal.org/node/493786

Izzy

node location vs. cck location

gowriabhaya's picture

This is my experience so far:

Node location (which bundled with Location module) works well with Views module whereas cck Location is not.

-Gowri A.
Panaromic Web Design

-Gowri A.
Panaromic Web Design

Views issue with CCK Location?

beanjammin's picture

Can you explain a little more about the issue you had with CCK Location and views? What was it that you weren't able to do?

Zip Code Field

WinUser2003's picture

I am just looking for an area so users can enter there zip code and google maps ends up showing the area. So lets say I visit my site http://bapr.isgreat.org and I see "Enter Zip Code" field. I enter my zip code then a map appears of the area. Thats all I am looking for... I thought the Location Module does this?

Yes, the location module with Gmap does this

izmeez's picture

Yes, you can just add a postal code into a location field and it will link to a Google Map. You may find the postal code is not as specific as the street address but you can get away without the street address.

You are still left with the options of doing this by adding the location using the location module for nodes or users or as a cck field.

Location Results on Embeded Google Maps

z3cka's picture

I've had some success with placing nodes on a map here: http://baseballcoasttocoast.com/instructor_map and getting a list of nodes base on proximity here: http://baseballcoasttocoast.com/zip-code-finder

The next step will be putting the list of results on a map. The tricky part is building a dynamic gmap macro with the correct center location and correct zoom level for the results.

Is that what you are looking for? I will post my findings.

Cheers,

-Casey

What mods do you need for that z3cka?

WinUser2003's picture

I was just wondering what mods you need for that. Thats exactly what I am looking for actually.

A good place to start

z3cka's picture

The 2 main Modules are: http://drupal.org/project/location and http://drupal.org/project/gmap

Then you will need to set up your desired content types with CCK to use locations and then use views to display the results in a desired way.

Hope that helps. Let us know how it goes.

-Casey

Got the mods...

WinUser2003's picture

I got the mods and everything both of them and they are setup and working. Can you login to my site and show me an example? The site is http://bapr.isgreat.org

username is admin and password is homer123

I believe I have this setup correctly but let me know to make sure. Thank you so much for your help on this project.

Location Configuration

z3cka's picture

Your configuration looks good except you missed the geocoding option here: http://bapr.isgreat.org/admin/settings/location/geocoding Be sure to check the radio button for Google Maps in for the United States section.

Next you need to create a new content type here: http://bapr.isgreat.org/admin/content/types/add and be sure to fill out the "Locative information" section. Just play with those values until you understand how the location process works. Basically you are attaching location information to nodes.

Note: you will need CCK if you want to implement the location as a field. This is not required, but can be seen a a more flexible way to implement locations.

Another-Note: (IMHO) don't use user locations... instead attach locations to nodes and then attach nodes to users using "Content Profile" ... I just think this is more flexible when working with views later, if you need to locate users ofcourse.

Good luck and let me know when you need more help... you will when it comes to filtering your results with views. do you have experience with CCK and Views?

-Casey


My blog - http://twistedpairwd.com/blog

Location Configuration

WinUser2009's picture

z3cka

I have tried to play to my hearts content with this to get it to work and its not giving me any slack. I have looked in forums, irc channels, etc.. and no one can help me or give me the right direction on this. I wish there was a step by step guide on how to even get the nodes to attach to the locations. I do apologize and the site has been moved as well. The new site is...

http://bapr.isgreat.org/zip

the login information is the same, and I think I got all of it set correctly. Please when you get time help me out the best you can. I will even meet you online through a chat session or whatever to get educated now how you did it yourself on your own site. Thank you again and hope to hear from you soon.

Kind Regards,
Jeff

Experience with CCK and Views

WinUser2003's picture

I am pretty new to the whole system, however I am catching on. I am used to using PHP Fusion, Nuke, and a little more engines. Durpal is a new monster for me that I am trying to figure out. Help in many aspects is appreciated. I will go in and play with it more. The final steps to complete the site however is going to be an area where members can upload photos and try to get the newsletter working. For some reason its not sending out updates to users. The site is just a test site, its not the final. This is a site where I am just teaching myself the in's and out's of drupal, so anyone can login and show me a couple things. I learn better by examples more than anything. Thank you again for your help and I will do my best, hopefully I can get it to work correctly.

Can you expand your problem a

MichielVanKets's picture

Can you expand your problem a bit? because i just wanted to tell you that drupal 6 dev version only has bundled with an implementation of this API, for importing comma.
Michiel Van Kets

CCK Location not fully operational yet?

eelkeboezeman's picture

Being a fan of CCK and Views I of course went for the CCK location solution. However, the map that is supposed to display all nodes that have location information set did not show my nodes. Basically, according to this thread:
http://drupal.org/node/375259
CCK Location is not really up to standard yet and doesn't work with the map yet.

However, when I used the node_location.module everything worked just fine. What really helped is the following screencast:
http://www.drupaltherapy.com/gmap

Oh yeah, and I used the 6.x-3.1 rc1 version which can be found here:
http://drupal.org/node/390112

I couldn't find the Node location module in 6.x-3.0

Check this really nice wiki/tutorial as well:
http://groups.drupal.org/node/19614

There are other options

rickvug's picture

I want to note that there are other feasible options for mapping in Drupal that are more modern (built on CCK/Views) and flexible than Location + Gmap. Robert Douglass tweeted the following recipe:

http://drupal.org/project/addresses
http://drupal.org/project/geo
http://drupal.org/project/geocode
http://drupal.org/project/openlayers

For more information the best place to go is likely http://geojune.org. Hope this helps someone.

My result

halhx's picture

Hi All,

Thank you all for your advice. I ended up using the node location (which bundled with Location module). Here is the implementation in action: www.juump.com

Each user on the site can have multiple preferred "home courts" and node location seems to work very well with Views.

cheers
-- halhx

Your site looks great halhx!

Donovan's picture

Your site looks great halhx! Can you explain what modules you used to implement the search by location? I am playing with location module and a custom content type with locative data; but search is only finding nodes with location data in the body of the node, and not the address data entered in the locative fields. Also, can you describe how you set up the search results display?

Thanks!

Donovan, Here is how it's

halhx's picture

Donovan,

Here is how it's done for my case:

Left hand side views = views of the node of interest, e.g. Place, People
Right hand side views (the map) = view of node of interest, i.e. Place

The search form is not Drupal search, but custom form. I capture the info from the custom form, and submit it to hook_views_query_alter, to trigger the 2 views to update correctly. All action on the map (zoom, pan) also trigger js, which in turn call the same functions to trigger the hook_views_query_alter.

Hope this helps.

feedback about juump

not.used.913's picture

Hi halhx:

The site looks great. But i should say that I got confused because I didn't immediately find the field for entering my location. I saw the instructions in the center of the screen: "simply enter your location. ..." and I was expecting the field to be somewhere right there, not on the top-right.

cursor pointer

eelkeboezeman's picture

hi halhx,

one very, very minor thing: the go button next to search doesn't change the cursor when you hover over :)

Re: juump feedback

halhx's picture

Thank you both for the feedback on the site.

@eelkeboezeman
I noted your observation and will fix that

@crispy
Yes, there is a need to change the frontpage of the site for some times now. It's been focusing on signing up users, hence the on-your-face registration form. Work is being done to make a better front page.

cheers
--halhx

Your site looks great halhx!

Donovan's picture

Your site looks great halhx!

Halarikeyur's picture

Hi,
I am trying to create a site which is location based. I think for that I am using views with location module to create views to display contents based on content owner location. I have location field enabled under user profiles and that works fine but when I try to add fields i.e. content title, location city and user name. under my view It doesn't pick user location for some reason. My guess the location city it is trying to pull is from content and not from user. But I don't see a specific field for user location.
Any idea how to get this thing working???

Thanks in advance...
Regards,

@Halarikeyur Views can only

halhx's picture

@Halarikeyur

Views can only see and expose the controls for you up to a certain level. Thus, you want to experiment with starting views based on uid (of the user), and based on nid (of the user's profile node) to see which one expose the controls you want.

If nothing works, there is always the possibility of using custom php field, and pull out the appropriate content. You can do this relatively easily by inspecting the $user and $node objects. One of my favorite technique is to enable devel module, use functions such as dvr, kpm - see http://www.thingy-ma-jig.co.uk/blog/02-10-2007/hugely-useful-hugely-undo... for more info

Vancouver

Group organizers

Group notifications

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