Hi,

I need to do rough proximity search using zipcodes via Views Exposed Filters.

I imported zipcodes.nl.mysql to the database, creating a "zipcodes" table.

Then I created a view. (Using this how-to: http://drupal.org/node/359463)

Normally my content's latitute and longtitude fields are empty when I first create them. I don't use 3rd party gecodoing (Google maps or etc.)

Then the proximity search doesn't work. I wonder what is the problem and in general I need to understand how does this work. My guesses:

1. The coordinates are geocoded when the node is created using "zipcodes" database. Then proximity search works as normal. I assume this is done by location.xx.inc file. When the node is created, this file is run.

or

2. The coordinates are always empty. But when I do a proximity search, Views query somehow looks at the "zipcodes" table and gets the coordinates related to a zipcode.

Which one is it acutally? I also tried a patch for inc file for Netherlands:
http://drupal.org/files/issues/location-proximity-nl.patch

Comments

Sinan Erdem’s picture

I am not very sure but in the end I understood how it works:

First you create a node with location information. You can either enter the coordinates manually, have it geocoded (by Google for example) or take it from a feed or something. But you definitely have to have coordinates.

Then when you create a view with proximity search, I think query goes and looks at the entered zipcode from the "zipcodes" table and get its coordinate. Then it compares with the existing nodes. Then prints the results accordingly.

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing old D6 issues as D6 is end of life