As part of MapTiler Cloud, we provide an easy-to-use API endpoint to obtain basic geolocation information about the current visitor (based on the IP address of the incoming request).
The precision and accuracy of the data is limited (based only on the IP information), especially for visitors with mobile ISPs and/or proxies.
However, in most cases, the country-level information is accurate enough for these example use cases:
Visitor's geographical location (approximate position and country bounds)
Position the map to an area the visitor is familiar with.
Continent/country/region names and ISO codes
Interconnect with administrative units (see MapTiler Countries) or your own data.
Disputed borders are based on visitors' country (see Disputed borders on your maps).
Show an "allow cookies" bar only to visitors from the European Union where it is required.
See the IP Geolocation API reference for the list of available info.