Remove the code that used the "expert mode" fields for geolocation

This commit is contained in:
mossroy 2014-03-25 16:18:38 +01:00
parent edec092256
commit 7ec7117ba8

View File

@ -580,14 +580,7 @@ define(function(require) {
$('#titleListHeaderMessage').hide();
$('#articleContent').empty();
if (localArchive !== null && localArchive._titleFile !== null) {
var longitude = $('#longitude').val();
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
var maxDistance = MAX_DISTANCE_ARTICLES_NEARBY;
if (navigator.geolocation) {
var geo_options = {
enableHighAccuracy: false,
@ -636,20 +629,6 @@ define(function(require) {
alert("Geolocation is not supported (or disabled) on your device, or on your browser");
$('#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 {
$('#searchingForTitles').hide();