-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Google imagery can be used as background in ID #3623
Comments
Thanks for the report @dmgroom ! Would you be interested in contributing a fix? This would be a very straightforward one: here's the part of the iD code where we check for google.com, google.ru, and googleapis.com: the fix would be adding another like, just like the one for googleapis.com, below that line, with google.cn. |
iD needs to be using the A short-term solution would be to manually use the same regular expression as the API currently returns, |
Hmm, @pnorman that It seems dangerous to blindly apply a regular expression that we fetch from the capabilities endpoint. e.g. It could contain PCRE and might not work in JavaScript. I guess we could wrap it in a anyway: > re = new RegExp('.*\.google(apis)?\..*/(vt|kh)[\?/].*([xyz]=.*){3}.*')
< /.*.google(apis)?..*\/(vt|kh)[?\/].*([xyz]=.*){3}.*/
> re.test('google.com')
< false 😕 |
It's assuming that
google.com isn't an imagery URL, so it shouldn't match. $ echo 'http://www.google.cn/maps/vt?lyrs=s@190&gl=com&x={x}&y={y}&z={z}' > imagery_test
$ grep -E '.*\.google(apis)?\..*/(vt|kh)[\?/].*([xyz]=.*){3}.*' imagery_test
http://www.google.cn/maps/vt?lyrs=s@190&gl=com&x={x}&y={y}&z={z} No PCRE here. |
Closed with a bunch of weekend commits: This is working pretty solidly now because we:
|
Just checking the status of this, since https://www.openstreetmap.org/changeset/44369979 appears to be using google.cn imagery. Is it just awaiting rollout to the main site? |
Yes it's fixed now and will be included in the next release. I haven't set a date for this and iD is currently stable enough to release anytime, though it would be nice to get some recent pull requests merged in. |
see changeset https://www.openstreetmap.org/changeset/43920440 which shows Google imagery being use as a custom background layer
The text was updated successfully, but these errors were encountered: