The administration settings for the locations plugin are as follows.
toggles whether ‘Add Location’ modal displays specific location input fields or a single location query input
Sets what input fields are used if
location input fields enabled is true
- none: User is required to enter either a name or an address when adding a location. Addresses are stored as a string.
- optional: User is required to enter either a name or an address when adding a location. Addresses are geocoded and will display on any associated maps.
- required: User is required to enter an address when adding a location. Addresses are geocoded and will display on any associated maps.
The service that translates user input into coordinates that can be displayed on a map. Geocoding is handled by the Geocoder gem, which supports a number of geocoding providers. Think of these providers like you would a transactional email provider.
The list of providers available in this plugin is a sub-set of the list in the gem. The providers currently supported by this plugin are:
- nominatim (for light use only - no more than 1 request per second. See further)
This sub-set of providers available through the Geocoder gem were chosen according to these criteria:
Ease of integration. The reason we didn’t include Google is because Google Maps is not designed to be used with Leaflet.js (or any other 3rd party software). I did get it working, however it requires multiple customizations specific to Google and the end result is not great, so I don’t want to support it considering there are a number of other more customizable providers that can do the job just as well. If for some reason you must use Google Maps with this plugin, it is possible, but you will need to handle and support the integration yourself.
Terms of Service. A number of the Geocoding providers only allow you to use their geocoding data in conjunction with their own maps. This is true of some of the providers this plugin does support. For example, you can’t use Mapbox data on non-Mapbox maps. For the providers that have this restriction I have only included those that make it relatively easy to use both their geocoding service and their mapping service with Leaflet.js, so the service can be used without breaching the provider’s terms.
Functionality. Some of the providers listed in the Geocoder gem docs no longer work.
When a geocoding provider requires an API key, enter it here before you switch to that service in the
location geocoding provider setting. If you switch to a provider that requires a key before entering a key you will get an error.
This sets the timeout for the Geocoder gem. It is unlikely you will need to change this.
Aka the “basemap”. This is the actual map image on which locations are shown. There is a large variety of basemaps that can be used. Keep in mind that some Geocoding providers require you to use their basemaps when using their geocoding service. There’s a nice basemap showcase here.
Relevant for some basemap providers. It is unlikely you will need to use this.
This string will appear when the ‘i’ button in the bottom right corner of the map is clicked. Please always give attribution to the providers you are using.