mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Merge branch 'develop' into photo-filter-temp
This commit is contained in:
@@ -6726,6 +6726,11 @@ en:
|
||||
name: Windmill
|
||||
# 'terms: wind,wheel,mill'
|
||||
terms: '<translate with synonyms or related terms for ''Windmill'', separated by commas>'
|
||||
man_made/windpump:
|
||||
# man_made=windpump
|
||||
name: Windpump
|
||||
# 'terms: aerorotor,water pump,windmill,wind pump'
|
||||
terms: '<translate with synonyms or related terms for ''Windpump'', separated by commas>'
|
||||
man_made/works:
|
||||
# man_made=works
|
||||
name: Factory
|
||||
|
||||
@@ -821,6 +821,7 @@
|
||||
"man_made/water_works": {"icon": "temaki-powered_pump", "fields": ["name", "operator", "address"], "moreFields": ["gnis/feature_id"], "geometry": ["point", "area"], "tags": {"man_made": "water_works"}, "name": "Water Works"},
|
||||
"man_made/watermill": {"icon": "maki-watermill", "fields": ["building_area"], "moreFields": ["gnis/feature_id"], "geometry": ["point", "area"], "terms": ["water", "wheel", "mill"], "tags": {"man_made": "watermill"}, "name": "Watermill"},
|
||||
"man_made/windmill": {"icon": "maki-windmill", "fields": ["building_area"], "moreFields": ["gnis/feature_id"], "geometry": ["point", "area"], "terms": ["wind", "wheel", "mill"], "tags": {"man_made": "windmill"}, "name": "Windmill"},
|
||||
"man_made/windpump": {"icon": "temaki-windpump", "fields": ["ref", "operator", "height", "material", "manufacturer", "lit"], "geometry": ["point"], "terms": ["aerorotor", "water pump", "windmill", "wind pump"], "tags": {"man_made": "windpump"}, "name": "Windpump"},
|
||||
"man_made/works": {"icon": "maki-industry", "fields": ["name", "operator", "address", "building_area", "product"], "moreFields": ["email", "fax", "gnis/feature_id", "phone", "website"], "geometry": ["point", "area"], "terms": ["assembly", "build", "brewery", "car", "plant", "plastic", "processing", "manufacture", "refinery"], "tags": {"man_made": "works"}, "name": "Factory"},
|
||||
"marker": {"icon": "temaki-silo", "fields": ["ref", "operator", "marker", "utility", "inscription", "colour"], "moreFields": ["height", "location", "manufacturer", "material"], "geometry": ["point"], "terms": ["identifier", "marking", "plate", "pole", "post", "sign"], "tags": {"marker": "*"}, "name": "Marker"},
|
||||
"marker/utility": {"icon": "temaki-silo", "fields": ["ref", "operator", "marker", "utility", "{marker}"], "geometry": ["point"], "terms": ["gas line marker", "identifier", "marking", "oil marker", "pipline marker", "plate", "pole", "post", "sign"], "tags": {"marker": "*", "utility": "*"}, "name": "Utility Marker"},
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"icon": "temaki-windpump",
|
||||
"fields": [
|
||||
"ref",
|
||||
"operator",
|
||||
"height",
|
||||
"material",
|
||||
"manufacturer",
|
||||
"lit"
|
||||
],
|
||||
"geometry": [
|
||||
"point"
|
||||
],
|
||||
"terms": [
|
||||
"aerorotor",
|
||||
"water pump",
|
||||
"windmill",
|
||||
"wind pump"
|
||||
],
|
||||
"tags": {
|
||||
"man_made": "windpump"
|
||||
},
|
||||
"name": "Windpump"
|
||||
}
|
||||
@@ -799,6 +799,7 @@
|
||||
{"key": "man_made", "value": "water_works", "description": "🄿 Water Works", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/powered_pump.svg"},
|
||||
{"key": "man_made", "value": "watermill", "description": "🄿 Watermill", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/watermill-15.svg"},
|
||||
{"key": "man_made", "value": "windmill", "description": "🄿 Windmill", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/windmill-15.svg"},
|
||||
{"key": "man_made", "value": "windpump", "description": "🄿 Windpump", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/windpump.svg"},
|
||||
{"key": "man_made", "value": "works", "description": "🄿 Factory", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/industry-15.svg"},
|
||||
{"key": "marker", "description": "🄿 Marker, 🄵 Type", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/silo.svg"},
|
||||
{"key": "utility", "description": "🄿 Utility Marker, 🄵 Utilities, 🄵 Utility", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/silo.svg"},
|
||||
|
||||
Vendored
+4
@@ -8632,6 +8632,10 @@
|
||||
"name": "Windmill",
|
||||
"terms": "wind,wheel,mill"
|
||||
},
|
||||
"man_made/windpump": {
|
||||
"name": "Windpump",
|
||||
"terms": "aerorotor,water pump,windmill,wind pump"
|
||||
},
|
||||
"man_made/works": {
|
||||
"name": "Factory",
|
||||
"terms": "assembly,build,brewery,car,plant,plastic,processing,manufacture,refinery"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { utilArrayUniq, utilEditDistance } from '../util';
|
||||
import { utilArrayIntersection, utilArrayUniq } from '../util/array';
|
||||
import { utilEditDistance } from '../util';
|
||||
|
||||
|
||||
//
|
||||
@@ -45,7 +46,7 @@ export function presetCollection(collection) {
|
||||
return _this.item(id);
|
||||
};
|
||||
|
||||
_this.search = (value, geometry, countryCode) => {
|
||||
_this.search = (value, geometry, countryCodes) => {
|
||||
if (!value) return _this;
|
||||
|
||||
value = value.toLowerCase().trim();
|
||||
@@ -83,10 +84,13 @@ export function presetCollection(collection) {
|
||||
}
|
||||
|
||||
let pool = _this.collection;
|
||||
if (countryCode) {
|
||||
if (countryCodes) {
|
||||
if (typeof countryCodes === 'string') countryCodes = [countryCodes];
|
||||
countryCodes = countryCodes.map(code => code.toLowerCase());
|
||||
|
||||
pool = pool.filter(a => {
|
||||
if (a.countryCodes && a.countryCodes.indexOf(countryCode) === -1) return false;
|
||||
if (a.notCountryCodes && a.notCountryCodes.indexOf(countryCode) !== -1) return false;
|
||||
if (a.countryCodes && !utilArrayIntersection(a.countryCodes, countryCodes).length) return false;
|
||||
if (a.notCountryCodes && utilArrayIntersection(a.notCountryCodes, countryCodes).length) return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
+6
-7
@@ -9,6 +9,7 @@ import { geoExtent } from '../geo/extent';
|
||||
import { uiFieldHelp } from './field_help';
|
||||
import { uiFields } from './fields';
|
||||
import { uiTagReference } from './tag_reference';
|
||||
import { utilArrayIntersection } from '../util/array';
|
||||
import { utilRebind, utilUniqueDomId } from '../util';
|
||||
|
||||
|
||||
@@ -306,16 +307,14 @@ export function uiField(context, presetField, entityIDs, options) {
|
||||
if (!extent) return true;
|
||||
|
||||
var center = extent.center();
|
||||
var countryCode = countryCoder.iso1A2Code(center);
|
||||
var codes = countryCoder.iso1A2Codes(center).map(function(code) {
|
||||
return code.toLowerCase();
|
||||
});
|
||||
|
||||
if (!countryCode) return false;
|
||||
|
||||
countryCode = countryCode.toLowerCase();
|
||||
|
||||
if (field.countryCodes && field.countryCodes.indexOf(countryCode) === -1) {
|
||||
if (field.countryCodes && !utilArrayIntersection(codes, field.countryCodes).length) {
|
||||
return false;
|
||||
}
|
||||
if (field.notCountryCodes && field.notCountryCodes.indexOf(countryCode) !== -1) {
|
||||
if (field.notCountryCodes && utilArrayIntersection(codes, field.notCountryCodes).length) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,9 +98,9 @@ export function uiPresetList(context) {
|
||||
var results, messageText;
|
||||
if (value.length && extent) {
|
||||
var center = extent.center();
|
||||
var countryCode = countryCoder.iso1A2Code(center);
|
||||
var countryCodes = countryCoder.iso1A2Codes(center);
|
||||
|
||||
results = presets.search(value, entityGeometries()[0], countryCode && countryCode.toLowerCase());
|
||||
results = presets.search(value, entityGeometries()[0], countryCodes);
|
||||
messageText = t('inspector.results', {
|
||||
n: results.collection.length,
|
||||
search: value
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@
|
||||
"translations": "node scripts/update_locales.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ideditor/country-coder": "^3.2.0",
|
||||
"@ideditor/country-coder": "^4.0.0",
|
||||
"@ideditor/location-conflation": "~0.5.0",
|
||||
"@mapbox/sexagesimal": "1.2.0",
|
||||
"@mapbox/togeojson": "0.16.0",
|
||||
@@ -106,7 +106,7 @@
|
||||
"phantomjs-prebuilt": "~2.1.11",
|
||||
"postcss": "^8.1.1",
|
||||
"postcss-selector-prepend": "^0.5.0",
|
||||
"rollup": "~2.31.0",
|
||||
"rollup": "~2.32.0",
|
||||
"rollup-plugin-includepaths": "~0.2.3",
|
||||
"rollup-plugin-progress": "^1.1.1",
|
||||
"rollup-plugin-visualizer": "~4.1.1",
|
||||
|
||||
Reference in New Issue
Block a user