We're willing to pay to have this developed or utilize existing modules to get this to reliably work. Most likely (nearly certainly) this will need to be multiple modules. Please respond with your qualifications, estimated price, your timeline, and any questions you have. Any suggestions are welcome.

We need a specified nodetype that has a latitude/longitude defined. The latitude/longitude can either be calculated through an entered address or can be defined in a system such as the one at this link.. Users should be able to search for a specified node based on distance for a postal code they enter. For example, a user may search for a node within 25 miles of 90210. When the results are displayed (Views module?), the distance from that postal code should be displayed in both miles and kilometers for each result. Additionally, a map of the area should be displayed (Google Maps, Yahoo Maps or some other service) that pinpoints the latitude/longitude of the nodes contained in the results.

Locations will be in both Canada and the United States.

Comments

andrewlevine’s picture

Why don't you use location and the location_views module? It may not do everything you require but will probably get you 90% of the way there.

An example:
http://www.dosomething.org/volunteer/list?filter0=10011&op0=5

prattboy’s picture

Coupled with the GMAP module this seems very, very close. I cannot figure out how to integrate a Google map that is dynamically loaded with the search results on a view page, however. Any thoughts?

Also, anyone know anywhere to get a database dump of Canadian postal codes for use with location?

prattboy’s picture

Any more feedback on this one? Essentially we need to be able to display a google map in the location search results that pinpoints the nodes currently displaying on the results. Any takers? Once again, we're willing to pay for this.

Lionfish’s picture

Hello, I'm very interested in helping with this. A colleague here did something very similar before, and has worked with these modules. I'm busy this afternoon but I'll have an outline of a solution tomorrow, hopefully :) I think this is probably pretty straightforward.

Regarding postcodes, I think Canada is much like the UK: Their location info is copyrighted... a way around that is to let the person find their address on the map directly. There are also 'free-the-postcode' projects. Also (brief research) it appears Canada's postcodes are more structured than those in the UK, so it might be possible to give a rough marker given a postcode (which might be enough depending on the application).

It looks to be 150 USD for the DB, I don't know if they're available elsewhere cheaper (this was after a second's google): http://www.zipcodeworld.com/postalcodepremium.htm

prattboy’s picture

Great! Please keep me updated; I'll be looking forward to your response.

Interesting that hte use of the postal codes for Canada are restricted. Anyone else out there had experience with that?

Lionfish’s picture

Hello, I spent a few hours (too many!) playing with the gmap stuff, and also adding an argument to a view (in a new 'nearby' module I've cobbled together) to allow places to be filtered based on distance from a lat/long passed in an argument (oddly not supported by the locations module, although distance filtering IS supported as a normal filter).
The lat/long will be passed by the 'search' form (or figured from form values). The results page can then have the map and text results (as you can see in the mock-up).

You want the map to be displayed with the search results like this (http://lionfish.uwcs.co.uk/files/Screenshot_map1.png), yeah?

Finally I've not looked into the problem of postcodes any more. What is suitable really depends on the application (eg is it just to illustrate where the users are? or is it to find the nearest phone box?)

Could you email if you're interested in me continuing this (it will probably take another half-day to a day to finish it off neatly).

Thanks,

Mike

Email: lionfish _at_ uwcs.co.uk

jaydez-1’s picture

I need something similar to this and am also willing to pay. We need to create a search page that will find instructors, events, centers in a geographical area world wide. The results would look like the http://www.dosomething.org list view results coupled with the google mapplet in an iframe zoomed to their geographic area like this http://www.sikhiwiki.org/index.php?title=Gurdwara_Map#. Need a method for bulk updating the map views. I am tied up with other projects so would appreciate any help.

JD

jd _izat_ echelonnet.net

LaughterMaster’s picture

We're looking for similar functionality for a new site for Laughter Yoga International so visitors can find their nearest laughter yoga clubs, events & professional worldwide.

We are also ready to pay and would like to share any new solution with the Drupal community. More details at http://drupal.org/node/150325 or email lyspamfilter@gmail.com

Lots of Laughs!

christopher22’s picture

20 pounds / man hr. for software development.
(Duration 4-6 weeks .. including testing & deployment)

Payment can be divided into 2 - 3 installments.

Bobuido’s picture

Did Christopher22, or anyone else, actually develop distance search feature?

I'd be prepared to throw something into the kitty if this still needs developing

I thought I already heard of distance searching with location but haven't been able to find anything substantial on it today

Like I said, if it doesn't exist, I'm more than happy to help sponsor development

@Christopher22 - So that's 8X5X6X20=£4800?

Sounds a bit pricey but then again I don't know what's involved without looking at it in detail

***UPDATE***

Seems there is the functionality already in location_views (part of the location module)

I haven't got it working so the above applies still somewhat

$$$ for dev and or support / config

This would be a really nice feature for the directory site I'm building!

Bobuido’s picture

Can someone tell me what's going on with distance searching please?

Can it be done with location module? Or is it just currently Work In Progress?

I've been directed to a module not listed on Drupal.org
http://crystaldawn.net

Seems to work OK - I'm waiting on some feedback from the developer(s)

I'm seriously up for helping to fund this effort

Anybody else willing to chip in?

I'm sure lots and lots of people would love to see this functionality

ultimike’s picture

Location proximity searching is part of the location module.

/search/location

(assuming you have it enabled for the desired user roles on admin/user/access)

-mike

Bobuido’s picture

Thanks Mike

Does this distance search feature work for you?

If so, what version are you using?

I'm using 5.x-1.x-dev - Should I re-download this? i.e. are there many 5.x-1.x-dev releases

It says they're working on 3! :) I'm :S

On my install the search does not allow me to pick a country
However
Hiding the country selections and defaulting to UK it gives:
No search results; could not determine the location of the submitted postal code.

Any help with location in general would be appreciated

Thanks

Current (Main) Project: www.pellet-burner-specialists.co.uk

ultimike’s picture

Yes, it works for me - I'm using version 5.x-1.0-alpha1 of the GMap module and version 5.x-1.x-dev (2007-Oct-31) of the location module. - although the site I'm using it on is only concerned with U.S. addresses.

Be sure to read the /location/INSTALL.txt file - for proximity searching to work for UK addresses, you'll need to find a postal code table somewhere for the UK.

-mike

Bobuido’s picture

OK...

The co-ordinates are being obtained from postcodes / addresses when I add nodes with locations - I believe via the Google service?

Does the distance search not use the same lookup? I can't see why you need a post code DB

If you have a way of getting all the co-ordinates already, surely all that's left is a bit of maths

From install.txt
"To support proximity searches and most useful features, you will need a
postal codes database for each country for which you plan to use a file from
the "supported/" directory. The database structure can be loaded from the
database/zipcodes.mysql file, and the data can be loaded from
database/zipcodes.CC.mysql"

It sounds like I can only use a downloaded database of post code data...

Which I presume is not going to be free

So yes thanks again Mike but I'm still baffled

:)

Current (Main) Project: www.pellet-burner-specialists.co.uk

ultimike’s picture

You need a DB of postal codes and their associated lat/long so that when a user goes to search/location and enter their postal code the location proximity search knows where to start.

For example, let's say I have 10 locations (nodes) in my DB and I want to find out which one is closest to me. I enter in my postal code and the proximity search calculates all the distances between my postal code lat/long (which it gets from the DB) and the lat/long of the nodes in the DB, then it tells me which is closest.

I know that the United States and German postal code data is freely available - that's why they're included with the module. I'd be surprised if you couldn't get similar data for the UK. If you do, and put it in the right format, it would make a great addition to the module!

-mike

Bobuido’s picture

Mike

I already get lat/long lookup when I add a location without having a UK postal code DB!

Why can't this same lookup be used by the distance search form!?

I fail to see why this cannot be done - Perhaps the developers are working on a way to do this?

I might speak to this developer here again
http://crystaldawn.net

He has converted a script to a Drupal module, which he says will be released soon

Maybe he can shed some light?

Current (Main) Project: www.pellet-burner-specialists.co.uk

ultimike’s picture

I understand what you're saying:

1. The user goes to the proximity search page

2. The user enters in their address/postal code

3. The user's address/postal codes gets geocoded

4. The resulting lat/long is used in the proximity search as the starting value

5. The starting value is compared against the lat/longs of the nodes in the DB.

Correct?

It's a valid point, but unfortunately that's not how the location proximity search currently works. I'm not sure there's anything like what you're talking about currently in development. As I see it, there are three downsides to this approach versus the current approach:

1. The user is required to enter their full address to get an accurate lat/long

2. Search will be slower since call has to go out to 3rd party server for geocoding

3. Busy sites will be sending lots of geocoding requests to 3rd party server - some geocoders set limits on how many requests/day are allowed.

I could understand this approach if you require the user to register and submit their location on the edit user location page. Then, their address gets geocoded only once and saved in the DB. Then, as they do proximity searches, no additional calls to the geocoder are required. It would seem to me that this would only work for certain applications.

-mike

Bobuido’s picture

Yep you've got it Mike :)

I too have reservations about using the 3rd party geocoding

Things is:

A - The site should never be that busy and if it is... well... I'll cross that bridge when I come to it. If I'm getting huge volumes of traffic then the site will naturally increase it's revenue and maybe I could purchase a UK Post Code DB...though very, very unlikely as the price is extortionate.
B - It is a very important feature for various reasons - Almost key to the business models

There is a open project
www.freethepostcode.org

Caching / storing the resultant long / lat sounds like a good idea. It would have to be done on account and session though really. Any reduction on the 3rd party service would be welcome.

There is a project which uses geocoding instead of a PC-DB here's the link again
http://crystaldawn.net

Anyway. Thanks for your help Mike. If you know anyone that wants to do some paid development on Location or integrating the work from the above link then please let me know.

Current (Main) Project: www.pellet-burner-specialists.co.uk

ultimike’s picture

I'm at Drupalcon Boston right now and a refactoring of the Drupal mapping universe is going on as we speak. You can see where it's heading here:

http://groups.drupal.org/node/6089

-mike

cialog’s picture

@Lionfish

just wanted to know if you're still working on this. You're screenshot looks
exactly like what i'm looking for.

Can you share some knowledge even if it's unfinished ?
Would be great to hear from you.

Thanks
Stefan

mandclu’s picture

Subscribing to this thread.

In my case, I want to do proximity searches between users (who have their location data complete) and nodes with a location. I can't see why all of this data couldn't be geolocated in advance, so it wouldn't need a postal code database. Would it be difficult to implement this kind of search?