From e1caa77e2ba9ef522e7dd48b993682778863ab68 Mon Sep 17 00:00:00 2001 From: "RobLabs.com" Date: Tue, 27 Aug 2024 18:40:39 -0700 Subject: [PATCH 1/4] New Window with GeoJSON URL --- src/ui/file_bar.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ui/file_bar.js b/src/ui/file_bar.js index 947dccca2..d62530e53 100644 --- a/src/ui/file_bar.js +++ b/src/ui/file_bar.js @@ -86,6 +86,20 @@ module.exports = function fileBar(context) { meta.adduserlayer(context, layerURL, layerName); } }, + { + title: '🪟 New Window with GeoJSON URL', + action: function () { + const geojsonURL = prompt( + 'Load GeoJSON data from a URL\n\n Warning this will open a new window 🪟' + ); + if (geojsonURL === null) return; + + const encodedURL = encodeURIComponent(geojsonURL); + const openURL = `${window.location.origin}${window.location.pathname}#data=data:text/x-url,${encodedURL}`; + console.log(openURL); + window.open(openURL); + } + }, { title: 'Zoom to features', alt: 'Zoom to the extent of all features', From 3d152a9e83619dcffd98bfb202c7b37925322904 Mon Sep 17 00:00:00 2001 From: "RobLabs.com" Date: Tue, 27 Aug 2024 20:55:13 -0700 Subject: [PATCH 2/4] Lets encrypt: protocols are now https in Markdown --- API.md | 8 ++++---- data/help.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/API.md b/API.md index 3bbbf1677..2738c50a3 100644 --- a/API.md +++ b/API.md @@ -35,14 +35,14 @@ Load GeoJSON data from a URL on the internet onto the map. The URL must refer directly to a resource that is: - Freely accessible (not behind a password) -- Supports [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) +- Supports [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) - Is valid GeoJSON The URL should be encoded as per `encodeURIComponent(url)`. #### Example: -http://geojson.io/#data=data:text/x-url,https%3A%2F%2Fraw.githubusercontent.com%2Fcodeforgermany%2Fclick_that_hood%2Fmain%2Fpublic%2Fdata%2Fcalifornia-counties.geojson +https://geojson.io/#data=data:text/x-url,https%3A%2F%2Fraw.githubusercontent.com%2Fcodeforgermany%2Fclick_that_hood%2Fmain%2Fpublic%2Fdata%2Fcalifornia-counties.geojson ### `id=gist:` @@ -65,7 +65,7 @@ The url is in the form: #### Example: -http://geojson.io/#id=github:benbalter/dc-wifi-social/blob/master/bars.geojson&map=14/38.9140/-77.0302 +https://geojson.io/#id=github:benbalter/dc-wifi-social/blob/master/bars.geojson&map=14/38.9140/-77.0302 ## Console API @@ -86,7 +86,7 @@ window.api.map.addSource('raster-tiles', { ], 'tileSize': 256, 'attribution': - 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA' + 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA' }) window.api.map.addLayer({ diff --git a/data/help.md b/data/help.md index 890506e5f..2b75b745f 100644 --- a/data/help.md +++ b/data/help.md @@ -1,6 +1,6 @@ ## Help -**geojson.io** is a quick, simple tool for creating, viewing, and sharing maps. geojson.io is named after [GeoJSON](http://geojson.org/), an open source spatial data format, and it supports GeoJSON in all ways - but also accepts KML, GPX, CSV, GTFS, TopoJSON, and other formats. +**geojson.io** is a quick, simple tool for creating, viewing, and sharing maps. geojson.io is named after [GeoJSON](https://geojson.org/), an open source spatial data format, and it supports GeoJSON in all ways - but also accepts KML, GPX, CSV, GTFS, TopoJSON, and other formats. Want to request a feature or report a bug? [Open an issue on geojson.io's issue tracker.](https://github.com/mapbox/geojson.io/issues?state=open) From 24f5819b8469ab23a435d8c4921050a79f0eebeb Mon Sep 17 00:00:00 2001 From: "RobLabs.com" Date: Tue, 27 Aug 2024 20:59:54 -0700 Subject: [PATCH 3/4] Lets encrypt: protocols are now https in Markdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89c82d283..09d7b9f20 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ A fast, simple editor for map data. Read more on [Mapbox](https://www.mapbox.com You can interact with geojson.io programmatically via URL parameters. Here is an example of geojson encoded into the URL: -http://geojson.io/#data=data:application/json,%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B0%2C0%5D%2C%5B10%2C10%5D%5D%7D +https://geojson.io/#data=data:application/json,%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B0%2C0%5D%2C%5B10%2C10%5D%5D%7D Full API documentation can be found in [API.md](API.md). From 4029e9e732f91c48cdd34cf54e7bbdf0e49dae05 Mon Sep 17 00:00:00 2001 From: "RobLabs.com" Date: Thu, 29 Aug 2024 12:31:20 -0700 Subject: [PATCH 4/4] Reverse unintended commit related to `# 900` --- src/ui/file_bar.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/ui/file_bar.js b/src/ui/file_bar.js index d62530e53..947dccca2 100644 --- a/src/ui/file_bar.js +++ b/src/ui/file_bar.js @@ -86,20 +86,6 @@ module.exports = function fileBar(context) { meta.adduserlayer(context, layerURL, layerName); } }, - { - title: '🪟 New Window with GeoJSON URL', - action: function () { - const geojsonURL = prompt( - 'Load GeoJSON data from a URL\n\n Warning this will open a new window 🪟' - ); - if (geojsonURL === null) return; - - const encodedURL = encodeURIComponent(geojsonURL); - const openURL = `${window.location.origin}${window.location.pathname}#data=data:text/x-url,${encodedURL}`; - console.log(openURL); - window.open(openURL); - } - }, { title: 'Zoom to features', alt: 'Zoom to the extent of all features',