mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 07:46:58 +02:00
Add Speed Limit Enforcement relation preset (close #7234)
Remove Name field from Enforcement preset
This commit is contained in:
@@ -95,6 +95,7 @@ _Breaking changes, which may affect downstream projects or sites that embed iD,
|
||||
* Add Gambling Hall preset ([#7198])
|
||||
* Add Secondhand Clothing Store preset ([#7164])
|
||||
* Add Public Prosecutor's Office preset ([#7225])
|
||||
* Add Speed Limit Enforcement preset ([#7234])
|
||||
* Add presets: Emergency Exit, Geyser, Used Car Dealership, Wedding Clothes Store, Backcountry Camping Area, Group Camping Area, History Museum
|
||||
* Rename "Anime Shop" to "Anime / Manga Shop" ([#7223])
|
||||
* Update Arts & Crafts Store icon ([#7228])
|
||||
@@ -115,6 +116,7 @@ _Breaking changes, which may affect downstream projects or sites that embed iD,
|
||||
* Show the Website field by default on Restaurants ([#7226])
|
||||
* Show the Hours field by default on Pharmacy Counters ([#7220])
|
||||
|
||||
[#7234]: https://github.com/openstreetmap/iD/issues/7234
|
||||
[#7192]: https://github.com/openstreetmap/iD/issues/7192
|
||||
[#7219]: https://github.com/openstreetmap/iD/issues/7219
|
||||
[#7208]: https://github.com/openstreetmap/iD/issues/7208
|
||||
|
||||
@@ -8462,6 +8462,11 @@ en:
|
||||
# type=enforcement
|
||||
name: Enforcement
|
||||
terms: '<translate with synonyms or related terms for ''Enforcement'', separated by commas>'
|
||||
type/enforcement/maxspeed:
|
||||
# 'type=enforcement, enforcement=maxspeed'
|
||||
name: Speed Limit Enforcement
|
||||
# 'terms: maxspeed,radar,speed camera'
|
||||
terms: '<translate with synonyms or related terms for ''Speed Limit Enforcement'', separated by commas>'
|
||||
type/multipolygon:
|
||||
# type=multipolygon
|
||||
name: Multipolygon
|
||||
|
||||
@@ -1246,7 +1246,8 @@
|
||||
"type/boundary": {"icon": "iD-boundary", "fields": ["name", "boundary"], "geometry": ["relation"], "tags": {"type": "boundary"}, "name": "Boundary"},
|
||||
"type/boundary/administrative": {"icon": "iD-boundary", "fields": ["name", "admin_level"], "moreFields": ["gnis/feature_id"], "geometry": ["relation"], "tags": {"type": "boundary", "boundary": "administrative"}, "reference": {"key": "boundary", "value": "administrative"}, "name": "Administrative Boundary"},
|
||||
"type/connectivity": {"icon": "iD-relation", "fields": ["connectivity"], "geometry": ["relation"], "tags": {"type": "connectivity"}, "name": "Lane Connectivity"},
|
||||
"type/enforcement": {"icon": "iD-relation", "fields": ["name", "enforcement"], "geometry": ["relation"], "tags": {"type": "enforcement"}, "name": "Enforcement"},
|
||||
"type/enforcement": {"icon": "iD-relation", "fields": ["enforcement"], "geometry": ["relation"], "tags": {"type": "enforcement"}, "name": "Enforcement"},
|
||||
"type/enforcement/maxspeed": {"icon": "iD-relation", "fields": ["maxspeed"], "geometry": ["relation"], "tags": {"type": "enforcement", "enforcement": "maxspeed"}, "reference": {"key": "enforcement", "value": "maxspeed"}, "terms": ["maxspeed", "radar", "speed camera"], "name": "Speed Limit Enforcement"},
|
||||
"type/public_transport/stop_area_group": {"icon": "iD-relation", "fields": ["name", "ref", "network", "operator"], "geometry": ["relation"], "tags": {"type": "public_transport", "public_transport": "stop_area_group"}, "reference": {"key": "public_transport", "value": "stop_area_group"}, "name": "Transit Stop Area Group"},
|
||||
"type/restriction": {"icon": "iD-restriction", "fields": ["restriction", "except"], "geometry": ["relation"], "tags": {"type": "restriction"}, "name": "Restriction"},
|
||||
"type/restriction/no_left_turn": {"icon": "iD-restriction-no-left-turn", "geometry": ["relation"], "tags": {"type": "restriction", "restriction": "no_left_turn"}, "name": "No Left Turn"},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"icon": "iD-relation",
|
||||
"fields": [
|
||||
"name",
|
||||
"enforcement"
|
||||
],
|
||||
"geometry": [
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"icon": "iD-relation",
|
||||
"fields": [
|
||||
"maxspeed"
|
||||
],
|
||||
"geometry": [
|
||||
"relation"
|
||||
],
|
||||
"tags": {
|
||||
"type": "enforcement",
|
||||
"enforcement": "maxspeed"
|
||||
},
|
||||
"reference": {
|
||||
"key": "enforcement",
|
||||
"value": "maxspeed"
|
||||
},
|
||||
"terms": [
|
||||
"maxspeed",
|
||||
"radar",
|
||||
"speed camera"
|
||||
],
|
||||
"name": "Speed Limit Enforcement"
|
||||
}
|
||||
@@ -1184,6 +1184,7 @@
|
||||
{"key": "type", "value": "boundary", "description": "🄿 Boundary", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/boundary.svg"},
|
||||
{"key": "type", "value": "connectivity", "description": "🄿 Lane Connectivity", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/relation.svg"},
|
||||
{"key": "type", "value": "enforcement", "description": "🄿 Enforcement", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/relation.svg"},
|
||||
{"key": "enforcement", "value": "maxspeed", "description": "🄿 Speed Limit Enforcement", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/relation.svg"},
|
||||
{"key": "public_transport", "value": "stop_area_group", "description": "🄿 Transit Stop Area Group", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/relation.svg"},
|
||||
{"key": "type", "value": "restriction", "description": "🄿 Restriction", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/restriction.svg"},
|
||||
{"key": "restriction", "value": "no_left_turn", "description": "🄿 No Left Turn", "object_types": ["relation"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@master/svg/iD-sprite/presets/restriction-no-left-turn.svg"},
|
||||
|
||||
Vendored
+4
@@ -9777,6 +9777,10 @@
|
||||
"name": "Enforcement",
|
||||
"terms": ""
|
||||
},
|
||||
"type/enforcement/maxspeed": {
|
||||
"name": "Speed Limit Enforcement",
|
||||
"terms": "maxspeed,radar,speed camera"
|
||||
},
|
||||
"type/public_transport/stop_area_group": {
|
||||
"name": "Transit Stop Area Group",
|
||||
"terms": ""
|
||||
|
||||
@@ -48,13 +48,7 @@ export function uiFieldMaxspeed(field, context) {
|
||||
.on('change', change)
|
||||
.on('blur', change);
|
||||
|
||||
var loc;
|
||||
if (_entity.type === 'node') {
|
||||
loc = _entity.loc;
|
||||
} else {
|
||||
var childNodes = context.graph().childNodes(context.entity(_entity.id));
|
||||
loc = childNodes[~~(childNodes.length/2)].loc;
|
||||
}
|
||||
var loc = _entity.extent(context.graph()).center();
|
||||
|
||||
_isImperial = countryCoder.roadSpeedUnit(loc) === 'mph';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user