Commit 84714eaa authored by Marcus Lundblad's avatar Marcus Lundblad

application: Handle http(s) URLs

Handle opening a specific subset of
HTTP URLs.
parent 12d1745c
Pipeline #94763 failed with stage
in 5 minutes and 29 seconds
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment