mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-24 04:54:51 -04:00
Remove the code that used the "expert mode" fields for geolocation
This commit is contained in:
parent
edec092256
commit
7ec7117ba8
@ -580,14 +580,7 @@ define(function(require) {
|
|||||||
$('#titleListHeaderMessage').hide();
|
$('#titleListHeaderMessage').hide();
|
||||||
$('#articleContent').empty();
|
$('#articleContent').empty();
|
||||||
if (localArchive !== null && localArchive._titleFile !== null) {
|
if (localArchive !== null && localArchive._titleFile !== null) {
|
||||||
var longitude = $('#longitude').val();
|
var maxDistance = MAX_DISTANCE_ARTICLES_NEARBY;
|
||||||
var latitude = $('#latitude').val();
|
|
||||||
var maxDistance = $('#maxDistance').val();
|
|
||||||
if (!maxDistance) {
|
|
||||||
maxDistance = MAX_DISTANCE_ARTICLES_NEARBY;
|
|
||||||
}
|
|
||||||
if (!longitude || !latitude) {
|
|
||||||
// If the user did not give any latitude/longitude, we try to use geolocation
|
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
var geo_options = {
|
var geo_options = {
|
||||||
enableHighAccuracy: false,
|
enableHighAccuracy: false,
|
||||||
@ -636,20 +629,6 @@ define(function(require) {
|
|||||||
alert("Geolocation is not supported (or disabled) on your device, or on your browser");
|
alert("Geolocation is not supported (or disabled) on your device, or on your browser");
|
||||||
$('#searchingForTitles').hide();
|
$('#searchingForTitles').hide();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
// The user gave a latitude/longitude : let's use it to find articles around that location
|
|
||||||
var rectangle = new geometry.rect(
|
|
||||||
latitude - maxDistance,
|
|
||||||
longitude - maxDistance,
|
|
||||||
maxDistance * 2,
|
|
||||||
maxDistance * 2);
|
|
||||||
|
|
||||||
$('#geolocationProgress').html("Looking for articles around the location you gave...");
|
|
||||||
$('#geolocationProgress').show();
|
|
||||||
|
|
||||||
localArchive.getTitlesInCoords(rectangle, MAX_SEARCH_RESULT_SIZE, populateListOfTitles);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#searchingForTitles').hide();
|
$('#searchingForTitles').hide();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user