mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Merge pull request #8254 from openstreetmap/osm-community-index-v3
Update osm-community-index to v3.0.0
This commit is contained in:
2
dist/locales/en.min.json
vendored
2
dist/locales/en.min.json
vendored
File diff suppressed because one or more lines are too long
@@ -21,8 +21,8 @@ export function coreFileFetcher() {
|
||||
'locales': 'locales/index.min.json',
|
||||
'nsi_brands': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@4/dist/brands.min.json',
|
||||
'nsi_filters': 'https://cdn.jsdelivr.net/npm/name-suggestion-index@4/dist/filters.min.json',
|
||||
'oci_features': 'https://cdn.jsdelivr.net/npm/osm-community-index@2/dist/features.min.json',
|
||||
'oci_resources': 'https://cdn.jsdelivr.net/npm/osm-community-index@2/dist/resources.min.json',
|
||||
'oci_features': 'https://cdn.jsdelivr.net/npm/osm-community-index@3/dist/featureCollection.min.json',
|
||||
'oci_resources': 'https://cdn.jsdelivr.net/npm/osm-community-index@3/dist/resources.min.json',
|
||||
'preset_categories': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/preset_categories.min.json',
|
||||
'preset_defaults': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/preset_defaults.min.json',
|
||||
'preset_fields': 'https://cdn.jsdelivr.net/npm/@openstreetmap/id-tagging-schema@3/dist/fields.min.json',
|
||||
|
||||
@@ -32,14 +32,20 @@ export function uiSuccess(context) {
|
||||
let ociFeatures = {};
|
||||
|
||||
Object.values(ociResources).forEach(resource => {
|
||||
const feature = loco.resolveLocationSet(resource.locationSet).feature;
|
||||
let ociFeature = ociFeatures[feature.id];
|
||||
if (!ociFeature) {
|
||||
ociFeature = JSON.parse(JSON.stringify(feature)); // deep clone
|
||||
ociFeature.properties.resourceIDs = new Set();
|
||||
ociFeatures[feature.id] = ociFeature;
|
||||
let feature;
|
||||
try {
|
||||
feature = loco.resolveLocationSet(resource.locationSet).feature;
|
||||
let ociFeature = ociFeatures[feature.id];
|
||||
if (!ociFeature) {
|
||||
ociFeature = JSON.parse(JSON.stringify(feature)); // deep clone
|
||||
ociFeature.properties.resourceIDs = new Set();
|
||||
ociFeatures[feature.id] = ociFeature;
|
||||
}
|
||||
ociFeature.properties.resourceIDs.add(resource.id);
|
||||
} catch (err) {
|
||||
/* ignore communities with an unresolvable locationSet */
|
||||
console.warn(`warning: skipping community resource ${resource.id}: ${err.message}`); // eslint-disable-line no-console
|
||||
}
|
||||
ociFeature.properties.resourceIDs.add(resource.id);
|
||||
});
|
||||
|
||||
return _oci = {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ideditor/country-coder": "^3.2.0",
|
||||
"@ideditor/location-conflation": "~0.5.0",
|
||||
"@ideditor/location-conflation": "~0.6.0",
|
||||
"@mapbox/geojson-rewind": "^0.5.0",
|
||||
"@mapbox/sexagesimal": "1.2.0",
|
||||
"@mapbox/togeojson": "0.16.0",
|
||||
@@ -103,7 +103,7 @@
|
||||
"node-fetch": "^2.6.1",
|
||||
"npm-run-all": "^4.0.0",
|
||||
"object-inspect": "1.9.0",
|
||||
"osm-community-index": "2.1.2",
|
||||
"osm-community-index": "3.0.1",
|
||||
"phantomjs-prebuilt": "~2.1.11",
|
||||
"postcss": "^8.1.1",
|
||||
"postcss-selector-prepend": "^0.5.0",
|
||||
@@ -126,4 +126,4 @@
|
||||
"browserslist": [
|
||||
"> 0.2%, last 6 major versions, Firefox ESR, IE 11, maintained node versions"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user