From 49e80842487df5027b74949a40b117003e53794d Mon Sep 17 00:00:00 2001 From: uprel Date: Wed, 5 Jun 2019 09:58:08 +0200 Subject: [PATCH] Mobile: Add timeout to feature info --- client_mobile/src/feature_info.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client_mobile/src/feature_info.js b/client_mobile/src/feature_info.js index 01180eff..3f99a1c2 100755 --- a/client_mobile/src/feature_info.js +++ b/client_mobile/src/feature_info.js @@ -118,6 +118,7 @@ FeatureInfo.prototype.handleEvent = function (e) { $.ajax({ url: url, dataType: 'text', + timeout: 3000, context: this }).done(function (data, status) { var results = null; @@ -131,7 +132,11 @@ FeatureInfo.prototype.handleEvent = function (e) { this.resultsCallback(status,results); //allow clicking again Map.toggleClickHandling(true); - }); + }) + .fail(function (xhr, status, error) { + //todo what with error here + Map.toggleClickHandling(true); + }); }; /**