Steps for installing the location module:

  1. Extract the location module tar.gz or zip and copy the directory to your sites/all/modules or sites/SITENAME/modules directory, whichever is relevant for your drupal install.
  2. Enable the Location module Administer >> Site building >> Modules (admin/build/modules).
    You will also need one or more of the following modules to get usable location functionalities:
    • Node locations: Allows nodes to have locations. Node locations have views support.
      Note: Node locations and CCK locations cannot be used on the same node type. See the known issues for more information.
    • User locations: Allows users to have locations. User locations have views support.
    • Location CCK: Provides a CCK field type for locations. CCK locations have views support.
      Note: Node locations and CCK locations cannot be used on the same node type. See the known issues for more information.
    • Location taxonomy: Allows taxonomy terms to have locations.
    • Location phone: Adds a phone number field to locations
    • Location fax: Adds a fax number field to locations
    • Location add another: Allows adding locations to nodes without having to edit the node. It adds a collapsed location fieldset to node view pages that can be used to add new locations.
  3. Set user permissions.
  4. Configure location settings.
  5. (optional) If you want to use postal code proximity searching (via the Location Search module or though Views) you will need to import the postal code data into your website's database. These can 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'.

    The files can be imported using a tool such as phpMyAdmin or MySQL Workbench, or from the command line:

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

    Or if you have Drush installed:

    cd sites/SITENAME/modules/location
    drush sql-cli < database/zipcodes.CC.mysql
    

    Notes:

    • 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.
    • If you require support for a country that doesn't have a file in the "databases" directory you will need a database dump of postal code data for that country. A database dump for most countries postal codes can be downloaded from GeoNames. The current full URL for the downloads page is http://download.geonames.org/export/zip/.

Comments

henryhu’s picture

The following is linked to configuration settings:
3. Set user permissions.

rooby’s picture

That is because permissions information is on that page. It is not an error.

If you want you can create a new page with only information on permissions and link to it.

Remember, anyone can edit these pages so if you find a problem you are welcome to just go ahead and fix it.

Trexor’s picture

If you use GB_full.csv.zip and import the full UK post code you will fine the space in the middle of the post code a problem.

To resove this I installed the Masked Input Module and used the format:

$("#edit-distance-postal-code").mask("?****************",{placeholder:""});

in "Masked Input to apply on fields:".