You are here

INSTALL.txt in Location 5

Step 1
------
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 (where CC is the two-letter country code).

As of this post, only U.S. and German postal codes are supported. A single
zipcodes table holds all the zipcodes. To create the zipcodes table using
the database/zipcodes.mysql file from within the location tarball, feed
these dumps to your database. If your site is using a prefix for database
table names, make sure to adjust accordingly. Careful, the postal code dump
for the US is a few MB.

  mysql -u username -ppassword -h localhost database-name < modules/location/database/zipcodes.mysql

To make use of the U.S. postalcodes:

  mysql -u username -ppassword -h localhost database-name < modules/location/database/zipcodes.us.mysql

To make use of the German postal codes:

  mysql -u username -ppassword -h localhoost database-name < modules/location/database/zipcodes.de.mysql

where "username", "password" are the username/loging and "database-name" are
the parameters to login to your Drupal site's database. You can leave out
"-h localhost" if your MySQL server runs on the same site as your Apache.
However, replace 'localhost' in "-h localhost" if your MySQL server is on a
different machine.

Step 2
------
In the "modules/" directory, create a subdirectory called "location/" which
itself contains a subdirectory called "supported/".

Download "location.inc" to "modules/location/"

Download "location.module" to "modules/location/"

Download "earth.inc" to "modules/location/"

Download "supported/location.us.inc" to "modules/location/supported/" (for
support of US locations)

Step 3
------
Enable the location module on your site.

Visit the settings page for location.module and enable features for U.S.
(the only option as of now).

Finally, go to the default workflow settings for each node type and enable
(or require) location collection on a field-by-field basis. It is encouraged
that you enable postal codes and country fields for node types for which you
want to enable proximity searches.


File

INSTALL.txt
View source
  1. Step 1
  2. ------
  3. To support proximity searches and most useful features, you will need a
  4. postal codes database for each country for which you plan to use a file from
  5. the "supported/" directory. The database structure can be loaded from the
  6. database/zipcodes.mysql file, and the data can be loaded from
  7. database/zipcodes.CC.mysql (where CC is the two-letter country code).
  8. As of this post, only U.S. and German postal codes are supported. A single
  9. zipcodes table holds all the zipcodes. To create the zipcodes table using
  10. the database/zipcodes.mysql file from within the location tarball, feed
  11. these dumps to your database. If your site is using a prefix for database
  12. table names, make sure to adjust accordingly. Careful, the postal code dump
  13. for the US is a few MB.
  14. mysql -u username -ppassword -h localhost database-name < modules/location/database/zipcodes.mysql
  15. To make use of the U.S. postalcodes:
  16. mysql -u username -ppassword -h localhost database-name < modules/location/database/zipcodes.us.mysql
  17. To make use of the German postal codes:
  18. mysql -u username -ppassword -h localhoost database-name < modules/location/database/zipcodes.de.mysql
  19. where "username", "password" are the username/loging and "database-name" are
  20. the parameters to login to your Drupal site's database. You can leave out
  21. "-h localhost" if your MySQL server runs on the same site as your Apache.
  22. However, replace 'localhost' in "-h localhost" if your MySQL server is on a
  23. different machine.
  24. Step 2
  25. ------
  26. In the "modules/" directory, create a subdirectory called "location/" which
  27. itself contains a subdirectory called "supported/".
  28. Download "location.inc" to "modules/location/"
  29. Download "location.module" to "modules/location/"
  30. Download "earth.inc" to "modules/location/"
  31. Download "supported/location.us.inc" to "modules/location/supported/" (for
  32. support of US locations)
  33. Step 3
  34. ------
  35. Enable the location module on your site.
  36. Visit the settings page for location.module and enable features for U.S.
  37. (the only option as of now).
  38. Finally, go to the default workflow settings for each node type and enable
  39. (or require) location collection on a field-by-field basis. It is encouraged
  40. that you enable postal codes and country fields for node types for which you
  41. want to enable proximity searches.