Module Configuration
MaxMind offers two types of geolocation services: database-based services and API-based services. To specify which specific service to use, override the geolocation.api property as described below.
Downloadable Databases
To take advantage of MaxMind's downloadable databases (free or premium), download the appropriate database in .mmdb format.
GeoIP2 / GeoLite2 Country Database
If you have downloaded the GeoIP2 Country or GeoLite2 Country database, you will need to set the following system properties:
- Set the property
maxmind.geolocation.country.database.pathto the file path of the database you downloaded - Set
geolocation.apitoblMaxMindDBCountryAPI
GeoIP2 / GeoLite2 City Database
If you have downloaded the GeoIP2 City or GeoLite2 City database, you will need to set the following system properties:
- Set the property
maxmind.geolocation.city.database.pathto the file path of the database you downloaded - Set
geolocation.apitoblMaxMindDBCityAPI
Precision Services
To take advantage of MaxMind's GeoIP2 Precision Services license, you must obtain a license key and user ID by registering an account with MaxMind.
GeoIP2 Precision Country
To use the GeoIP2 Precision Country service, you will need to set the following system properties:
- Set the property
maxmind.geolocation.service.user.idto your MaxMind user ID andmaxmind.geolocation.service.license.keyto your license key - Set
geolocation.apitoblMaxMindGeoPrecisionCountryAPI
GeoIP2 Precision City
To use the GeoIP2 Precision City service, you will need to set the following system properties:
- Set the property
maxmind.geolocation.service.user.idto your MaxMind user ID andmaxmind.geolocation.service.license.keyto your license key - Set
geolocation.apitoblMaxMindGeoPrecisionCityAPI
GeoIP2 Precision Insights
Note: Broadleaf's out of the box features do not take advantage of the extra data provided by the GeoIP2 Precision Insights service at this time. You may still use this module to call this service, but please know that the information taken from the response can be obtained using the Precision City service at a lower cost.
To use the GeoIP2 Precision Insights service, you will need to set the following system properties:
- Set the property
maxmind.geolocation.service.user.idto your MaxMind user ID andmaxmind.geolocation.service.license.keyto your license key - Set
geolocation.apitoblMaxMindGeoPrecisionInsightsAPI
Required System Properties Overview Table
| API | Component | Additional Properties |
|---|---|---|
| GeoIP2 / GeoLite2 Country DB | blMaxMindGeoDBCountryAPI | maxmind.geolocation.country.database.path |
| GeoIP2 / GeoLite2 City DB | blMaxMindGeoDBCityAPI | maxmind.geolocation.city.database.path |
| GeoIP2 Precision Country | blMaxMindGeoPrecisionCountryAPI | maxmind.geolocation.service.user.id & maxmind.geolocation.service.license.key |
| GeoIP2 Precision City | blMaxMindGeoPrecisionCityAPI | maxmind.geolocation.service.user.id & maxmind.geolocation.service.license.key |
| GeoIP2 Precision Insights* | blMaxMindGeoPrecisionInsightsAPI | maxmind.geolocation.service.user.id & maxmind.geolocation.service.license.key |
* Please note details given under GeoIP2 Precision Insights before using