Geo proximity search

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

Hi all!
I'm building a site around geo module(6.X-1.0-alpha2). Now, i need a proximity search.

Here, http://drupal.org/node/606342#comment-2160156 there is an extremely usefull argument handler for location module in views.
I'm new to Drupal, but i was thinking about porting this handler into geo module. (this would also be a good exercise in learning Views..)

However, before starting, anyone knows if there is a similar/better solution to achieve proximity search using views2 and arguments?

Thanks!

Comments

There is work on the

allie micka's picture

There is work on the distance/proximity filtering as recently as yesterday, available in the HEAD version of Geo. If you're just starting out, I recommend using HEAD, since the pending release will have completely re-vamped support for Views, which will be incompatible with your alpha2 views.

Filtering on proximity is working, but adding sort, argument, and field handlers is slightly more tricky.

Thank you for the response!

endriu's picture

Thank you for the response! And thank you for all the work you are doing on this great module!

Yes, i'm starting out, so i will use HEAD.

However I need a feature like this:

'search all nodes around this (X,Y) position'

and I think this can be accomplished only searching nodes by argument. Am i wrong?

Moreover i need to expose this kind of filter.

I think i will have to study hard..not just a views exercise... :)

Any tips from were to start?? Thank you!

P.S: I hope a day we will work together!

Depends on how you want to define (X, Y)

allie micka's picture

The functionality that now exists allows you to use any supported input (e.g. manually-entered lat/lon points, geocoded address, clicking on a map, etc.) from within a field's filter configuration. You can also expose this, so the same input mechanism is available for users (e.g. manually-entered lat/lon points, geocoded address, clicking on a map, etc.) on the exposed form.

So you can accomplish some of what you're suggesting by using the now-available Filter support from Views.

Now, arguments still have their place, but that functionality does not yet exist. It's a little bit tricky since we'll have to be equally-flexible on the argument-setting (e.g. geocoded zip code, etc.). I would also like to support default arguments, so you could be looking at a node or a user and see sidebar blocks that are populated with nearby items.

The best place to follow up on features / questions specific to the Geo module is in its issue queue

Thanks!

Ok!

endriu's picture

Ok, now i have a way to follow!
Thank you!

I'm going to jump in with a

DanielJohnston's picture

I'm going to jump in with a related question here. I've got proximity search by Google-geocoded text field on an exposed filter in a View, and it's working just dandy. Except that Google isn't assuming UK as the default location, and consequently postcodes don't geocode unless they're accompanied by the country name, and towns occasionally get mixed up with their US equivalents (Boston, anyone?).

Is there any way of setting a default country in the Geo settings? I can't find any Geo settings, but I'm assuming that the text field in the exposed filter is being sent to Google Maps by Geo. There don't seem to be any default country settings in Geocode or OpenLayers either, so I'm a bit lost on where to go next.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

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