Skip to content
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

Esri World Imagery vintage #4280

Closed
bhousel opened this issue Aug 25, 2017 · 4 comments · Fixed by #4335
Closed

Esri World Imagery vintage #4280

bhousel opened this issue Aug 25, 2017 · 4 comments · Fixed by #4335
Labels
new-feature A new feature for iD

Comments

@bhousel
Copy link
Member

bhousel commented Aug 25, 2017

We can probably fetch imagery vintage for the Esri World Imagery layer, similar to how we can get it for Bing.

details here: https://www.arcgis.com/home/item.html?id=c03a526d94704bfb839445e80de95495

@jgravois
Copy link

jgravois commented Sep 8, 2017

source/vintage is absolutely something that can be queried and i'm happy to help land it as a feature in iD.

given that it'd invoke a new web request, my first instinct is to add a context menu item in the background settings panel when the Esri imagery is active.

@bhousel
Copy link
Member Author

bhousel commented Sep 8, 2017

Thanks @jgravois!
The way I would approach this would be similar to how we fetch the Bing imagery vintage.

rendererBackgroundSource.Bing is special and it extends the generic rendererBackgroundSource, see here: https://github.com/openstreetmap/iD/blob/master/modules/renderer/background_source.js#L150

  • So in that same file, you could make a renderBackgroundSource.Esri that is like the Bing one, but only has a single getVintage method.

  • Then you'll need to update the init() code here:

    if (source.type === 'bing') {
    return rendererBackgroundSource.Bing(source, dispatch);
    } else {
    return rendererBackgroundSource(source);
    }

add something like this:

  } else if (source.id === 'EsriWorldImagery') {
      return rendererBackgroundSource.Esri(source);
  }

@bhousel
Copy link
Member Author

bhousel commented Sep 9, 2017

@jgravois I got this started for you in 1c9719d, while fixing #4327

@bhousel
Copy link
Member Author

bhousel commented Sep 9, 2017

BTW to test this, just hit ⌘Cmd+Shift+B (on Mac) / Ctrl+Shift+B (on Windows) to bring up the Background info pane. This pane will display the vintage of the center tile, and there will be a button to toggle tile debugging info, to display vintage on all the tiles.

This feature is toggleable and off by default, so it won't flood the server with requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature for iD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants