changed geoip service
This commit is contained in:
parent
90724c4858
commit
bf7146f27e
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue