[gnome-maps/wip/mlundblad/handle-osm-urls: 2/2] WIP: place: Add parsing of OSM URLs



commit 5270e819220a28d7a49e9209a61dd9d428298d92
Author: Marcus Lundblad <ml update uu se>
Date:   Thu Jun 13 21:54:54 2019 +0200

    WIP: place: Add parsing of OSM URLs

 src/place.js | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/place.js b/src/place.js
index babb8b6..b1aa63d 100644
--- a/src/place.js
+++ b/src/place.js
@@ -38,6 +38,9 @@ const DMS_COORDINATES_REGEX = new RegExp(
     "i"
 );
 
+const OSM_OBJECT_URL_REGEX =
+    new RegExp(/https?:\/\/(www\.)?openstreetmap\.org\/(node|way|relation)\/(\d+)\/?$/);
+
 var Place = GObject.registerClass(
 class Place extends Geocode.Place {
 
@@ -419,3 +422,7 @@ Place.parseCoordinates = function(text) {
         return null;
     }
 };
+
+function matchOSMURL(text) {
+
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]