changed geoip service

This commit is contained in:
Per Qvarforth 2022-01-30 23:43:21 +01:00
parent 90724c4858
commit bf7146f27e
1 changed files with 2 additions and 2 deletions

View File

@ -90,8 +90,8 @@
options['defaultLatitude'] = '59.30928'; options['defaultLatitude'] = '59.30928';
options['defaultLongitude'] = '18.08830'; options['defaultLongitude'] = '18.08830';
// Tip: request position from some ip->location service (here using freegeoip as an example) // Tip: request position from some ip->location service (https://freegeoip.app/json and https://ipapi.co/json is two examples)
$.getJSON('https://freegeoip.app/json/', function(data) { $.getJSON('https://ipapi.co/json', function(data) {
if (data.latitude && data.longitude) { if (data.latitude && data.longitude) {
options['defaultLatitude'] = data.latitude; options['defaultLatitude'] = data.latitude;
options['defaultLongitude'] = data.longitude; options['defaultLongitude'] = data.longitude;