diff --git a/WebContent/utils/OSRM.Utils.js b/WebContent/utils/OSRM.Utils.js index 74cfbf2e9..c3935ce57 100644 --- a/WebContent/utils/OSRM.Utils.js +++ b/WebContent/utils/OSRM.Utils.js @@ -77,6 +77,9 @@ isLongitude: function(value) { return true; else return false; +}, +isNumber: function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); } }; \ No newline at end of file