瀏覽代碼

Removed some debug logging

j433866 6 年之前
父節點
當前提交
b3ac8d0835
共有 2 個文件被更改,包括 2 次插入7 次删除
  1. 0 1
      src/core/lib/ConvertCoordinates.mjs
  2. 2 6
      src/core/operations/ConvertCoordinateFormat.mjs

+ 0 - 1
src/core/lib/ConvertCoordinates.mjs

@@ -249,7 +249,6 @@ export function findFormat (input, delim) {
         const filteredInput = input.replace(/[^A-Za-z0-9]/, "").toUpperCase();
         const mgrsPattern = new RegExp(/^[0-9]{2}[C-HJ-NP-X]{2}[A-Z]+/);
         const geohashPattern = new RegExp(/^[0123456789BCDEFGHJKMNPQRSTUVWXYZ]+$/);
-        log.error(filteredInput);
         if (mgrsPattern.test(filteredInput)) {
             return "Military Grid Reference System";
         } else if (geohashPattern.test(filteredInput)) {

+ 2 - 6
src/core/operations/ConvertCoordinateFormat.mjs

@@ -22,7 +22,7 @@ class ConvertCoordinateFormat extends Operation {
 
         this.name = "Convert co-ordinate format";
         this.module = "Hashing";
-        this.description = "Convert geographical coordinates between different formats.<br><br>Currently supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li></ul>";
+        this.description = "Convert geographical coordinates between different formats.<br><br>Supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li></ul>";
         this.infoURL = "https://wikipedia.org/wiki/Geographic_coordinate_conversion";
         this.inputType = "string";
         this.outputType = "string";
@@ -93,10 +93,8 @@ class ConvertCoordinateFormat extends Operation {
         // Autodetect input delimiter
         if (inDelim === "Auto") {
             inDelim = findDelim(input);
-            log.error("DATA: " + input + " DELIM: " + inDelim);
             if (inDelim === null) {
                 inDelim = "";
-                // throw new OperationError("Could not automatically detect the input delimiter.");
             }
         } else if (!inDelim.includes("Direction")) {
             // Get the actual delimiter from the regex
@@ -104,9 +102,8 @@ class ConvertCoordinateFormat extends Operation {
         }
         if (inFormat === "Auto") {
             inFormat = findFormat(input, inDelim);
-            log.error("DATA: " + input + " FORMAT: " + inFormat);
             if (inFormat === null) {
-                throw new OperationError("Could not automatically detect the input");
+                throw new OperationError("Could not automatically detect the input format.");
             }
         }
 
@@ -147,7 +144,6 @@ class ConvertCoordinateFormat extends Operation {
         } else {
             // Split on the delimiter
             const splitInput = input.split(inDelim);
-            log.error(splitInput);
             if (splitInput.length > 0) {
                 inLat = splitInput[0];
                 if (splitInput.length >= 2) {