I am currently working with Drupal 7 and Location 7.x-3.4 module

I have created a view, choose the Gmap format, and added the post code and distance field in filter section, so that the visitors are able to search for the locations they want.

Gmap Settings:

Data Source = Location.module

Marker handling = Use single marker type

Here is my configuration for the Location: Distance / Proximity :

Expose this filter to visitors, to allow them to change it = 1

Filter type to expose = Distance / Proximity

Operator = Proximity (Circular)

Postal code = Blank

Distance = Blank

Origin = Postal Code (assume default country)

Filter identifier = distance

After saving the changes, the result is not changing. Is anyone knows what's wrong with my configuration above? Please help..

  • What do you mean by "the result is not changing"? Do you mean when a user entersa value into the exposed filter and submits it doesn't work, or something else?
    – rooby
    Nov 27, 2014 at 12:05
  • Also it's worth pointing out that this doesn't relate to the gmap module, it relates to the location module. What version of the location module are you using.
    – rooby
    Nov 27, 2014 at 12:05
  • Hi Rooby, I'm currently using 7.x-3.4 When I hit submit, it doesn't work.
    – Maddie
    Nov 27, 2014 at 12:08
  • Do you get errors or no results when there should be some or results that shouldn't be there?
    – rooby
    Nov 27, 2014 at 12:12
  • There's no errors at the moment. The display of the pointers in the map are as is when I hit submit. There is no change in the results.
    – Maddie
    Nov 27, 2014 at 12:15

1 Answer 1


It's a bit hard to say for sure but my guess is that you have missed a step when installing the location module.

For post code proximity searching the location module uses a database of postcodes and their coordinates to convert the postcode to the lat/lon coordinates that are then used to calculate whether other locations fall in the request distance.

See installation step 6 in the INSTALL.txt file of the location module.

  1. (Optional) Import a postal codes database for the countries served by your website, to support proximity searches and other useful features. Postal code databases may be found in the "databases/" sub-directory of the Location module directory. The files are in the format of zipcodes.CC.mysql, where CC is a two-letter country code such as 'us' or 'de'.

    Note: If your site is using table prefixes, you will need to adjust for this manually, by opening the file in a text editor and replacing 'zipcodes' with 'prefix_zipcodes' throughout.

    To import the files from the command line, enter the following:

    cd sites/SITENAME/modules/location mysql -u username -p database-name < database/zipcodes.us.mysql

Note that this proximity functionality may not work for some countries if the data is not available.

  • Hi Rooby, it works perfectly! Thank you so much for your help :)
    – Maddie
    Nov 27, 2014 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.