Skip to content

Commit 4b8b97e

Browse files
committed
feat(gpx): add default location name
1 parent 3a6371f commit 4b8b97e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/js/my-account/my-account.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,13 @@ class MyAccount {
503503
if (!imported.properties.icon) {
504504
imported.properties.icon = "landmark-icon-saved";
505505
}
506+
const lon = imported.geometry.coordinates[0].toFixed(5);
507+
const lat = imported.geometry.coordinates[1].toFixed(5);
506508
if (!imported.properties.locationName) {
507-
imported.properties.locationName = "";
509+
imported.properties.locationName = lon + ", " + lat;
510+
}
511+
if (!imported.properties.location) {
512+
imported.properties.location = "[" + lon + "," + lat + "]";
508513
}
509514
imported.properties.visible = true;
510515
imported.properties.radiusRatio = 0;

0 commit comments

Comments
 (0)