-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 warning for some commercial mapservice in China #8701
Conversation
regex part (my regex is not good so maybe this is not the minimized) I can't edit in files directly as what I do in other repo, so I paste my edit at there {
id: 'amap',
regex: /(amap|autonavi|mapabc|高德(软件|地图|淘金))/i
},
{
id: 'baidu',
regex: /(baidu|baidumap|mapbar|百度|百度(地图|全景|街景))/i
}, Sometimes “B” in baidu and “A” in amap maybe uppercase. Very thank you for conducting so much research for those commercial mapservice, and this is truly a large changes in javascript code, which I can't made by myself. |
I guess the original rule
That's ok - the
You're very welcome! 😄 |
If so, new regex will be
because "高德" and "百度" can have a lot of product but they are all belonging to the parent service |
Thanks 👍 just updated it... |
@mbrzakovic |
@simonpoole these are two separate lists. This PR is just for the validator that warns about If you want them added to the imagery blacklist, you can ask the team that maintains that openstreetmap-website file. |
closes #8700
This PR adds some additional checks to the
incompatible_source
validator to catch some popular map services in China.@LaoshuBaby - please take a look at the rulesets and let me know if I caught everything (I'm not a native Chinese speaker, but I tried).
It also rewrites the file to be ES6 and simplifies the code a bunch. The new code also embeds the actual matched string in the error message, and it does a better job picking out sources from a semicolon-delimited list and uses the
.hash
property to disambiguate the issues raised. So for example if someone did saysource=google;baidu
then we'll see 2 issues raised, not 1.