Do you want to assign the content of your website to one or more locations? Then this module is perfect for you.
Why this module?
In the beginning, I used Taxonomies for doing so. But there are multiple problems with Taxonomies:
- Selection
- The selection of hierarchical terms are not well supported. Tough SHS and CSHS Module (maybe one day HS) solve this problem, but the maintenance is not satisfactory.
- Too much data
- The world is big. If you want many countries, or even continents to choose from, your taxonomy vocabularies get way to big and you have to import everything and maintain it yourself.
- Perfomance
- If you store much data, then the current taxonomy modules fail completely. Your website is crashing. Even with caching inserted, writing to the cache pushes the system to its limits.
Why GeoNames?
The solution is to use a Location API instead of taxonomies. Google API has a price program, and is no longer free at a certain point. GeoNames on the other hand has a Creative Commons Attribution 4.0 License and a huge location database too. So in my opinion it's the better deal.
Theorethically, the module can be further developed for further APIs in the future.
How to use
- Install the module like every normal module.
- Go to www.geonames.org/login and create a free account for limitless API access. See also: www.geonames.org/export/web-services for more information.
- Go to /admin/config/location_selector/settings and enter the geonames username.
- On "Manage Fields": Add a location selector field to your entity (e.g. Content Type).
- On "Manage Form Display": Set the Field Widget parameters.
- On "Manage Display": Set the Field Display parameters.
Features
- Views Integration
- Add the Location Selector field in the filter section, enter the specific display setting of the field and make the filter exposed.
- Multiple Languages
- The locations are displayed in the current user language.
- Hierarchical Select
- Select the locations from top to bottom with select lists.
- Force deepest level
- Force users to select terms from the deepest level.
- Save only the last selected element
- Save only the last selected element and not the parents.
- Level limitation
- Choose how many children levels you want to display.
- Define Basic Parent Location
- Which locations would you like to make selectable for all? The whole world, a continent, a country or even smaller? Choose for yourself.
- Link your locations to a custom view
- Refer your selected locations on the field formatter to a custom view that already includes the field as a filter.
Requirements
Only a free GeoNames User Account is needed (for free). See the How to use section for more information.
How can I help?
Use the module and create Issues for bugs and feedback.
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: Content editing experience, Site structure
8 sites report using this module
- Created by handkerchief on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 8.x-1.x-dev updated 20 Nov 2024 at 17:14 UTC




