[gnome-maps/wip/mlundblad/handle-osm-urls: 5/5] application: Handle http(s) URLs
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/handle-osm-urls: 5/5] application: Handle http(s) URLs
- Date: Mon, 8 Jul 2019 20:06:16 +0000 (UTC)
commit 002af2bb3a79fb22586296dc2e735c63e86b9e77
Author: Marcus Lundblad <ml update uu se>
Date: Mon Jul 8 19:20:28 2019 +0200
application: Handle http(s) URLs
Handle opening a specific subset of
HTTP URLs.
src/application.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/application.js b/src/application.js
index f9d9bda..58d15c3 100644
--- a/src/application.js
+++ b/src/application.js
@@ -280,11 +280,14 @@ var Application = GObject.registerClass({
return;
let uri = files[0].get_uri();
+ let scheme = GLib.uri_parse_scheme(uri);
- if (GLib.uri_parse_scheme(uri) === 'geo') {
+ if (scheme === 'geo') {
/* we get an uri that looks like geo:///lat,lon, remove slashes */
let geoURI = uri.replace(/\//g, '');
this._mainWindow.mapView.goToGeoURI(geoURI);
+ } else if (scheme === 'http' || scheme === 'https') {
+ this._mainWindow.mapView.goToHttpURL(uri);
} else {
this._mainWindow.mapView.openShapeLayers(files);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]