aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/static
diff options
context:
space:
mode:
Diffstat (limited to 'bh20simplewebuploader/static')
-rw-r--r--bh20simplewebuploader/static/main.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js
index f2e5d99..d9b182e 100644
--- a/bh20simplewebuploader/static/main.js
+++ b/bh20simplewebuploader/static/main.js
@@ -38,10 +38,10 @@ function fetchAPI(apiEndPoint) {
if (!(apiEndPoint === "/api/getAllaccessions")) {
for (let i = 0; i < data.length; i++) {
let {"Fasta Count": fastaCount, GPS, LocationLabel: label } = data[i];
- let coordinates = GPS.match(/Point\((-?[0-9]+(?:.(?:[0-9]+)?)?) (-?[0-9]+(?:.(?:[0-9]+)?)?)\)/);
+ let coordinates = GPS.split(" ");
if (!(coordinates == null)) {
let lat, lon;
- [lon, lat] = coordinates.slice(1, 3).map(parseFloat);
+ [lon, lat] = coordinates.map(parseFloat);
let point = L.point()
let marker = L.marker([lat, lon]);
marker.bindPopup("<b>" + label + "</b><br/>" + "FastaCount: " +fastaCount);
@@ -279,4 +279,4 @@ fetch(scriptRoot + "api/getCountByGPS")
}
});
-} \ No newline at end of file
+}