-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Esri World Imagery Wayback to background layers #181
Conversation
Injected a source for each of the layers in the Esri World Imagery Wayback feed. The code to query Esri’s metadata layer now respects the metadata item corresponding to the layer in the feed.
@@ -30,10 +31,82 @@ export function rendererBackground(context) { | |||
|
|||
|
|||
function ensureImageryIndex() { | |||
return fileFetcher.get('imagery') | |||
return fileFetcher.get('wayback') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t feel too great about blocking all the imagery on Esri’s endpoint. It’s a reliable endpoint, but anything can happen in networking. As tail work, we should figure out how to defer this fetch and regenerate the imagery index once it comes in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great minds think alike: facebook/Rapid#1209. While I’m pretty sure even my rough MVP would provide good value to the OHM project, given its particular needs, I’m excited for what the Rapid team comes up with and would be interested in integrating their work. Depending on timing, it could be a second iteration of this PR or a replacement for it. Some of the relevant code may have diverged between OHM’s iD and Rapid, but it should still be possible to tag-team between the two projects.
if (esri.id !== 'EsriWorldImagery') { | ||
let mapServerUrl = esri.metadata; | ||
if (esri.id === 'EsriWorldImagery') { | ||
mapServerUrl = 'https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s pretty annoying that iD hard-codes the metadata MapServer URL for just Esri World Imagery, as if it’s the only ArcGIS ImageServer that comes with such an endpoint (far from it). osmlab/editor-layer-index#909 tracks specifying these endpoints upstream in the original data.
It would be a little tricky to generalize this code to work for every ArcGIS ImageServer. Layer number 4 also applies to the Wayback ImageServers and the wayback application depends on that, but I’ve encountered third-party ImageServers that put the metadata in other layers, for example Ohio’s OSIP ImageServer.
Just stumbled upon this PR after looking for ways to find imagery collection date for a specific set of providers (ESRI, Google and the likes). In case it's worth it, here is a link to an OSS app I've designed (CTO @ Iconem) which also relies on ESRI Wayback (as well as Google, Bing, ESRI, Mapbox, Here, Yandex, OSM and Planet Monthly), where the basemaps with localChanges are made available on a timeline slider. |
Injected a source for each of the layers in the Esri World Imagery Wayback feed. The code to query Esri’s metadata layer now respects the metadata item corresponding to the layer in the feed. This PR does not include any UI changes, so the feed’s layers are flooding the Background list. I think this is a small price to pay for getting access to such useful imagery, but we should figure out a more usable UI soon that doesn’t bury other sources that the user might need to discover.
Fixes OpenHistoricalMap/issues#582.