diff --git a/www/events.js b/www/events.js index a632b48..a0e9023 100644 --- a/www/events.js +++ b/www/events.js @@ -87,12 +87,9 @@ function ajaxLoadEvents(stime, etime) { var location // try to use location with reverse geolocation lookup (nominatim), check cache first // use getLocation if it fails or description -> text if it also fails - if ( geolocationTable[id] ) { - location = geolocationTable[id]; - } else { - location = getGeolocation(id, lat, lng); - ( location ) ? null : location = $(this).find('description > text').text(); - }; + ( location = geolocationTable[id] ) ? null : location = getGeolocation(id, lat, lng); + ( location ) ? null : location = getLocation(lat, lng)[0]; + ( location ) ? null : $(this).find('description > text').text(); // create table row: Date, Time, Mag, Location if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) { // general event info (1st line)