This commit is contained in:
animesh-007
2020-05-20 20:32:48 +05:30
114 changed files with 1804 additions and 1230 deletions
+39 -12
View File
@@ -211,16 +211,26 @@
.layer-mapillary-detections .icon-detected rect {
fill: none;
}
.layer-mapillary-detections .icon-detected:hover rect {
.layer-mapillary-detections .icon-detected:active {
opacity: 1;
}
.layer-mapillary-detections .icon-detected:active rect {
outline: 3px solid rgba(255, 238, 0, 0.6);
}
@media (hover: hover) {
.layer-mapillary-detections .icon-detected:hover {
opacity: 1;
}
.layer-mapillary-detections .icon-detected:hover rect {
outline: 3px solid rgba(255, 238, 0, 0.6);
}
}
.layer-mapillary-detections .icon-detected.currentView {
opacity: 1;
}
.layer-mapillary-detections .icon-detected.currentView rect {
outline: 3px solid rgba(255, 238, 0, 1);
}
.layer-mapillary-detections .icon-detected:hover,
.layer-mapillary-detections .icon-detected.currentView {
opacity: 1;
}
/* OpenStreetCam Image Layer */
@@ -254,10 +264,14 @@
text-align: right;
}
.ms-wrapper .photo-attribution a:active,
.ms-wrapper .photo-attribution a:hover {
.ms-wrapper .photo-attribution a:active {
color: #0fffc4;
}
@media (hover: hover) {
.ms-wrapper .photo-attribution a:hover {
color: #0fffc4;
}
}
.ms-wrapper .pnlm-compass.pnlm-control {
width: 26px;
@@ -295,10 +309,14 @@ label.streetside-hires {
display: none;
}
.mly-wrapper .photo-attribution a:active,
.mly-wrapper .photo-attribution a:hover {
.mly-wrapper .photo-attribution a:active {
color: #35af6d;
}
@media (hover: hover) {
.mly-wrapper .photo-attribution a:hover {
color: #35af6d;
}
}
.mly-wrapper .mapillary-js-dom {
z-index: 9;
@@ -314,10 +332,14 @@ label.streetside-hires {
background-repeat: no-repeat;
}
.osc-wrapper .photo-attribution a:active,
.osc-wrapper .photo-attribution a:hover {
.osc-wrapper .photo-attribution a:active {
color: #20c4ff;
}
@media (hover: hover) {
.osc-wrapper .photo-attribution a:hover {
color: #20c4ff;
}
}
.osc-image-wrap {
width: 100%;
@@ -358,8 +380,13 @@ label.streetside-hires {
.photo-controls button:last-of-type {
border-radius: 0 3px 3px 0;
}
.photo-controls button:hover,
.photo-controls button:active {
background: rgba(0,0,0,0.85);
color: #fff;
}
@media (hover: hover) {
.photo-controls button:hover {
background: rgba(0,0,0,0.85);
color: #fff;
}
}
+243 -129
View File
@@ -126,11 +126,15 @@ em {
strong {
font-weight: bold;
}
a:visited, a {
a,
a:visited,
a:active {
color: #7092ff;
}
a:hover {
color: #597be7;
@media (hover: hover) {
a:hover {
color: #597be7;
}
}
kbd {
display: inline-block;
@@ -183,6 +187,8 @@ input[type=email] {
padding: 5px 10px 5px 20px;
}
textarea:active,
input:active,
textarea:focus,
input:focus {
background-color: #f1f1f1;
@@ -308,9 +314,14 @@ button {
}
button:focus,
button:hover {
button:active {
background-color: #ececec;
}
@media (hover: hover) {
button:hover {
background-color: #ececec;
}
}
button.active {
background: #7092ff;
}
@@ -353,26 +364,39 @@ button.action {
color: #fff;
}
button.action:focus,
button.action:hover {
button.action:active {
background: #597be7;
}
button.secondary-action {
background: #ececec;
}
button.secondary-action:focus,
button.secondary-action:hover {
button.secondary-action:active {
background: #cccccc;
}
button.action.disabled,
button.action.disabled:hover,
button[disabled].action,
button[disabled].action:hover {
button[disabled].action {
background: #cccccc;
color: #888;
cursor: not-allowed;
}
@media (hover: hover) {
button.action:hover {
background: #597be7;
}
button.secondary-action:hover {
background: #cccccc;
}
button.action.disabled:hover,
button[disabled].action:hover {
background: #cccccc;
color: #888;
cursor: not-allowed;
}
}
/* Icons
------------------------------------------------------- */
@@ -897,10 +921,14 @@ a.hide-toggle {
.ideditor[dir='rtl'] .geocode-item {
left: -25%;
}
.geocode-item:hover {
.geocode-item:active {
background-color: #aaa;
}
@media (hover: hover) {
.geocode-item:hover {
background-color: #aaa;
}
}
.feature-list-item {
background-color: #fff;
@@ -909,9 +937,14 @@ a.hide-toggle {
line-height: 20px;
display: flex;
}
.feature-list-item:hover {
.feature-list-item:active {
background-color: #ececec;
}
@media (hover: hover) {
.feature-list-item:hover {
background-color: #ececec;
}
}
.feature-list-item button {
background: transparent;
}
@@ -940,9 +973,14 @@ a.hide-toggle {
.feature-list-item .entity-type {
color: #7092ff;
}
.feature-list-item:hover .entity-type {
.feature-list-item:active .entity-type {
color: #597be7;
}
@media (hover: hover) {
.feature-list-item:hover .entity-type {
color: #597be7;
}
}
.feature-list-item .entity-name {
font-weight: normal;
color: #666;
@@ -1169,12 +1207,17 @@ a.hide-toggle {
font-weight: normal;
}
.preset-list-button:hover .label,
.preset-list-button:focus .label,
.preset-list-button:active .label,
.preset-list-button.disabled,
.preset-list-button.disabled .label {
background-color: #ececec;
}
@media (hover: hover) {
.preset-list-button:hover .label {
background-color: #ececec;
}
}
.preset-list-item button.tag-reference-button {
height: 100%;
@@ -1194,10 +1237,14 @@ a.hide-toggle {
.ideditor[dir='rtl'] .preset-list-item button:last-child {
border-radius: 4px 0 0 4px;
}
.preset-list-item button.tag-reference-button:hover {
.preset-list-item button.tag-reference-button:active {
background: #f1f1f1;
}
@media (hover: hover) {
.preset-list-item button.tag-reference-button:hover {
background: #f1f1f1;
}
}
.preset-list-item button.tag-reference-button .icon {
opacity: .5;
}
@@ -1352,9 +1399,14 @@ a.hide-toggle {
border-left: none;
border-right: 1px solid #ccc;
}
.field-label button:hover {
.field-label button:active {
background: #f1f1f1;
}
@media (hover: hover) {
.field-label button:hover {
background: #f1f1f1;
}
}
.field-label .icon {
opacity: .5;
}
@@ -1420,9 +1472,14 @@ a.hide-toggle {
border-left-width: 1px;
border-right-width: 0;
}
.form-field-button:hover {
.form-field-button:active {
background-color: #f1f1f1;
}
@media (hover: hover) {
.form-field-button:hover {
background-color: #f1f1f1;
}
}
.form-field-button .icon {
fill: #333;
opacity: .5;
@@ -1706,10 +1763,14 @@ a.hide-toggle {
.form-field-input-check > .reverser.button.hide {
display: none;
}
.form-field-input-check:hover {
.form-field-input-check:active {
background: #f1f1f1;
}
@media (hover: hover) {
.form-field-input-check:hover {
background: #f1f1f1;
}
}
.form-field-input-check .set {
color: inherit;
}
@@ -1742,9 +1803,14 @@ a.hide-toggle {
.form-field-input-radio > label:last-child {
border-radius: 0 0 4px 4px;
}
.form-field-input-radio > label:hover {
.form-field-input-radio > label:active {
background-color: #ececec;
}
@media (hover: hover) {
.form-field-input-radio > label:hover {
background-color: #ececec;
}
}
.form-field-input-radio > label.active {
background-color: #e8ebff;
}
@@ -2082,9 +2148,14 @@ div.combobox {
}
.combobox a.selected,
.combobox a:hover {
.combobox a:active {
background: #ececec;
}
@media (hover: hover) {
.combobox a:hover {
background: #ececec;
}
}
.combobox a:first-child {
border-top: 0;
@@ -2161,10 +2232,16 @@ div.combobox {
color: #7092ff;
border-bottom: 2px solid;
}
.field-help-nav-item:hover {
.field-help-nav-item:active {
color: #597be7;
background-color: #efefef;
}
@media (hover: hover) {
.field-help-nav-item:hover {
color: #597be7;
background-color: #efefef;
}
}
.field-help-content {
padding: 10px;
@@ -2266,11 +2343,16 @@ button.raw-tag-option {
margin: 0 3px;
}
button.raw-tag-option:focus,
button.raw-tag-option:hover,
button.raw-tag-option.active {
color: #fff;
background: #597be7;
}
@media (hover: hover) {
button.raw-tag-option:hover {
color: #fff;
background: #597be7;
}
}
button.raw-tag-option.selected {
color: #fff;
background: #7092ff;
@@ -2378,9 +2460,14 @@ button.raw-tag-option svg.icon {
border-right-width: 0;
}
.tag-row button:hover {
.tag-row button:active {
background: #f1f1f1;
}
@media (hover: hover) {
.tag-row button:hover {
background: #f1f1f1;
}
}
.tag-row button .icon {
opacity: .5;
}
@@ -2560,9 +2647,14 @@ input.key-trap {
background: rgba(0,0,0,.5);
}
.add-row button:focus,
.add-row button:hover {
.add-row button:active {
background: rgba(0,0,0,.8);
}
@media (hover: hover) {
.add-row button:hover {
background: rgba(0,0,0,.8);
}
}
.add-tag {
border-radius: 0 0 4px 4px;
@@ -2826,15 +2918,22 @@ input.key-trap {
border-radius: 0;
}
.map-control > button:not(.disabled):hover,
.map-control > button:not(.disabled):focus {
.map-control > button:not(.disabled):focus,
.map-control > button:not(.disabled):active {
background: rgba(0, 0, 0, .8);
}
.map-control > button.active,
.map-control > button.active:hover {
.map-control > button.active:active {
background: #7092ff;
}
@media (hover: hover) {
.map-control > button:not(.disabled):hover {
background: rgba(0, 0, 0, .8);
}
.map-control > button.active:hover {
background: #7092ff;
}
}
.map-control > button.disabled .icon {
color: rgba(255, 255, 255, 0.5);
@@ -2859,10 +2958,14 @@ div.full-screen > button, div.full-screen > button.active {
height: 40px;
background: transparent;
}
div.full-screen > button:hover {
div.full-screen > button:active {
background-color: rgba(0, 0, 0, .8);
}
@media (hover: hover) {
div.full-screen > button:hover {
background-color: rgba(0, 0, 0, .8);
}
}
/* Map Controls
@@ -2953,9 +3056,14 @@ div.full-screen > button:hover {
.layer-list li:not(:last-child) {
border-bottom: 1px solid #ccc;
}
.layer-list li:hover {
.layer-list li:active {
background-color: #ececec;
}
@media (hover: hover) {
.layer-list li:hover {
background-color: #ececec;
}
}
.layer-list li.active button,
.layer-list li.switch button,
@@ -3092,10 +3200,15 @@ button.autofix.action {
color: #fff;
}
button.autofix.action:focus,
button.autofix.action:hover,
button.autofix.action:active,
button.autofix.action.active {
background: #597be7;
}
@media (hover: hover) {
button.autofix.action:hover {
background: #597be7;
}
}
/* fix all */
.autofix-all {
@@ -3135,11 +3248,6 @@ button.autofix.action.active {
background: #ffa;
}
.warnings-list .issue.severity-warning .issue-label:hover,
.issue.severity-warning .issue-fix-item.actionable:hover {
background: #ff8;
}
.issue.severity-warning .issue-icon {
color: #f90;
}
@@ -3148,15 +3256,26 @@ button.autofix.action.active {
.issue-container.active .issue.severity-warning .issue-info-button {
color: #b15500;
fill: #b15500;
/*color: #7092ff;*/
/*fill: #7092ff;*/
}
.issue.severity-warning .issue-fix-item.actionable:hover,
.issue-container.active .issue.severity-warning .issue-info-button:hover {
.warnings-list .issue.severity-warning .issue-label:active,
.issue.severity-warning .issue-fix-item.actionable:active {
background: #ff8;
}
.issue.severity-warning .issue-fix-item.actionable:active,
.issue-container.active .issue.severity-warning .issue-info-button:active {
color: #7f3d00;
fill: #7f3d00;
/*color: #597be7;*/
/*fill: #597be7;*/
}
@media (hover: hover) {
.warnings-list .issue.severity-warning .issue-label:hover,
.issue.severity-warning .issue-fix-item.actionable:hover {
background: #ff8;
}
.issue.severity-warning .issue-fix-item.actionable:hover,
.issue-container.active .issue.severity-warning .issue-info-button:hover {
color: #7f3d00;
fill: #7f3d00;
}
}
@@ -3178,28 +3297,33 @@ button.autofix.action.active {
background: #ffc6c6;
}
.errors-list .issue.severity-error .issue-label:hover,
.issue.severity-error .issue-fix-item.actionable:hover {
background: #ffb6b6;
}
.issue.severity-error .issue-icon {
color: #dd1400;
}
.issue.severity-error .issue-fix-item.actionable,
.issue-container.active .issue.severity-error .issue-info-button {
color: #b91201;
fill: #b91201;
/*color: #7092ff;*/
/*fill: #7092ff;*/
}
.issue.severity-error .issue-fix-item.actionable:hover,
.issue-container.active .issue.severity-error .issue-info-button:hover {
.issue.severity-error .issue-icon {
color: #dd1400;
}
.errors-list .issue.severity-error .issue-label:active,
.issue.severity-error .issue-fix-item.actionable:active {
background: #ffb6b6;
}
.issue.severity-error .issue-fix-item.actionable:active,
.issue-container.active .issue.severity-error .issue-info-button:active {
color: #840c00;
fill: #840c00;
/*color: #597be7;*/
/*fill: #597be7;*/
}
@media (hover: hover) {
.errors-list .issue.severity-error .issue-label:hover,
.issue.severity-error .issue-fix-item.actionable:hover {
background: #ffb6b6;
}
.issue.severity-error .issue-fix-item.actionable:hover,
.issue-container.active .issue.severity-error .issue-info-button:hover {
color: #840c00;
fill: #840c00;
}
}
@@ -3272,10 +3396,16 @@ input.square-degrees-input {
border: 1px solid #ccc;
background: #f6f6f6;
}
.section-entity-issues .issue-container:not(.active) .issue-text:hover,
.section-entity-issues .issue-container:not(.active) .issue-info-button:hover {
.section-entity-issues .issue-container:not(.active) .issue-text:active,
.section-entity-issues .issue-container:not(.active) .issue-info-button:active {
background: #f1f1f1;
}
@media (hover: hover) {
.section-entity-issues .issue-container:not(.active) .issue-text:hover,
.section-entity-issues .issue-container:not(.active) .issue-info-button:hover {
background: #f1f1f1;
}
}
.section-entity-issues .issue .issue-label .issue-text {
padding-right: 10px;
}
@@ -3633,11 +3763,16 @@ li.issue-fix-item:not(.actionable) .fix-icon {
.help-pane .toc li a {
border-bottom: 0;
}
.help-pane .toc li a:hover,
.help-pane .nav a:hover {
.help-pane .toc li a:active,
.help-pane .nav a:active {
background: #ececec;
}
@media (hover: hover) {
.help-pane .toc li a:hover,
.help-pane .nav a:hover {
background: #ececec;
}
}
.help-pane .toc li a.selected {
background: #e8ebff;
@@ -4098,10 +4233,14 @@ img.tile-debug {
.ideditor[dir='rtl'] .panel-title button.close {
float: left;
}
.panel-title button.close:hover {
.panel-title button.close:active {
color: #fff;
}
@media (hover: hover) {
.panel-title button.close:hover {
color: #fff;
}
}
.panel-title button.close .icon {
height: 20px;
width: 16px;
@@ -4227,10 +4366,14 @@ img.tile-debug {
.attribution-wrap .attribution a:visited {
color: #ccf;
}
.attribution-wrap .attribution a:hover {
color: #aaf;
}
@media (hover: hover) {
.attribution-wrap .attribution a:hover {
color: #aaf;
}
}
.attribution-wrap .attribution .source-image {
height: 20px;
@@ -4305,15 +4448,12 @@ img.tile-debug {
.scale-block .scale {
height: 30px;
width: 100%;
cursor: pointer;
}
.ideditor[dir='rtl'] .scale-block .scale {
transform: scaleX(-1);
}
.scale-block .scale:hover {
cursor: pointer;
}
.scale-block .scale text {
font: 12px sans-serif;
stroke: none;
@@ -4444,9 +4584,14 @@ img.tile-debug {
color: #ccc;
pointer-events: all;
}
.api-status a:hover {
.api-status a:active {
color: inherit;
}
@media (hover: hover) {
.api-status a:hover {
color: inherit;
}
}
/* Notification Badges
------------------------------------------------------- */
@@ -4591,9 +4736,6 @@ img.tile-debug {
text-align: center;
width: 100%;
}
.modal-actions button:hover {
background-color: #ececec;
}
.logo-small {
height: 40px;
@@ -4757,10 +4899,16 @@ img.tile-debug {
color: #7092ff;
border-bottom: 2px solid;
}
.modal-shortcuts .tab:hover {
.modal-shortcuts .tab:active {
color: #597be7;
background-color: #efefef;
}
@media (hover: hover) {
.modal-shortcuts .tab:hover {
color: #597be7;
background-color: #efefef;
}
}
.modal-shortcuts .shortcut-tab {
display: flex;
@@ -4903,10 +5051,14 @@ svg.mouseclick use.right {
padding: 5px 10px;
cursor: pointer;
}
.ideditor.mode-save .changeset-list li:hover {
.ideditor.mode-save .changeset-list li:active {
background-color: #ececec;
}
@media (hover: hover) {
.ideditor.mode-save .changeset-list li:hover {
background-color: #ececec;
}
}
.ideditor.mode-save .changeset-list .alert {
opacity: 0.5;
@@ -4992,10 +5144,15 @@ svg.mouseclick use.right {
border-radius: 8px;
}
.notice .zoom-to:hover,
.notice .zoom-to:focus {
.notice .zoom-to:focus,
.notice .zoom-to:active {
background: rgba(0,0,0,0.6);
}
@media (hover: hover) {
.notice .zoom-to:hover {
background: rgba(0,0,0,0.6);
}
}
.notice .zoom-to .icon {
width: 30px;
@@ -5084,53 +5241,6 @@ svg.mouseclick use.right {
background-color: #fff;
}
.tail {
width: 200px;
height: 400px;
pointer-events: none;
opacity: .8;
margin-top: -200px;
position: absolute;
background: transparent;
}
.tail::after {
content: "";
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
top: 50%;
right: -5px;
margin-top: -5px;
border-left-color: #fff;
border-width: 5px 0 5px 5px;
}
.tail div {
border-radius: 3px;
padding: 10px;
background: #fff;
position: absolute;
top: 180px;
left: 0;
right: 0;
margin: auto;
}
.left.tail::after {
content: "";
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
top: 50%;
left: -5px;
margin-top: -5px;
border-right-color: #fff;
border-width: 5px 5px 5px 0;
}
.popover-arrow {
position: absolute;
width: 0;
@@ -5332,10 +5442,14 @@ li.hide + li.version .badge .tooltip .popover-arrow {
border-width: 3px 3px 3px 4px;
border-radius: 6px;
}
::-webkit-scrollbar-track:hover,
::-webkit-scrollbar-track:active {
background-color: rgba(0,0,0,.05);
}
@media (hover: hover) {
::-webkit-scrollbar-track:hover {
background-color: rgba(0,0,0,.05);
}
}
/* Intro walkthrough
+31 -17
View File
@@ -33,33 +33,25 @@ en:
add_area:
title: Area
description: "Add parks, buildings, lakes or other areas to the map."
tail: "Click on the map to start drawing an area, like a park, lake, or building."
filter_tooltip: areas
add_line:
title: Line
description: "Add highways, streets, pedestrian paths, canals or other lines to the map."
tail: "Click on the map to start drawing a road, path, or route."
filter_tooltip: lines
add_point:
title: Point
description: "Add restaurants, monuments, postal boxes or other points to the map."
tail: Click on the map to add a point.
filter_tooltip: points
add_note:
title: Note
label: Add Note
description: "Spotted an issue? Let other mappers know."
tail: Click on the map to add a note.
key: N
add_preset:
title: "Add {feature}"
browse:
title: Browse
description: Pan and zoom the map.
draw_area:
tail: Click to add nodes to your area. Click the first node to finish the area.
draw_line:
tail: "Click to add more nodes to the line. Click on other lines to connect to them, and double-click to end the line."
drag_node:
connected_to_hidden: This can't be edited because it is connected to a hidden feature.
operations:
@@ -88,6 +80,26 @@ en:
annotation: Changed the role of a relation member.
change_tags:
annotation: Changed tags.
copy:
title: Copy
description:
single: Set this feature for pasting.
multiple: Set these features for pasting.
annotation:
single: Copied a feature.
multiple: "Copied {n} features."
too_large:
single: This can't be copied because not enough of it is currently visible.
multiple: These can't be copied because not enough of them are currently visible.
paste:
title: Paste
description:
single: "Add a duplicate {feature} here."
multiple: "Add {n} duplicate features here."
annotation:
single: Pasted a feature.
multiple: "Pasted {n} features."
nothing_copied: No features have been copied.
circularize:
title: Circularize
description:
@@ -377,6 +389,8 @@ en:
description:
vertex:
single: Extract this point from its parent lines/areas.
line:
single: Extract a point from this line.
area:
single: Extract a point from this area.
annotation:
@@ -739,7 +753,7 @@ en:
custom_background:
tooltip: Edit custom background
header: Custom Background Settings
instructions: "Enter a tile URL template. Valid tokens are:\n {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n {-y} or {ty} for flipped TMS-style Y coordinates\n {u} for quadtile scheme\n {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}"
instructions: "Enter a tile URL template below.\n\nSupported WMS tokens:\n `{proj}`: requested projection (`EPSG:3857` only)\n `{wkid}`: same as proj, but without the EPSG (`3857` only)\n `{width}`, `{height}`: requested image dimensions (`256` only)\n `{bbox}`: requested bounding box (e.g. `minX,minY,maxX,maxY`)\n\nSupported TMS tokens:\n `{zoom}` or `{z}, `{x}`, `{y}`: Z/X/Y tile coordinates\n `{-y}` or `{ty}`: flipped TMS-style Y coordinates\n `{switch:a,b,c}`: DNS server multiplexing\n `{u}`: quadtile (Bing) scheme\n\nExample:\n{example}"
template:
placeholder: Enter a url template
custom_data:
@@ -1844,18 +1858,15 @@ en:
welcome: "Welcome! This walkthrough will teach you the basics of editing on OpenStreetMap."
practice: "All of the data in this walkthrough is just for practicing, and any edits that you make in the walkthrough will not be saved."
words: "This walkthrough will introduce some new words and concepts. When we introduce a new word, we'll use *italics*."
mouse: "You can use any input device to edit the map, but this walkthrough assumes you have a mouse with left and right buttons. **If you want to attach a mouse, do so now, then click OK.**"
leftclick: "When this tutorial asks you to click or double-click, we mean with the left button. On a trackpad it might be a single-click or single-finger tap. **Left-click {num} times.**"
rightclick: "Sometimes we'll also ask you to right-click. This might be the same as control-click, or two-finger tap on a trackpad. Your keyboard might even have a 'menu' key that works like right-click. **Right-click {num} times.**"
chapters: "So far, so good! You can use the buttons below to skip chapters at any time or to restart a chapter if you get stuck. Let's begin! **Click '{next}' to continue.**"
chapters: "You can use the buttons below to skip chapters at any time or to restart a chapter if you get stuck. Let's begin! **Press '{next}' to continue.**"
navigation:
title: "Navigation"
drag: "The main map area shows OpenStreetMap data on top of a background.{br}You can drag the map by pressing and holding the left mouse button while moving the mouse around. You can also use the arrow keys on your keyboard. **Drag the map!**"
zoom: "You can zoom in or out by scrolling with the mouse wheel or trackpad, or by clicking the {plus} / {minus} buttons. **Zoom the map!**"
drag: "The main map area shows OpenStreetMap data on top of a background.{br}You can click-and-drag or tap-and-drag the map to move it around. You can also use the arrow keys on a keyboard. **Drag the map!**"
zoom: "You can zoom in or out by scrolling with a mouse wheel, pinching on a touchscreen, or pressing the {plus} / {minus} buttons. **Zoom the map!**"
features: "We use the word *features* to describe the things that appear on the map. Anything in the real world can be mapped as a feature on OpenStreetMap."
points_lines_areas: "Map features are represented using *points, lines, or areas.*"
nodes_ways: "In OpenStreetMap, points are sometimes called *nodes*, and lines and areas are sometimes called *ways*."
click_townhall: "All features on the map can be selected by clicking on them. **Click on the point to select it.**"
click_townhall: "All features on the map can be selected by clicking or tapping on them. **Select the point.**"
selected_townhall: "Great! The point is now selected. Selected features are drawn with a pulsing glow."
editor_townhall: "When a feature is selected, the *feature editor* is displayed alongside the map."
preset_townhall: "The top part of the feature editor shows the feature's type. This point is a {preset}."
@@ -1865,7 +1876,7 @@ en:
choose_street: "**Choose {name} from the list to select it.**"
selected_street: "Great! {name} is now selected."
editor_street: "The fields shown for a street are different than the fields that were shown for the town hall.{br}For this selected street, the feature editor shows fields like '{field1}' and '{field2}'. **Close the feature editor by hitting escape or pressing the {button} button.**"
play: "Try moving the map and clicking on some other features to see what kinds of things can be added to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**"
play: "Try exploring the map and selecting some other features to see what kinds of things can be added to OpenStreetMap. **When you are ready to continue to the next chapter, press '{next}'.**"
points:
title: "Points"
add_point: "*Points* can be used to represent features such as shops, restaurants, and monuments.{br}They mark a specific location, and describe what's there. **Click the {button} Point button to add a new point.**"
@@ -1968,6 +1979,7 @@ en:
enter: Enter
esc: Esc
home: Home
menu: Menu
option: Option
pause: Pause
pgdn: PgDn
@@ -2041,6 +2053,8 @@ en:
split: "Split a line into two at the selected node"
reverse: "Reverse selected features"
move: "Move selected features"
nudge: "Nudge selected features"
nudge_more: "Nudge selected features by a lot"
rotate: "Rotate selected features"
orthogonalize: "Square corners of a line or area"
straighten: "Straighten a line or points"
+91 -4
View File
@@ -95,6 +95,10 @@
"old": {"amenity": "garages"},
"replace": {"landuse": "garages"}
},
{
"old": {"amenity": "givebox"},
"replace": {"amenity": "give_box"}
},
{
"old": {"amenity": "gym"},
"replace": {"leisure": "fitness_centre"}
@@ -283,6 +287,13 @@
"old": {"company": "consulting"},
"replace": {"office": "consulting"}
},
{
"old": {"content": "unknown"}
},
{
"old": {"contents": "*"},
"replace": {"content": "$1"}
},
{
"old": {"craft": "catering"},
"replace": {"craft": "caterer"}
@@ -622,6 +633,14 @@
"old": {"kerb": "flat"},
"replace": {"kerb": "flush"}
},
{
"old": {"landcover": "flower_bed"},
"replace": {"landuse": "flowerbed"}
},
{
"old": {"landcover": "flowerbed"},
"replace": {"landuse": "flowerbed"}
},
{
"old": {"landuse": "basin"},
"replace": {"natural": "water", "water": "basin"}
@@ -718,6 +737,18 @@
"old": {"man_made": "cut_line"},
"replace": {"man_made": "cutline"}
},
{
"old": {"man_made": "flower_bed"},
"replace": {"landuse": "flowerbed"}
},
{
"old": {"man_made": "flowerbed"},
"replace": {"landuse": "flowerbed"}
},
{
"old": {"man_made": "fuel_storage_tank"},
"replace": {"man_made": "storage_tank", "content": "fuel"}
},
{
"old": {"man_made": "gas_well"},
"replace": {"man_made": "petroleum_well", "substance": "gas"}
@@ -734,10 +765,6 @@
"old": {"man_made": "MDF"},
"replace": {"telecom": "exchange"}
},
{
"old": {"man_made": "fuel_storage_tank"},
"replace": {"man_made": "storage_tank", "content": "fuel"}
},
{
"old": {"man_made": "oil_tank"},
"replace": {"man_made": "storage_tank", "content": "oil"}
@@ -895,6 +922,30 @@
{
"old": {"operator:type": "unknown"}
},
{
"old": {"parking": "covered"},
"replace": {"covered": "yes"}
},
{
"old": {"parking": "customers"},
"replace": {"access": "customers"}
},
{
"old": {"parking": "entrance"},
"replace": {"amenity": "parking_entrance"}
},
{
"old": {"parking": "park_and_ride"},
"replace": {"park_ride": "yes"}
},
{
"old": {"parking": "private"},
"replace": {"access": "private"}
},
{
"old": {"parking": "street"},
"replace": {"parking": "lane"}
},
{
"old": {"place_name": "*"},
"replace": {"name": "$1"}
@@ -1311,6 +1362,30 @@
"old": {"type": "extinct"},
"replace": {"volcano:status": "extinct"}
},
{
"old": {"type": "gas", "man_made": "pipeline"},
"replace": {"substance": "gas", "man_made": "pipeline"}
},
{
"old": {"type": "gas", "man_made": "pumping_rig"},
"replace": {"substance": "gas", "man_made": "pumping_rig"}
},
{
"old": {"type": "gas", "pipeline": "*"},
"replace": {"substance": "gas", "pipeline": "$1"}
},
{
"old": {"type": "oil", "man_made": "pipeline"},
"replace": {"substance": "oil", "man_made": "pipeline"}
},
{
"old": {"type": "oil", "man_made": "pumping_rig"},
"replace": {"substance": "oil", "man_made": "pumping_rig"}
},
{
"old": {"type": "oil", "pipeline": "*"},
"replace": {"substance": "oil", "pipeline": "$1"}
},
{
"old": {"type": "scoria"},
"replace": {"volcano:type": "scoria"}
@@ -1327,6 +1402,18 @@
"old": {"type": "video", "amenity": "studio"},
"replace": {"studio": "video"}
},
{
"old": {"type": "water", "man_made": "pipeline"},
"replace": {"substance": "water", "man_made": "pipeline"}
},
{
"old": {"type": "water", "man_made": "reservoir_covered"},
"replace": {"content": "water", "man_made": "reservoir_covered"}
},
{
"old": {"type": "water", "pipeline": "*"},
"replace": {"substance": "water", "pipeline": "$1"}
},
{
"old": {"unnamed": "*"},
"replace": {"noname": "$1"}
+40 -7
View File
@@ -472,6 +472,9 @@ en:
collection_times:
# collection_times=*
label: Collection Times
collector:
# collector=*
label: Items
colour:
# colour=*
label: Color
@@ -745,6 +748,14 @@ en:
both: Both / All
# direction=forward
forward: Forward
direction_vertex_dual:
# direction=*
label: Direction Affected
options:
# direction=backward
backward: Backward
# direction=forward
forward: Forward
dispensing:
# dispensing=*
label: Dispenses Prescriptions
@@ -1649,6 +1660,8 @@ en:
lane: Roadside Lane
# parking=multi-storey
multi-storey: Multilevel
# parking=rooftop
rooftop: Rooftop
# parking=sheds
sheds: Sheds
# parking=surface
@@ -3289,7 +3302,7 @@ en:
terms: '<translate with synonyms or related terms for ''Sandwich Fast Food'', separated by commas>'
amenity/ferry_terminal:
# amenity=ferry_terminal
name: Ferry Station / Terminal
name: Ferry Terminal
amenity/fire_station:
# amenity=fire_station
name: Fire Station
@@ -3314,6 +3327,11 @@ en:
name: Gambling Hall
# 'terms: betting,bingo,blackjack,casino,craps,gamble,gambling,keno,lottery,pachinko,poker,roulette,slot machines,slots'
terms: '<translate with synonyms or related terms for ''Gambling Hall'', separated by commas>'
amenity/give_box:
# amenity=give_box
name: Free Box
# 'terms: donations,free box,free table,freebox,give box,give shelf,givebox,library,share shelf'
terms: '<translate with synonyms or related terms for ''Free Box'', separated by commas>'
amenity/grave_yard:
# amenity=grave_yard
name: Graveyard
@@ -4659,13 +4677,13 @@ en:
terms: '<translate with synonyms or related terms for ''Glaziery'', separated by commas>'
craft/handicraft:
# craft=handicraft
name: Handicraft
terms: '<translate with synonyms or related terms for ''Handicraft'', separated by commas>'
name: Handicraft Workspace
terms: '<translate with synonyms or related terms for ''Handicraft Workspace'', separated by commas>'
craft/hvac:
# craft=hvac
name: HVAC
name: HVAC Workplace
# 'terms: heat*,vent*,air conditioning'
terms: '<translate with synonyms or related terms for ''HVAC'', separated by commas>'
terms: '<translate with synonyms or related terms for ''HVAC Workplace'', separated by commas>'
craft/insulator:
# craft=insulation
name: Insulator
@@ -4989,6 +5007,11 @@ en:
# healthcare=counselling
name: Counselling Center
terms: '<translate with synonyms or related terms for ''Counselling Center'', separated by commas>'
healthcare/dentist/orthodontics:
# 'healthcare=dentist, healthcare:speciality=orthodontics'
name: Orthodontist
# 'terms: braces,dentistry,dentofacial orthopedics,headgear,jaw alignment,teeth,tooth'
terms: '<translate with synonyms or related terms for ''Orthodontist'', separated by commas>'
healthcare/hospice:
# healthcare=hospice
name: Hospice
@@ -6205,6 +6228,11 @@ en:
name: Clearcut Forest
# 'terms: cut,forest,lumber,tree,wood'
terms: '<translate with synonyms or related terms for ''Clearcut Forest'', separated by commas>'
man_made/courtyard:
# man_made=courtyard
name: Courtyard
# 'terms: court,enclosed open air,quadrangle,yard'
terms: '<translate with synonyms or related terms for ''Courtyard'', separated by commas>'
man_made/crane:
# man_made=crane
name: Crane
@@ -7337,9 +7365,9 @@ en:
terms: '<translate with synonyms or related terms for ''Bus Station / Terminal'', separated by commas>'
public_transport/station_ferry:
# 'public_transport=station, ferry=yes'
name: Ferry Station / Terminal
name: Ferry Terminal
# 'terms: boat,dock,ferry,pier,public transit,public transportation,station,terminal,transit,transportation'
terms: '<translate with synonyms or related terms for ''Ferry Station / Terminal'', separated by commas>'
terms: '<translate with synonyms or related terms for ''Ferry Terminal'', separated by commas>'
public_transport/station_light_rail:
# 'public_transport=station, light_rail=yes'
name: Light Rail Station
@@ -7799,6 +7827,11 @@ en:
# shop=coffee
name: Coffee Store
terms: '<translate with synonyms or related terms for ''Coffee Store'', separated by commas>'
shop/collector:
# shop=collector
name: Collectibles Shop
# 'terms: antiques,coins,collection,collectors,comics,dolls,figurines,numismatics,philately,stamps,thrift'
terms: '<translate with synonyms or related terms for ''Collectibles Shop'', separated by commas>'
shop/computer:
# shop=computer
name: Computer Store
+3 -1
View File
@@ -78,6 +78,7 @@
"clothes": {"key": "clothes", "type": "semiCombo", "label": "Clothes"},
"club": {"key": "club", "type": "typeCombo", "label": "Type"},
"collection_times": {"key": "collection_times", "type": "text", "label": "Collection Times"},
"collector": {"key": "collector", "type": "semiCombo", "label": "Items"},
"colour": {"key": "colour", "type": "text", "label": "Color"},
"comment": {"key": "comment", "type": "textarea", "label": "Changeset Comment", "placeholder": "Brief description of your contributions (required)"},
"communication_multi": {"key": "communication:", "type": "multiCombo", "label": "Communication Types"},
@@ -123,6 +124,7 @@
"diplomatic/services": {"key": "diplomatic:services:", "type": "multiCombo", "label": "Services"},
"direction_cardinal": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"N": "North", "E": "East", "S": "South", "W": "West", "NE": "Northeast", "SE": "Southeast", "SW": "Southwest", "NW": "Northwest", "NNE": "North-northeast", "ENE": "East-northeast", "ESE": "East-southeast", "SSE": "South-southeast", "SSW": "South-southwest", "WSW": "West-southwest", "WNW": "West-northwest", "NNW": "North-northwest"}}},
"direction_clock": {"key": "direction", "type": "combo", "label": "Direction", "strings": {"options": {"clockwise": "Clockwise", "anticlockwise": "Counterclockwise"}}},
"direction_vertex_dual": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward"}}},
"direction_vertex": {"key": "direction", "type": "combo", "label": "Direction Affected", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}},
"direction": {"key": "direction", "type": "number", "label": "Direction (Degrees Clockwise)", "placeholder": "45, 90, 180, 270"},
"dispensing": {"key": "dispensing", "type": "check", "label": "Dispenses Prescriptions", "default": "yes"},
@@ -298,7 +300,7 @@
"par": {"key": "par", "type": "number", "minValue": 1, "label": "Par", "placeholder": "3, 4, 5..."},
"park_ride": {"key": "park_ride", "type": "check", "label": "Park and Ride"},
"parking_space": {"key": "parking_space", "type": "combo", "label": "Type"},
"parking": {"key": "parking", "type": "combo", "label": "Type", "strings": {"options": {"surface": "Surface", "multi-storey": "Multilevel", "underground": "Underground", "sheds": "Sheds", "carports": "Carports", "garage_boxes": "Garage Boxes", "lane": "Roadside Lane"}}},
"parking": {"key": "parking", "type": "combo", "label": "Type", "strings": {"options": {"surface": "Surface", "underground": "Underground", "multi-storey": "Multilevel", "lane": "Roadside Lane", "carports": "Carports", "garage_boxes": "Garage Boxes", "rooftop": "Rooftop", "sheds": "Sheds"}}},
"payment_multi_fee": {"key": "payment:", "type": "multiCombo", "label": "Payment Types", "prerequisiteTag": {"key": "fee", "valueNot": "no"}},
"payment_multi": {"key": "payment:", "type": "multiCombo", "label": "Payment Types"},
"phases": {"key": "phases", "type": "number", "minValue": 1, "label": "Phases", "placeholder": "1, 2, 3..."},
+5
View File
@@ -0,0 +1,5 @@
{
"key": "collector",
"type": "semiCombo",
"label": "Items"
}
@@ -0,0 +1,11 @@
{
"key": "direction",
"type": "combo",
"label": "Direction Affected",
"strings": {
"options": {
"forward": "Forward",
"backward": "Backward"
}
}
}
+4 -3
View File
@@ -5,12 +5,13 @@
"strings": {
"options": {
"surface": "Surface",
"multi-storey": "Multilevel",
"underground": "Underground",
"sheds": "Sheds",
"multi-storey": "Multilevel",
"lane": "Roadside Lane",
"carports": "Carports",
"garage_boxes": "Garage Boxes",
"lane": "Roadside Lane"
"rooftop": "Rooftop",
"sheds": "Sheds"
}
}
}
+40 -36
View File
@@ -58,7 +58,7 @@
"amenity/bus_station": {"icon": "temaki-bus", "fields": ["name", "building_area", "operator", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "area"], "tags": {"amenity": "bus_station"}, "name": "Bus Station / Terminal", "searchable": false, "replacement": "public_transport/station_bus"},
"amenity/coworking_space": {"icon": "maki-commercial", "fields": ["name", "address", "building_area", "opening_hours", "opening_hours/covid19", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "area"], "tags": {"amenity": "coworking_space"}, "name": "Coworking Space", "searchable": false},
"amenity/embassy": {"icon": "temaki-embassy", "fields": ["name", "country", "address", "building_area"], "moreFields": ["email", "fax", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "embassy"}, "searchable": false, "name": "Embassy"},
"amenity/ferry_terminal": {"icon": "temaki-ferry", "fields": ["name", "network", "operator", "address", "building_area"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "ferry_terminal"}, "matchScore": 0.95, "name": "Ferry Station / Terminal", "searchable": false, "replacement": "public_transport/station_ferry"},
"amenity/ferry_terminal": {"icon": "temaki-ferry", "fields": ["name", "network", "operator", "address", "building_area"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "ferry_terminal"}, "matchScore": 0.95, "name": "Ferry Terminal", "searchable": false, "replacement": "public_transport/station_ferry"},
"amenity/nursing_home": {"icon": "maki-wheelchair", "fields": ["{amenity/social_facility}", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "nursing_home"}, "reference": {"key": "social_facility", "value": "nursing_home"}, "name": "Nursing Home", "searchable": false},
"amenity/recycling": {"icon": "maki-recycling", "fields": ["recycling_type", "recycling_accepts", "collection_times"], "geometry": ["point", "area"], "tags": {"amenity": "recycling"}, "name": "Recycling", "searchable": false},
"amenity/animal_boarding": {"icon": "maki-veterinary", "fields": ["name", "operator", "address", "building_area", "opening_hours", "opening_hours/covid19", "animal_boarding"], "moreFields": ["email", "fax", "gnis/feature_id", "level", "payment_multi", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["boarding", "cat", "cattery", "dog", "horse", "kennel", "kitten", "pet", "pet boarding", "pet care", "pet hotel", "puppy", "reptile"], "tags": {"amenity": "animal_boarding"}, "name": "Animal Boarding Facility"},
@@ -126,6 +126,7 @@
"amenity/fountain": {"icon": "temaki-fountain", "fields": ["name", "operator", "fountain", "drinking_water", "height", "lit"], "moreFields": ["covered", "indoor", "level", "manufacturer"], "geometry": ["point", "area"], "tags": {"amenity": "fountain"}, "terms": ["basin", "water"], "name": "Fountain"},
"amenity/fuel": {"icon": "maki-fuel", "fields": ["name", "brand", "operator", "address", "fuel_multi", "self_service"], "moreFields": ["brand", "building", "email", "fax", "gnis/feature_id", "opening_hours", "opening_hours/covid19", "payment_multi", "phone", "ref/vatin", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["petrol", "fuel", "gasoline", "propane", "diesel", "lng", "cng", "biodiesel"], "tags": {"amenity": "fuel"}, "name": "Gas Station"},
"amenity/gambling": {"icon": "fas-coins", "fields": ["{amenity/casino}"], "moreFields": ["{amenity/casino}"], "geometry": ["point", "area"], "terms": ["betting", "bingo", "blackjack", "casino", "craps", "gamble", "gambling", "keno", "lottery", "pachinko", "poker", "roulette", "slot machines", "slots"], "tags": {"amenity": "gambling"}, "name": "Gambling Hall"},
"amenity/give_box": {"icon": "fas-box-open", "fields": ["name", "operator", "opening_hours", "opening_hours/covid19", "access_simple", "website"], "moreFields": ["address", "brand", "capacity", "covered", "email", "indoor", "level", "lit", "location", "phone", "ref", "wheelchair"], "geometry": ["point", "area"], "terms": ["donations", "free box", "free table", "freebox", "give box", "give shelf", "givebox", "library", "share shelf"], "tags": {"amenity": "give_box"}, "name": "Free Box"},
"amenity/grave_yard": {"icon": "maki-cemetery", "fields": ["religion", "address"], "moreFields": ["email", "fax", "gnis/feature_id", "phone", "website"], "geometry": ["point", "area"], "tags": {"amenity": "grave_yard"}, "terms": ["burial ground", "cemetary", "cemetery", "churchyard", "columbarium", "grave yard", "graveyard", "mausoleum", "tomb"], "name": "Graveyard"},
"amenity/grit_bin": {"icon": "fas-box", "fields": ["operator", "access_simple", "material", "collection_times"], "moreFields": ["colour", "height", "lit"], "geometry": ["point", "vertex"], "tags": {"amenity": "grit_bin"}, "terms": ["salt", "sand"], "name": "Grit Bin"},
"amenity/hospital": {"icon": "maki-hospital", "fields": ["name", "operator", "operator/type", "healthcare/speciality", "address", "emergency"], "moreFields": ["email", "fax", "gnis/feature_id", "internet_access", "internet_access/fee", "internet_access/ssid", "phone", "website", "wheelchair"], "geometry": ["area", "point"], "terms": ["clinic", "doctor", "emergency room", "health", "infirmary", "institution", "sanatorium", "sanitarium", "sick", "surgery", "ward"], "tags": {"amenity": "hospital"}, "addTags": {"amenity": "hospital", "healthcare": "hospital"}, "reference": {"key": "amenity", "value": "hospital"}, "name": "Hospital Grounds"},
@@ -183,7 +184,7 @@
"amenity/pub/lgbtq": {"icon": "maki-beer", "geometry": ["point", "area"], "tags": {"amenity": "pub", "lgbtq": "primary"}, "terms": ["gay pub", "lesbian pub", "lgbtq pub", "lgbt pub", "lgb pub"], "name": "LGBTQ+ Pub"},
"amenity/pub/microbrewery": {"icon": "maki-beer", "geometry": ["point", "area"], "tags": {"amenity": "pub", "microbrewery": "yes"}, "reference": {"key": "microbrewery"}, "terms": ["alcohol", "drink", "dive", "beer", "bier", "booze", "craft brewery", "microbrewery", "small batch brewery"], "name": "Brewpub"},
"amenity/public_bath": {"icon": "maki-water", "fields": ["name", "bath/type", "bath/open_air", "bath/sand_bath", "address", "building_area", "fee", "charge_fee"], "moreFields": ["email", "fax", "gnis/feature_id", "internet_access", "internet_access/fee", "internet_access/ssid", "opening_hours", "opening_hours/covid19", "payment_multi_fee", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "public_bath"}, "terms": ["onsen", "foot bath", "hot springs"], "name": "Public Bath"},
"amenity/public_bookcase": {"icon": "maki-library", "fields": ["name", "public_bookcase/type", "operator", "opening_hours", "opening_hours/covid19", "capacity", "website", "lit"], "moreFields": ["access_simple", "address", "brand", "email", "level", "location", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["library", "bookcrossing"], "tags": {"amenity": "public_bookcase"}, "name": "Public Bookcase"},
"amenity/public_bookcase": {"icon": "maki-library", "fields": ["name", "public_bookcase/type", "operator", "opening_hours", "opening_hours/covid19", "capacity", "website", "lit"], "moreFields": ["access_simple", "address", "brand", "covered", "email", "indoor", "level", "location", "phone", "ref", "wheelchair"], "geometry": ["point", "area"], "terms": ["library", "bookcrossing"], "tags": {"amenity": "public_bookcase"}, "name": "Public Bookcase"},
"amenity/ranger_station": {"icon": "maki-ranger-station", "fields": ["name", "operator", "address", "building_area", "opening_hours", "opening_hours/covid19"], "moreFields": ["email", "fax", "gnis/feature_id", "internet_access", "internet_access/fee", "internet_access/ssid", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["visitor center", "visitor centre", "permit center", "permit centre", "backcountry office", "warden office", "warden center"], "tags": {"amenity": "ranger_station"}, "name": "Ranger Station"},
"amenity/recycling_centre": {"icon": "maki-recycling", "fields": ["name", "operator", "operator/type", "address", "building", "opening_hours", "opening_hours/covid19", "recycling_accepts"], "moreFields": ["charge_fee", "email", "fax", "fee", "payment_multi_fee", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["bottle", "can", "dump", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "centre"}, "reference": {"key": "recycling_type", "value": "*"}, "name": "Recycling Center"},
"amenity/recycling_container": {"icon": "maki-recycling", "fields": ["operator", "recycling_accepts", "opening_hours", "opening_hours/covid19", "collection_times"], "moreFields": ["colour", "covered", "indoor", "level", "manufacturer", "material", "ref"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "container"}, "reference": {"key": "amenity", "value": "recycling"}, "name": "Recycling Container"},
@@ -411,8 +412,8 @@
"craft/floorer": {"icon": "temaki-brick_trowel", "geometry": ["point", "area"], "tags": {"craft": "floorer"}, "name": "Floorer"},
"craft/gardener": {"icon": "maki-garden-centre", "geometry": ["point", "area"], "terms": ["landscaper", "grounds keeper"], "tags": {"craft": "gardener"}, "name": "Gardener"},
"craft/glaziery": {"icon": "temaki-window", "geometry": ["point", "area"], "terms": ["glass", "stained-glass", "window"], "tags": {"craft": "glaziery"}, "name": "Glaziery"},
"craft/handicraft": {"icon": "temaki-vase", "geometry": ["point", "area"], "tags": {"craft": "handicraft"}, "name": "Handicraft"},
"craft/hvac": {"icon": "temaki-tools", "geometry": ["point", "area"], "terms": ["heat*", "vent*", "air conditioning"], "tags": {"craft": "hvac"}, "name": "HVAC"},
"craft/handicraft": {"icon": "temaki-vase", "geometry": ["point", "area"], "tags": {"craft": "handicraft"}, "name": "Handicraft Workspace"},
"craft/hvac": {"icon": "temaki-tools", "geometry": ["point", "area"], "terms": ["heat*", "vent*", "air conditioning"], "tags": {"craft": "hvac"}, "name": "HVAC Workplace"},
"craft/insulator": {"icon": "temaki-tools", "geometry": ["point", "area"], "tags": {"craft": "insulation"}, "name": "Insulator"},
"craft/joiner": {"icon": "temaki-tools", "geometry": ["point", "area"], "tags": {"craft": "joiner"}, "terms": ["furniture"], "name": "Joiner"},
"craft/key_cutter": {"icon": "fas-key", "geometry": ["point", "area"], "tags": {"craft": "key_cutter"}, "name": "Key Cutter"},
@@ -443,7 +444,7 @@
"cycleway/asl": {"icon": "maki-bicycle", "fields": ["ref", "direction_vertex", "width"], "geometry": ["vertex"], "tags": {"cycleway": "asl"}, "terms": ["advanced stop box", "asl", "bicycle box", "bike box", "bikebox", "cycle box", "cycle stop marking"], "name": "Advanced Stop Line"},
"demolished/building": {"icon": "fas-house-damage", "fields": ["name", "address"], "geometry": ["area"], "tags": {"demolished:building": "*"}, "name": "Recently Demolished Building", "searchable": false},
"disused/railway": {"icon": "temaki-rail_profile", "fields": ["disused/railway"], "geometry": ["point", "vertex", "line", "area"], "tags": {"disused:railway": "*"}, "matchScore": 0.05, "searchable": false, "name": "Disused Railway Feature"},
"disused/shop": {"fields": ["disused/shop"], "geometry": ["point", "area"], "tags": {"disused:shop": "*"}, "matchScore": 0.05, "searchable": false, "name": "Disused Shop"},
"disused/shop": {"icon": "fas-store-alt-slash", "fields": ["disused/shop"], "geometry": ["point", "area"], "tags": {"disused:shop": "*"}, "matchScore": 0.05, "searchable": false, "name": "Disused Shop"},
"emergency/designated": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "designated"}, "name": "Emergency Access Designated", "searchable": false, "matchScore": 0.01},
"emergency/destination": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "destination"}, "name": "Emergency Access Destination", "searchable": false, "matchScore": 0.01},
"emergency/no": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "no"}, "name": "Emergency Access No", "searchable": false, "matchScore": 0.01},
@@ -485,6 +486,7 @@
"healthcare/birthing_center": {"icon": "fas-baby", "geometry": ["point", "area"], "terms": ["baby", "childbirth", "delivery", "labour", "labor", "pregnancy"], "tags": {"healthcare": "birthing_center"}, "name": "Birthing Center"},
"healthcare/blood_donation": {"icon": "maki-blood-bank", "fields": ["{healthcare}", "blood_components"], "geometry": ["point", "area"], "terms": ["blood bank", "blood donation", "blood transfusion", "apheresis", "plasmapheresis", "plateletpheresis", "stem cell donation"], "tags": {"healthcare": "blood_donation"}, "name": "Blood Donor Center"},
"healthcare/counselling": {"icon": "fas-comments", "geometry": ["point", "area"], "tags": {"healthcare": "counselling"}, "name": "Counselling Center"},
"healthcare/dentist/orthodontics": {"icon": "fas-teeth", "fields": ["{amenity/dentist}"], "moreFields": ["{amenity/dentist}"], "geometry": ["point", "area"], "terms": ["braces", "dentistry", "dentofacial orthopedics", "headgear", "jaw alignment", "teeth", "tooth"], "tags": {"healthcare": "dentist", "healthcare:speciality": "orthodontics"}, "addTags": {"healthcare": "dentist", "amenity": "dentist", "healthcare:speciality": "orthodontics"}, "reference": {"key": "healthcare:speciality", "value": "orthodontics"}, "name": "Orthodontist"},
"healthcare/hospice": {"icon": "maki-hospital", "geometry": ["point", "area"], "terms": ["terminal", "illness"], "tags": {"healthcare": "hospice"}, "name": "Hospice"},
"healthcare/laboratory": {"icon": "fas-vial", "fields": ["name", "operator", "website", "ref", "address", "opening_hours", "opening_hours/covid19"], "geometry": ["point", "area"], "terms": ["medical_laboratory", "medical_lab", "blood_check"], "tags": {"healthcare": "laboratory"}, "name": "Medical Laboratory"},
"healthcare/midwife": {"icon": "fas-baby", "geometry": ["point", "area"], "terms": ["baby", "childbirth", "delivery", "labour", "labor", "pregnancy"], "tags": {"healthcare": "midwife"}, "name": "Midwife"},
@@ -526,7 +528,7 @@
"highway/footway/sidewalk": {"icon": "temaki-pedestrian", "geometry": ["line"], "tags": {"footway": "sidewalk"}, "addTags": {"highway": "footway", "footway": "sidewalk"}, "reference": {"key": "footway", "value": "sidewalk"}, "terms": ["pavement", "sidepath"], "name": "Sidewalk"},
"highway/footway/unmarked-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "tactile_paving", "crossing/island"], "geometry": ["line"], "tags": {"footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["flat top", "hump", "speed", "slow"], "name": "Unmarked Crossing (Raised)"},
"highway/footway/unmarked": {"icon": "temaki-pedestrian", "fields": ["crossing", "access", "surface", "tactile_paving", "crossing/island"], "geometry": ["line"], "tags": {"footway": "crossing", "crossing": "unmarked"}, "addTags": {"highway": "footway", "footway": "crossing", "crossing": "unmarked"}, "reference": {"key": "footway", "value": "crossing"}, "terms": ["unmarked foot path crossing", "unmarked crosswalk", "unmarked pedestrian crossing"], "name": "Unmarked Crossing"},
"highway/give_way": {"icon": "temaki-yield", "fields": ["direction_vertex"], "geometry": ["vertex"], "tags": {"highway": "give_way"}, "terms": ["give way", "yield", "sign"], "name": "Yield Sign"},
"highway/give_way": {"icon": "temaki-yield", "fields": ["direction_vertex_dual"], "geometry": ["vertex"], "tags": {"highway": "give_way"}, "terms": ["give way", "yield", "sign"], "name": "Yield Sign"},
"highway/living_street": {"icon": "iD-highway-living-street", "fields": ["name", "oneway", "maxspeed", "lanes", "surface", "structure", "access"], "moreFields": ["covered", "cycleway", "flood_prone", "junction_line", "lit", "maxheight", "maxweight_bridge", "oneway/bicycle", "smoothness", "trolley_wire", "width"], "geometry": ["line"], "tags": {"highway": "living_street"}, "name": "Living Street"},
"highway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["distance", "direction_vertex"], "tags": {"highway": "milestone"}, "terms": ["mile marker", "mile post", "mile stone", "mileage marker", "milemarker", "milepost"], "name": "Highway Milestone"},
"highway/mini_roundabout": {"icon": "maki-circle-stroked", "geometry": ["vertex"], "terms": ["traffic circle"], "tags": {"highway": "mini_roundabout"}, "fields": ["direction_clock"], "name": "Mini-Roundabout"},
@@ -710,7 +712,7 @@
"leisure/pitch/skateboard": {"icon": "maki-skateboard", "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "skateboard"}, "reference": {"key": "sport", "value": "skateboard"}, "terms": [], "name": "Skate Park"},
"leisure/pitch/soccer": {"icon": "maki-soccer", "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "soccer"}, "reference": {"key": "sport", "value": "soccer"}, "terms": ["football"], "name": "Soccer Field"},
"leisure/pitch/softball": {"icon": "maki-baseball", "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "softball"}, "reference": {"key": "sport", "value": "softball"}, "terms": ["softball", "diamond"], "name": "Softball Field"},
"leisure/pitch/table_tennis": {"icon": "maki-tennis", "fields": ["name", "lit", "access_simple"], "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "table_tennis"}, "reference": {"key": "sport", "value": "table_tennis"}, "terms": ["table tennis", "ping pong"], "name": "Ping Pong Table"},
"leisure/pitch/table_tennis": {"icon": "fas-table-tennis", "fields": ["name", "lit", "access_simple"], "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "table_tennis"}, "reference": {"key": "sport", "value": "table_tennis"}, "terms": ["table tennis", "ping pong"], "name": "Ping Pong Table"},
"leisure/pitch/tennis": {"icon": "maki-tennis", "fields": ["{leisure/pitch}", "access_simple"], "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "tennis"}, "reference": {"key": "sport", "value": "tennis"}, "terms": [], "name": "Tennis Court"},
"leisure/pitch/volleyball": {"icon": "maki-volleyball", "geometry": ["area", "point"], "tags": {"leisure": "pitch", "sport": "volleyball"}, "reference": {"key": "sport", "value": "volleyball"}, "terms": [], "name": "Volleyball Court"},
"leisure/playground": {"icon": "maki-playground", "fields": ["name", "operator", "playground/theme", "surface", "access_simple", "min_age", "max_age"], "moreFields": ["blind", "dog", "gnis/feature_id", "wheelchair"], "geometry": ["area", "point"], "terms": ["jungle gym", "play area"], "tags": {"leisure": "playground"}, "name": "Playground"},
@@ -741,6 +743,7 @@
"man_made/cairn": {"icon": "temaki-cairn", "geometry": ["point", "area"], "terms": ["rock pile", "stone stack", "stone pile", "càrn"], "tags": {"man_made": "cairn"}, "name": "Cairn"},
"man_made/chimney": {"icon": "temaki-chimney", "fields": ["operator", "material", "height"], "geometry": ["point", "area"], "tags": {"man_made": "chimney"}, "name": "Chimney"},
"man_made/clearcut": {"icon": "maki-logging", "geometry": ["area"], "tags": {"man_made": "clearcut"}, "terms": ["cut", "forest", "lumber", "tree", "wood"], "name": "Clearcut Forest"},
"man_made/courtyard": {"icon": "maki-square-stroked", "fields": ["name"], "moreFields": [], "geometry": ["area"], "tags": {"man_made": "courtyard"}, "terms": ["court", "enclosed open air", "quadrangle", "yard"], "name": "Courtyard"},
"man_made/crane": {"icon": "temaki-crane", "fields": ["operator", "manufacturer", "height", "crane/type"], "geometry": ["point", "line", "vertex", "area"], "tags": {"man_made": "crane"}, "name": "Crane"},
"man_made/cross": {"icon": "maki-religious-christian", "fields": ["name", "material", "height", "ele_node", "inscription", "direction"], "geometry": ["point", "vertex"], "tags": {"man_made": "cross"}, "name": "Summit Cross"},
"man_made/cutline": {"icon": "maki-logging", "geometry": ["line"], "tags": {"man_made": "cutline"}, "name": "Cut line"},
@@ -749,7 +752,7 @@
"man_made/flagpole": {"icon": "maki-embassy", "fields": ["operator", "flag/type", "country_flag", "lit", "height"], "moreFields": ["manufacturer", "material"], "geometry": ["point", "vertex"], "tags": {"man_made": "flagpole"}, "name": "Flagpole"},
"man_made/gasometer": {"icon": "temaki-storage_tank", "fields": ["content", "building_area"], "geometry": ["point", "area"], "terms": ["gas holder"], "tags": {"man_made": "gasometer"}, "name": "Gasometer"},
"man_made/groyne": {"fields": ["material", "seamark/type"], "geometry": ["line", "area"], "tags": {"man_made": "groyne"}, "name": "Groin"},
"man_made/lighthouse": {"icon": "maki-lighthouse", "fields": ["name", "operator", "building_area", "height"], "moreFields": ["address", "email", "fax", "gnis/feature_id", "phone", "seamark/type", "website"], "geometry": ["point", "area"], "tags": {"man_made": "lighthouse"}, "addTags": {"man_made": "lighthouse", "seamark:type": "light_major"}, "removeTags": {"man_made": "lighthouse", "seamark:type": "*"}, "name": "Lighthouse"},
"man_made/lighthouse": {"icon": "maki-lighthouse", "fields": ["name", "operator", "building_area", "height"], "moreFields": ["address", "email", "fax", "gnis/feature_id", "phone", "seamark/type", "website"], "geometry": ["point", "area"], "tags": {"man_made": "lighthouse"}, "name": "Lighthouse"},
"man_made/manhole": {"icon": "temaki-manhole", "fields": ["manhole", "operator", "label", "ref"], "geometry": ["point", "vertex"], "tags": {"manhole": "*"}, "addTags": {"man_made": "manhole", "manhole": "*"}, "terms": ["cover", "hole", "sewer", "sewage", "telecom"], "name": "Manhole"},
"man_made/manhole/drain": {"icon": "temaki-manhole", "fields": ["operator", "ref"], "geometry": ["point", "vertex"], "tags": {"manhole": "drain"}, "addTags": {"man_made": "manhole", "manhole": "drain"}, "terms": ["cover", "drain", "hole", "rain", "sewer", "sewage", "storm"], "name": "Storm Drain"},
"man_made/manhole/gas": {"icon": "temaki-gas_manhole", "fields": ["operator", "ref"], "geometry": ["point", "vertex"], "tags": {"manhole": "gas"}, "addTags": {"man_made": "manhole", "manhole": "gas"}, "terms": ["cover", "gas", "heat", "hole", "utility"], "name": "Gas Utility Manhole"},
@@ -981,7 +984,7 @@
"public_transport/platform/trolleybus": {"icon": "temaki-board_trolleybus", "fields": ["{public_transport/platform}"], "moreFields": ["{public_transport/platform}"], "geometry": ["line", "area"], "tags": {"public_transport": "platform", "trolleybus": "yes"}, "reference": {"key": "public_transport", "value": "platform"}, "terms": ["bus", "electric", "platform", "public transit", "public transportation", "streetcar", "trackless", "tram", "trolley", "transit", "transportation"], "name": "Trolleybus Platform"},
"public_transport/station_aerialway": {"icon": "temaki-gondola_lift", "fields": ["{public_transport/station}", "aerialway/access", "aerialway/summer/access"], "moreFields": ["{public_transport/station}"], "geometry": ["point", "vertex", "area"], "tags": {"aerialway": "station"}, "addTags": {"public_transport": "station", "aerialway": "station"}, "reference": {"key": "aerialway", "value": "station"}, "terms": ["aerialway", "cable car", "public transit", "public transportation", "station", "terminal", "transit", "transportation"], "name": "Aerialway Station"},
"public_transport/station_bus": {"icon": "temaki-bus", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["point", "area"], "tags": {"public_transport": "station", "bus": "yes"}, "addTags": {"public_transport": "station", "bus": "yes", "amenity": "bus_station"}, "reference": {"key": "amenity", "value": "bus_station"}, "terms": ["bus", "public transit", "public transportation", "station", "terminal", "transit", "transportation"], "name": "Bus Station / Terminal"},
"public_transport/station_ferry": {"icon": "temaki-ferry", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["vertex", "point", "area"], "tags": {"public_transport": "station", "ferry": "yes"}, "addTags": {"public_transport": "station", "ferry": "yes", "amenity": "ferry_terminal"}, "reference": {"key": "amenity", "value": "ferry_terminal"}, "terms": ["boat", "dock", "ferry", "pier", "public transit", "public transportation", "station", "terminal", "transit", "transportation"], "name": "Ferry Station / Terminal"},
"public_transport/station_ferry": {"icon": "temaki-ferry", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["vertex", "point", "area"], "tags": {"public_transport": "station", "ferry": "yes"}, "addTags": {"public_transport": "station", "ferry": "yes", "amenity": "ferry_terminal"}, "reference": {"key": "amenity", "value": "ferry_terminal"}, "terms": ["boat", "dock", "ferry", "pier", "public transit", "public transportation", "station", "terminal", "transit", "transportation"], "name": "Ferry Terminal"},
"public_transport/station_light_rail": {"icon": "temaki-light_rail", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["point", "area"], "tags": {"public_transport": "station", "light_rail": "yes"}, "addTags": {"public_transport": "station", "light_rail": "yes", "railway": "station", "station": "light_rail"}, "reference": {"key": "station", "value": "light_rail"}, "terms": ["electric", "light rail", "public transit", "public transportation", "rail", "station", "terminal", "track", "tram", "trolley", "transit", "transportation"], "name": "Light Rail Station"},
"public_transport/station_monorail": {"icon": "temaki-monorail", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["point", "area"], "tags": {"public_transport": "station", "monorail": "yes"}, "addTags": {"public_transport": "station", "monorail": "yes", "railway": "station"}, "reference": {"key": "railway", "value": "station"}, "terms": ["monorail", "public transit", "public transportation", "rail", "station", "terminal", "transit", "transportation"], "name": "Monorail Station"},
"public_transport/station_subway": {"icon": "temaki-subway", "fields": ["{public_transport/station}"], "moreFields": ["{public_transport/station}"], "geometry": ["point", "area"], "tags": {"public_transport": "station", "subway": "yes"}, "addTags": {"public_transport": "station", "subway": "yes", "railway": "station", "station": "subway"}, "reference": {"key": "station", "value": "subway"}, "terms": ["metro", "public transit", "public transportation", "rail", "station", "subway", "terminal", "track", "transit", "transportation", "underground"], "name": "Subway Station"},
@@ -1081,6 +1084,7 @@
"shop/clothes/underwear": {"icon": "maki-clothing-store", "geometry": ["point", "area"], "tags": {"shop": "clothes", "clothes": "underwear"}, "reference": {"key": "clothes", "value": "underwear"}, "terms": ["boutique", "bras", "brassieres", "briefs", "boxers", "fashion", "lingerie", "panties", "slips", "socks", "stockings", "underclothes", "undergarments", "underpants", "undies"], "name": "Underwear Store"},
"shop/clothes/wedding": {"icon": "temaki-gown", "geometry": ["point", "area"], "tags": {"shop": "clothes", "clothes": "wedding"}, "reference": {"key": "clothes", "value": "wedding"}, "terms": ["boutique", "bridal", "bride", "bridegroom", "bridesmaid", "groom", "groomsman", "tuxedo", "wedding dress", "wedding gown"], "name": "Wedding Clothes Store"},
"shop/coffee": {"icon": "temaki-coffee", "geometry": ["point", "area"], "tags": {"shop": "coffee"}, "name": "Coffee Store"},
"shop/collector": {"icon": "fas-th", "fields": ["name", "collector", "{shop}"], "geometry": ["point", "area"], "terms": ["antiques", "coins", "collection", "collectors", "comics", "dolls", "figurines", "numismatics", "philately", "stamps", "thrift"], "tags": {"shop": "collector"}, "name": "Collectibles Shop"},
"shop/computer": {"icon": "fas-laptop", "geometry": ["point", "area"], "tags": {"shop": "computer"}, "terms": ["desktop", "laptop", "hardware", "operating system", "software"], "name": "Computer Store"},
"shop/confectionery": {"icon": "maki-confectionery", "geometry": ["point", "area"], "terms": ["sweet"], "tags": {"shop": "confectionery"}, "name": "Candy Store"},
"shop/convenience": {"icon": "fas-shopping-basket", "geometry": ["point", "area"], "tags": {"shop": "convenience"}, "name": "Convenience Store"},
@@ -1161,7 +1165,7 @@
"shop/pawnbroker": {"icon": "temaki-money_hand", "geometry": ["point", "area"], "tags": {"shop": "pawnbroker"}, "name": "Pawn Shop"},
"shop/perfumery": {"icon": "temaki-perfume", "geometry": ["point", "area"], "tags": {"shop": "perfumery"}, "terms": ["cologne", "fragrance", "purfume"], "name": "Perfume Store"},
"shop/pet_grooming": {"icon": "temaki-pet_grooming", "geometry": ["point", "area"], "terms": ["cat", "dog"], "tags": {"shop": "pet_grooming"}, "name": "Pet Grooming Store"},
"shop/pet": {"icon": "maki-dog-park", "geometry": ["point", "area"], "terms": ["animal", "cat", "dog", "fish", "kitten", "puppy", "reptile"], "tags": {"shop": "pet"}, "name": "Pet Store"},
"shop/pet": {"icon": "fas-cat", "geometry": ["point", "area"], "terms": ["animal", "cat", "dog", "fish", "kitten", "puppy", "reptile"], "tags": {"shop": "pet"}, "name": "Pet Store"},
"shop/photo": {"icon": "fas-camera-retro", "geometry": ["point", "area"], "terms": ["camera", "film", "lens", "photo"], "tags": {"shop": "photo"}, "name": "Photography Store"},
"shop/pottery": {"icon": "temaki-vase", "geometry": ["point", "area"], "terms": ["ceramic", "pot", "vase"], "tags": {"shop": "pottery"}, "name": "Pottery Store"},
"shop/printer_ink": {"icon": "fas-print", "geometry": ["point", "area"], "terms": ["copier ink", "fax ink", "ink cartridges", "toner"], "tags": {"shop": "printer_ink"}, "name": "Printer Ink Store"},
@@ -5545,32 +5549,32 @@
"shop/perfumery/O Boticário": {"name": "O Boticário", "icon": "temaki-perfume", "imageURL": "https://graph.facebook.com/oboticario/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7073219", "shop": "perfumery"}, "addTags": {"brand": "O Boticário", "brand:wikidata": "Q7073219", "brand:wikipedia": "en:O Boticário", "name": "O Boticário", "shop": "perfumery"}, "countryCodes": ["br"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/perfumery/Perfumania": {"name": "Perfumania", "icon": "temaki-perfume", "imageURL": "https://graph.facebook.com/perfumania/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q72983916", "shop": "perfumery"}, "addTags": {"brand": "Perfumania", "brand:wikidata": "Q72983916", "name": "Perfumania", "shop": "perfumery"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/perfumery/The Perfume Shop": {"name": "The Perfume Shop", "icon": "temaki-perfume", "imageURL": "https://graph.facebook.com/theperfumeshoponline/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7756719", "shop": "perfumery"}, "addTags": {"brand": "The Perfume Shop", "brand:wikidata": "Q7756719", "brand:wikipedia": "en:The Perfume Shop", "name": "The Perfume Shop", "shop": "perfumery"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Animalis": {"name": "Animalis", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Animalisfr/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q2850015", "shop": "pet"}, "addTags": {"brand": "Animalis", "brand:wikidata": "Q2850015", "name": "Animalis", "shop": "pet"}, "countryCodes": ["fr"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Das Futterhaus": {"name": "Das Futterhaus", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/futterhaus.deutschland/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q1167914", "shop": "pet"}, "addTags": {"brand": "Das Futterhaus", "brand:wikidata": "Q1167914", "brand:wikipedia": "de:Das Futterhaus", "name": "Das Futterhaus", "shop": "pet"}, "countryCodes": ["at", "de"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Faunatar": {"name": "Faunatar", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Faunatar/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11859415", "shop": "pet"}, "addTags": {"brand": "Faunatar", "brand:wikidata": "Q11859415", "brand:wikipedia": "fi:Faunatar", "name": "Faunatar", "shop": "pet"}, "countryCodes": ["fi"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Fressnapf": {"name": "Fressnapf", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Fressnapf/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q875796", "shop": "pet"}, "addTags": {"brand": "Fressnapf", "brand:wikidata": "Q875796", "brand:wikipedia": "en:Fressnapf", "name": "Fressnapf", "shop": "pet"}, "countryCodes": ["at", "ch", "de", "hu", "lu"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Global Pet Foods": {"name": "Global Pet Foods", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/globalpetfoods/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q57985699", "shop": "pet"}, "addTags": {"brand": "Global Pet Foods", "brand:wikidata": "Q57985699", "name": "Global Pet Foods", "shop": "pet"}, "countryCodes": ["ca"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Jollyes": {"name": "Jollyes", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/jollyesuk/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q45844955", "shop": "pet"}, "addTags": {"brand": "Jollyes", "brand:wikidata": "Q45844955", "name": "Jollyes", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Jumper": {"name": "Jumper", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/JumperNL/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q87338743", "shop": "pet"}, "addTags": {"brand": "Jumper", "brand:wikidata": "Q87338743", "name": "Jumper", "shop": "pet"}, "countryCodes": ["nl"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Maxi Zoo": {"name": "Maxi Zoo", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Fressnapf/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q875796", "shop": "pet"}, "addTags": {"brand": "Maxi Zoo", "brand:wikidata": "Q875796", "brand:wikipedia": "en:Fressnapf", "name": "Maxi Zoo", "shop": "pet"}, "countryCodes": ["be", "ch", "dk", "fr", "ie", "it", "pl"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Mud Bay": {"name": "Mud Bay", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/mudbay/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q30324179", "shop": "pet"}, "addTags": {"brand": "Mud Bay", "brand:wikidata": "Q30324179", "brand:wikipedia": "en:Mud Bay pet store", "name": "Mud Bay", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Musti ja Mirri": {"name": "Musti ja Mirri", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/mustijamirri/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11883558", "shop": "pet"}, "addTags": {"brand": "Musti ja Mirri", "brand:wikidata": "Q11883558", "brand:wikipedia": "fi:Musti ja Mirri", "name": "Musti ja Mirri", "shop": "pet"}, "countryCodes": ["fi"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Médor et Compagnie": {"name": "Médor et Compagnie", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/medoretcie/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q89344773", "shop": "pet"}, "addTags": {"brand": "Médor et Compagnie", "brand:wikidata": "Q89344773", "name": "Médor et Compagnie", "shop": "pet"}, "countryCodes": ["fr"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Food Express": {"name": "Pet Food Express", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/petfoodexpress/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171541", "shop": "pet"}, "addTags": {"brand": "Pet Food Express", "brand:wikidata": "Q7171541", "brand:wikipedia": "en:Pet Food Express", "name": "Pet Food Express", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Supermarket": {"name": "Pet Supermarket", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/PetSupermarket/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q61968363", "shop": "pet"}, "addTags": {"brand": "Pet Supermarket", "brand:wikidata": "Q61968363", "name": "Pet Supermarket", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Supplies Plus": {"name": "Pet Supplies Plus", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/petsuppliesplus/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171563", "shop": "pet"}, "addTags": {"brand": "Pet Supplies Plus", "brand:wikidata": "Q7171563", "brand:wikipedia": "en:Pet Supplies Plus", "name": "Pet Supplies Plus", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Valu": {"name": "Pet Valu", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/PetValuUS/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q58009635", "shop": "pet"}, "addTags": {"brand": "Pet Valu", "brand:wikidata": "Q58009635", "name": "Pet Valu", "shop": "pet"}, "countryCodes": ["ca", "us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/PetSmart": {"name": "PetSmart", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/PetSmart/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q3307147", "shop": "pet"}, "addTags": {"brand": "PetSmart", "brand:wikidata": "Q3307147", "brand:wikipedia": "en:PetSmart", "name": "PetSmart", "shop": "pet"}, "countryCodes": ["ca", "us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petco": {"name": "Petco", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Petco/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171798", "shop": "pet"}, "addTags": {"brand": "Petco", "brand:wikidata": "Q7171798", "brand:wikipedia": "en:Petco", "name": "Petco", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petland": {"name": "Petland", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/PetlandUSA/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q17111474", "shop": "pet"}, "addTags": {"brand": "Petland", "brand:wikidata": "Q17111474", "brand:wikipedia": "en:Petland", "name": "Petland", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petland Discounts": {"name": "Petland Discounts", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/petlanddiscount/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7178463", "shop": "pet"}, "addTags": {"brand": "Petland Discounts", "brand:wikidata": "Q7178463", "brand:wikipedia": "en:Petland Discounts", "name": "Petland Discounts", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pets Corner": {"name": "Pets Corner", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/petscorner/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q17018476", "shop": "pet"}, "addTags": {"brand": "Pets Corner", "brand:wikidata": "Q17018476", "brand:wikipedia": "en:Pets Corner", "name": "Pets Corner", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pets at Home": {"name": "Pets at Home", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/petsathomeUK/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7179258", "shop": "pet"}, "addTags": {"brand": "Pets at Home", "brand:wikidata": "Q7179258", "brand:wikipedia": "en:Pets at Home", "name": "Pets at Home", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Unleashed": {"name": "Unleashed", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/Petco/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62122874", "shop": "pet"}, "addTags": {"alt_name": "Unleashed by Petco", "brand": "Unleashed", "brand:wikidata": "Q62122874", "name": "Unleashed", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Wild Birds Unlimited": {"name": "Wild Birds Unlimited", "icon": "maki-dog-park", "imageURL": "https://pbs.twimg.com/profile_images/466209950788636672/DHjpTthh_bigger.jpeg", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q8000542", "shop": "pet"}, "addTags": {"brand": "Wild Birds Unlimited", "brand:wikidata": "Q8000542", "brand:wikipedia": "en:Wild Birds Unlimited", "name": "Wild Birds Unlimited", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Бетховен": {"name": "Бетховен", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/zoobethowenclub/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62390798", "shop": "pet"}, "addTags": {"brand": "Бетховен", "brand:wikidata": "Q62390798", "name": "Бетховен", "shop": "pet"}, "countryCodes": ["ru"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Четыре лапы": {"name": "Четыре лапы", "icon": "maki-dog-park", "imageURL": "https://graph.facebook.com/4laps/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62390783", "shop": "pet"}, "addTags": {"brand": "Четыре лапы", "brand:wikidata": "Q62390783", "name": "Четыре лапы", "shop": "pet"}, "countryCodes": ["kz", "ru"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/イオンペット": {"name": "イオンペット", "icon": "maki-dog-park", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11286064", "shop": "pet"}, "addTags": {"brand": "イオンペット", "brand:en": "Aeonpet", "brand:ja": "イオンペット", "brand:wikidata": "Q11286064", "brand:wikipedia": "ja:イオンペット", "name": "イオンペット", "name:en": "Aeonpet", "name:ja": "イオンペット", "shop": "pet"}, "countryCodes": ["jp"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Animalis": {"name": "Animalis", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Animalisfr/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q2850015", "shop": "pet"}, "addTags": {"brand": "Animalis", "brand:wikidata": "Q2850015", "name": "Animalis", "shop": "pet"}, "countryCodes": ["fr"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Das Futterhaus": {"name": "Das Futterhaus", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/futterhaus.deutschland/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q1167914", "shop": "pet"}, "addTags": {"brand": "Das Futterhaus", "brand:wikidata": "Q1167914", "brand:wikipedia": "de:Das Futterhaus", "name": "Das Futterhaus", "shop": "pet"}, "countryCodes": ["at", "de"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Faunatar": {"name": "Faunatar", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Faunatar/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11859415", "shop": "pet"}, "addTags": {"brand": "Faunatar", "brand:wikidata": "Q11859415", "brand:wikipedia": "fi:Faunatar", "name": "Faunatar", "shop": "pet"}, "countryCodes": ["fi"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Fressnapf": {"name": "Fressnapf", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Fressnapf/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q875796", "shop": "pet"}, "addTags": {"brand": "Fressnapf", "brand:wikidata": "Q875796", "brand:wikipedia": "en:Fressnapf", "name": "Fressnapf", "shop": "pet"}, "countryCodes": ["at", "ch", "de", "hu", "lu"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Global Pet Foods": {"name": "Global Pet Foods", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/globalpetfoods/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q57985699", "shop": "pet"}, "addTags": {"brand": "Global Pet Foods", "brand:wikidata": "Q57985699", "name": "Global Pet Foods", "shop": "pet"}, "countryCodes": ["ca"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Jollyes": {"name": "Jollyes", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/jollyesuk/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q45844955", "shop": "pet"}, "addTags": {"brand": "Jollyes", "brand:wikidata": "Q45844955", "name": "Jollyes", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Jumper": {"name": "Jumper", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/JumperNL/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q87338743", "shop": "pet"}, "addTags": {"brand": "Jumper", "brand:wikidata": "Q87338743", "name": "Jumper", "shop": "pet"}, "countryCodes": ["nl"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Maxi Zoo": {"name": "Maxi Zoo", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Fressnapf/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q875796", "shop": "pet"}, "addTags": {"brand": "Maxi Zoo", "brand:wikidata": "Q875796", "brand:wikipedia": "en:Fressnapf", "name": "Maxi Zoo", "shop": "pet"}, "countryCodes": ["be", "ch", "dk", "fr", "ie", "it", "pl"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Mud Bay": {"name": "Mud Bay", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/mudbay/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q30324179", "shop": "pet"}, "addTags": {"brand": "Mud Bay", "brand:wikidata": "Q30324179", "brand:wikipedia": "en:Mud Bay pet store", "name": "Mud Bay", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Musti ja Mirri": {"name": "Musti ja Mirri", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/mustijamirri/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11883558", "shop": "pet"}, "addTags": {"brand": "Musti ja Mirri", "brand:wikidata": "Q11883558", "brand:wikipedia": "fi:Musti ja Mirri", "name": "Musti ja Mirri", "shop": "pet"}, "countryCodes": ["fi"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Médor et Compagnie": {"name": "Médor et Compagnie", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/medoretcie/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q89344773", "shop": "pet"}, "addTags": {"brand": "Médor et Compagnie", "brand:wikidata": "Q89344773", "name": "Médor et Compagnie", "shop": "pet"}, "countryCodes": ["fr"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Food Express": {"name": "Pet Food Express", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/petfoodexpress/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171541", "shop": "pet"}, "addTags": {"brand": "Pet Food Express", "brand:wikidata": "Q7171541", "brand:wikipedia": "en:Pet Food Express", "name": "Pet Food Express", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Supermarket": {"name": "Pet Supermarket", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/PetSupermarket/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q61968363", "shop": "pet"}, "addTags": {"brand": "Pet Supermarket", "brand:wikidata": "Q61968363", "name": "Pet Supermarket", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Supplies Plus": {"name": "Pet Supplies Plus", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/petsuppliesplus/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171563", "shop": "pet"}, "addTags": {"brand": "Pet Supplies Plus", "brand:wikidata": "Q7171563", "brand:wikipedia": "en:Pet Supplies Plus", "name": "Pet Supplies Plus", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pet Valu": {"name": "Pet Valu", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/PetValuUS/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q58009635", "shop": "pet"}, "addTags": {"brand": "Pet Valu", "brand:wikidata": "Q58009635", "name": "Pet Valu", "shop": "pet"}, "countryCodes": ["ca", "us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/PetSmart": {"name": "PetSmart", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/PetSmart/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q3307147", "shop": "pet"}, "addTags": {"brand": "PetSmart", "brand:wikidata": "Q3307147", "brand:wikipedia": "en:PetSmart", "name": "PetSmart", "shop": "pet"}, "countryCodes": ["ca", "us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petco": {"name": "Petco", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Petco/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7171798", "shop": "pet"}, "addTags": {"brand": "Petco", "brand:wikidata": "Q7171798", "brand:wikipedia": "en:Petco", "name": "Petco", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petland": {"name": "Petland", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/PetlandUSA/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q17111474", "shop": "pet"}, "addTags": {"brand": "Petland", "brand:wikidata": "Q17111474", "brand:wikipedia": "en:Petland", "name": "Petland", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Petland Discounts": {"name": "Petland Discounts", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/petlanddiscount/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7178463", "shop": "pet"}, "addTags": {"brand": "Petland Discounts", "brand:wikidata": "Q7178463", "brand:wikipedia": "en:Petland Discounts", "name": "Petland Discounts", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pets Corner": {"name": "Pets Corner", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/petscorner/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q17018476", "shop": "pet"}, "addTags": {"brand": "Pets Corner", "brand:wikidata": "Q17018476", "brand:wikipedia": "en:Pets Corner", "name": "Pets Corner", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Pets at Home": {"name": "Pets at Home", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/petsathomeUK/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q7179258", "shop": "pet"}, "addTags": {"brand": "Pets at Home", "brand:wikidata": "Q7179258", "brand:wikipedia": "en:Pets at Home", "name": "Pets at Home", "shop": "pet"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Unleashed": {"name": "Unleashed", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/Petco/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62122874", "shop": "pet"}, "addTags": {"alt_name": "Unleashed by Petco", "brand": "Unleashed", "brand:wikidata": "Q62122874", "name": "Unleashed", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Wild Birds Unlimited": {"name": "Wild Birds Unlimited", "icon": "fas-cat", "imageURL": "https://pbs.twimg.com/profile_images/466209950788636672/DHjpTthh_bigger.jpeg", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q8000542", "shop": "pet"}, "addTags": {"brand": "Wild Birds Unlimited", "brand:wikidata": "Q8000542", "brand:wikipedia": "en:Wild Birds Unlimited", "name": "Wild Birds Unlimited", "shop": "pet"}, "countryCodes": ["us"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Бетховен": {"name": "Бетховен", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/zoobethowenclub/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62390798", "shop": "pet"}, "addTags": {"brand": "Бетховен", "brand:wikidata": "Q62390798", "name": "Бетховен", "shop": "pet"}, "countryCodes": ["ru"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/Четыре лапы": {"name": "Четыре лапы", "icon": "fas-cat", "imageURL": "https://graph.facebook.com/4laps/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q62390783", "shop": "pet"}, "addTags": {"brand": "Четыре лапы", "brand:wikidata": "Q62390783", "name": "Четыре лапы", "shop": "pet"}, "countryCodes": ["kz", "ru"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/pet/イオンペット": {"name": "イオンペット", "icon": "fas-cat", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q11286064", "shop": "pet"}, "addTags": {"brand": "イオンペット", "brand:en": "Aeonpet", "brand:ja": "イオンペット", "brand:wikidata": "Q11286064", "brand:wikipedia": "ja:イオンペット", "name": "イオンペット", "name:en": "Aeonpet", "name:ja": "イオンペット", "shop": "pet"}, "countryCodes": ["jp"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/photo/Kamera Express": {"name": "Kamera Express", "icon": "fas-camera-retro", "imageURL": "https://graph.facebook.com/kameraexpress/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q77976400", "shop": "photo"}, "addTags": {"brand": "Kamera Express", "brand:wikidata": "Q77976400", "name": "Kamera Express", "shop": "photo"}, "countryCodes": ["be", "de", "nl"], "terms": [], "matchScore": 2, "suggestion": true},
"shop/photo/Kodak Express": {"name": "Kodak Express", "icon": "fas-camera-retro", "imageURL": "https://graph.facebook.com/kodakexpress/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q6425126", "shop": "photo"}, "addTags": {"brand": "Kodak Express", "brand:wikidata": "Q6425126", "brand:wikipedia": "en:Kodak Express", "name": "Kodak Express", "shop": "photo"}, "terms": ["kodak"], "matchScore": 2, "suggestion": true},
"shop/photo/Max Spielmann": {"name": "Max Spielmann", "icon": "fas-camera-retro", "imageURL": "https://graph.facebook.com/MaxPhotoCentres/picture?type=large", "geometry": ["point", "area"], "tags": {"brand:wikidata": "Q76221051", "shop": "photo"}, "addTags": {"brand": "Max Spielmann", "brand:wikidata": "Q76221051", "name": "Max Spielmann", "shop": "photo"}, "countryCodes": ["gb"], "terms": [], "matchScore": 2, "suggestion": true},
@@ -16,7 +16,7 @@
"amenity": "ferry_terminal"
},
"matchScore": 0.95,
"name": "Ferry Station / Terminal",
"name": "Ferry Terminal",
"searchable": false,
"replacement": "public_transport/station_ferry"
}
@@ -0,0 +1,44 @@
{
"icon": "fas-box-open",
"fields": [
"name",
"operator",
"opening_hours",
"opening_hours/covid19",
"access_simple",
"website"
],
"moreFields": [
"address",
"brand",
"capacity",
"covered",
"email",
"indoor",
"level",
"lit",
"location",
"phone",
"ref",
"wheelchair"
],
"geometry": [
"point",
"area"
],
"terms": [
"donations",
"free box",
"free table",
"freebox",
"give box",
"give shelf",
"givebox",
"library",
"share shelf"
],
"tags": {
"amenity": "give_box"
},
"name": "Free Box"
}
@@ -14,11 +14,13 @@
"access_simple",
"address",
"brand",
"covered",
"email",
"indoor",
"level",
"location",
"phone",
"website",
"ref",
"wheelchair"
],
"geometry": [
+1 -1
View File
@@ -7,5 +7,5 @@
"tags": {
"craft": "handicraft"
},
"name": "Handicraft"
"name": "Handicraft Workspace"
}
+1 -1
View File
@@ -12,5 +12,5 @@
"tags": {
"craft": "hvac"
},
"name": "HVAC"
"name": "HVAC Workplace"
}
+1
View File
@@ -1,4 +1,5 @@
{
"icon": "fas-store-alt-slash",
"fields": [
"disused/shop"
],
@@ -0,0 +1,36 @@
{
"icon": "fas-teeth",
"fields": [
"{amenity/dentist}"
],
"moreFields": [
"{amenity/dentist}"
],
"geometry": [
"point",
"area"
],
"terms": [
"braces",
"dentistry",
"dentofacial orthopedics",
"headgear",
"jaw alignment",
"teeth",
"tooth"
],
"tags": {
"healthcare": "dentist",
"healthcare:speciality": "orthodontics"
},
"addTags": {
"healthcare": "dentist",
"amenity": "dentist",
"healthcare:speciality": "orthodontics"
},
"reference": {
"key": "healthcare:speciality",
"value": "orthodontics"
},
"name": "Orthodontist"
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"icon": "temaki-yield",
"fields": [
"direction_vertex"
"direction_vertex_dual"
],
"geometry": [
"vertex"
@@ -1,5 +1,5 @@
{
"icon": "maki-tennis",
"icon": "fas-table-tennis",
"fields": [
"name",
"lit",
@@ -0,0 +1,20 @@
{
"icon": "maki-square-stroked",
"fields": [
"name"
],
"moreFields": [],
"geometry": [
"area"
],
"tags": {
"man_made": "courtyard"
},
"terms": [
"court",
"enclosed open air",
"quadrangle",
"yard"
],
"name": "Courtyard"
}
@@ -22,13 +22,5 @@
"tags": {
"man_made": "lighthouse"
},
"addTags": {
"man_made": "lighthouse",
"seamark:type": "light_major"
},
"removeTags": {
"man_made": "lighthouse",
"seamark:type": "*"
},
"name": "Lighthouse"
}
@@ -36,5 +36,5 @@
"transit",
"transportation"
],
"name": "Ferry Station / Terminal"
"name": "Ferry Terminal"
}
+29
View File
@@ -0,0 +1,29 @@
{
"icon": "fas-th",
"fields": [
"name",
"collector",
"{shop}"
],
"geometry": [
"point",
"area"
],
"terms": [
"antiques",
"coins",
"collection",
"collectors",
"comics",
"dolls",
"figurines",
"numismatics",
"philately",
"stamps",
"thrift"
],
"tags": {
"shop": "collector"
},
"name": "Collectibles Shop"
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"icon": "maki-dog-park",
"icon": "fas-cat",
"geometry": [
"point",
"area"
+14 -2
View File
@@ -107,7 +107,7 @@
"text": "shortcuts.browsing.selecting.title"
},
{
"shortcuts": ["Left-click"],
"shortcuts": ["Left-click", "shortcuts.key.space"],
"text": "shortcuts.browsing.selecting.select_one"
},
{
@@ -131,7 +131,7 @@
"text": "shortcuts.browsing.with_selected.title"
},
{
"shortcuts": ["Right-click", "shortcuts.key.space"],
"shortcuts": ["Right-click", ""],
"text": "shortcuts.browsing.with_selected.edit_menu"
},
{
@@ -269,6 +269,18 @@
"shortcuts": ["operations.move.key"],
"text": "shortcuts.editing.operations.move"
},
{
"modifiers": ["⇧"],
"shortcuts": ["↓", "↑", "←", "→"],
"text": "shortcuts.editing.operations.nudge",
"separator": ","
},
{
"modifiers": ["⌘", "⇧"],
"shortcuts": ["↓", "↑", "←", "→"],
"text": "shortcuts.editing.operations.nudge_more",
"separator": ","
},
{
"shortcuts": ["operations.rotate.key"],
"text": "shortcuts.editing.operations.rotate"
+29 -10
View File
@@ -62,7 +62,7 @@
{"key": "amenity", "value": "bus_station", "description": "🄿 Bus Station / Terminal (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/bus.svg"},
{"key": "amenity", "value": "coworking_space", "description": "🄿 Coworking Space (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/commercial-15.svg"},
{"key": "amenity", "value": "embassy", "description": "🄿 Embassy (unsearchable), 🄳 ➜ office=diplomatic", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/embassy.svg"},
{"key": "amenity", "value": "ferry_terminal", "description": "🄿 Ferry Station / Terminal (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/ferry.svg"},
{"key": "amenity", "value": "ferry_terminal", "description": "🄿 Ferry Terminal (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/ferry.svg"},
{"key": "amenity", "value": "nursing_home", "description": "🄿 Nursing Home (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/wheelchair-15.svg"},
{"key": "amenity", "value": "recycling", "description": "🄿 Recycling (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/recycling-15.svg"},
{"key": "amenity", "value": "animal_boarding", "description": "🄿 Animal Boarding Facility", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/veterinary-15.svg"},
@@ -129,6 +129,7 @@
{"key": "amenity", "value": "fountain", "description": "🄿 Fountain", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/fountain.svg"},
{"key": "amenity", "value": "fuel", "description": "🄿 Gas Station", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/fuel-15.svg"},
{"key": "amenity", "value": "gambling", "description": "🄿 Gambling Hall", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-coins.svg"},
{"key": "amenity", "value": "give_box", "description": "🄿 Free Box", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-box-open.svg"},
{"key": "amenity", "value": "grave_yard", "description": "🄿 Graveyard", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/cemetery-15.svg"},
{"key": "amenity", "value": "grit_bin", "description": "🄿 Grit Bin", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-box.svg"},
{"key": "amenity", "value": "hospital", "description": "🄿 Hospital Grounds", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/hospital-15.svg"},
@@ -407,8 +408,8 @@
{"key": "craft", "value": "floorer", "description": "🄿 Floorer", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/brick_trowel.svg"},
{"key": "craft", "value": "gardener", "description": "🄿 Gardener", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/garden-centre-15.svg"},
{"key": "craft", "value": "glaziery", "description": "🄿 Glaziery", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/window.svg"},
{"key": "craft", "value": "handicraft", "description": "🄿 Handicraft", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/vase.svg"},
{"key": "craft", "value": "hvac", "description": "🄿 HVAC", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tools.svg"},
{"key": "craft", "value": "handicraft", "description": "🄿 Handicraft Workspace", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/vase.svg"},
{"key": "craft", "value": "hvac", "description": "🄿 HVAC Workplace", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tools.svg"},
{"key": "craft", "value": "insulation", "description": "🄿 Insulator", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tools.svg"},
{"key": "craft", "value": "joiner", "description": "🄿 Joiner", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/tools.svg"},
{"key": "craft", "value": "key_cutter", "description": "🄿 Key Cutter", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-key.svg"},
@@ -439,7 +440,7 @@
{"key": "cycleway", "value": "asl", "description": "🄿 Advanced Stop Line", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/bicycle-15.svg"},
{"key": "demolished:building", "description": "🄿 Recently Demolished Building (unsearchable)", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-house-damage.svg"},
{"key": "disused:railway", "description": "🄿 Disused Railway Feature (unsearchable), 🄵 Type", "object_types": ["node", "way", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/rail_profile.svg"},
{"key": "disused:shop", "description": "🄿 Disused Shop (unsearchable), 🄵 Type", "object_types": ["node", "area"]},
{"key": "disused:shop", "description": "🄿 Disused Shop (unsearchable), 🄵 Type", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-store-alt-slash.svg"},
{"key": "emergency", "value": "designated", "description": "🄿 Emergency Access Designated (unsearchable)", "object_types": ["way"]},
{"key": "emergency", "value": "destination", "description": "🄿 Emergency Access Destination (unsearchable)", "object_types": ["way"]},
{"key": "emergency", "value": "no", "description": "🄿 Emergency Access No (unsearchable)", "object_types": ["way"]},
@@ -481,6 +482,7 @@
{"key": "healthcare", "value": "birthing_center", "description": "🄿 Birthing Center", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-baby.svg"},
{"key": "healthcare", "value": "blood_donation", "description": "🄿 Blood Donor Center", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/blood-bank-15.svg"},
{"key": "healthcare", "value": "counselling", "description": "🄿 Counselling Center", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-comments.svg"},
{"key": "healthcare:speciality", "value": "orthodontics", "description": "🄿 Orthodontist", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-teeth.svg"},
{"key": "healthcare", "value": "hospice", "description": "🄿 Hospice", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/hospital-15.svg"},
{"key": "healthcare", "value": "laboratory", "description": "🄿 Medical Laboratory", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-vial.svg"},
{"key": "healthcare", "value": "midwife", "description": "🄿 Midwife", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-baby.svg"},
@@ -691,7 +693,7 @@
{"key": "sport", "value": "skateboard", "description": "🄿 Skate Park", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/skateboard-15.svg"},
{"key": "sport", "value": "soccer", "description": "🄿 Soccer Field", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/soccer-15.svg"},
{"key": "sport", "value": "softball", "description": "🄿 Softball Field", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/baseball-15.svg"},
{"key": "sport", "value": "table_tennis", "description": "🄿 Ping Pong Table", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/tennis-15.svg"},
{"key": "sport", "value": "table_tennis", "description": "🄿 Ping Pong Table", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-table-tennis.svg"},
{"key": "sport", "value": "tennis", "description": "🄿 Tennis Court", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/tennis-15.svg"},
{"key": "sport", "value": "volleyball", "description": "🄿 Volleyball Court", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/volleyball-15.svg"},
{"key": "leisure", "value": "playground", "description": "🄿 Playground", "object_types": ["area", "node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/playground-15.svg"},
@@ -720,6 +722,7 @@
{"key": "man_made", "value": "cairn", "description": "🄿 Cairn", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/cairn.svg"},
{"key": "man_made", "value": "chimney", "description": "🄿 Chimney", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/chimney.svg"},
{"key": "man_made", "value": "clearcut", "description": "🄿 Clearcut Forest", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/logging-15.svg"},
{"key": "man_made", "value": "courtyard", "description": "🄿 Courtyard", "object_types": ["area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/square-stroked-15.svg"},
{"key": "man_made", "value": "crane", "description": "🄿 Crane", "object_types": ["node", "way", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/crane.svg"},
{"key": "man_made", "value": "cross", "description": "🄿 Summit Cross", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/religious-christian-15.svg"},
{"key": "man_made", "value": "cutline", "description": "🄿 Cut line", "object_types": ["way"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/logging-15.svg"},
@@ -937,7 +940,7 @@
{"key": "power", "value": "transformer", "description": "🄿 Transformer", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/power_transformer.svg"},
{"key": "public_transport", "value": "platform", "description": "🄿 Transit Stop / Platform, 🄿 Transit Platform", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/sign_and_bench.svg"},
{"key": "aerialway", "value": "yes", "description": "🄿 Aerialway Stop / Platform (unsearchable), 🄿 Aerialway Platform, 🄿 Aerialway Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/gondola_lift.svg"},
{"key": "ferry", "value": "yes", "description": "🄿 Ferry Stop / Platform (unsearchable), 🄿 Ferry Platform, 🄿 Ferry Station / Terminal, 🄿 Ferry Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/ferry.svg"},
{"key": "ferry", "value": "yes", "description": "🄿 Ferry Stop / Platform (unsearchable), 🄿 Ferry Platform, 🄿 Ferry Terminal, 🄿 Ferry Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/ferry.svg"},
{"key": "light_rail", "value": "yes", "description": "🄿 Light Rail Stop / Platform (unsearchable), 🄿 Light Rail Platform, 🄿 Light Rail Station, 🄿 Light Rail Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/light_rail.svg"},
{"key": "monorail", "value": "yes", "description": "🄿 Monorail Stop / Platform (unsearchable), 🄿 Monorail Platform, 🄿 Monorail Station, 🄿 Monorail Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/monorail.svg"},
{"key": "subway", "value": "yes", "description": "🄿 Subway Stop / Platform (unsearchable), 🄿 Subway Platform, 🄿 Subway Station, 🄿 Subway Stopping Location", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/subway.svg"},
@@ -1027,6 +1030,7 @@
{"key": "clothes", "value": "underwear", "description": "🄿 Underwear Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/clothing-store-15.svg"},
{"key": "clothes", "value": "wedding", "description": "🄿 Wedding Clothes Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/gown.svg"},
{"key": "shop", "value": "coffee", "description": "🄿 Coffee Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/coffee.svg"},
{"key": "shop", "value": "collector", "description": "🄿 Collectibles Shop", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-th.svg"},
{"key": "shop", "value": "computer", "description": "🄿 Computer Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-laptop.svg"},
{"key": "shop", "value": "confectionery", "description": "🄿 Candy Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/confectionery-15.svg"},
{"key": "shop", "value": "convenience", "description": "🄿 Convenience Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-shopping-basket.svg"},
@@ -1106,7 +1110,7 @@
{"key": "shop", "value": "pawnbroker", "description": "🄿 Pawn Shop", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/money_hand.svg"},
{"key": "shop", "value": "perfumery", "description": "🄿 Perfume Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/perfume.svg"},
{"key": "shop", "value": "pet_grooming", "description": "🄿 Pet Grooming Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/pet_grooming.svg"},
{"key": "shop", "value": "pet", "description": "🄿 Pet Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/dog-park-15.svg"},
{"key": "shop", "value": "pet", "description": "🄿 Pet Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-cat.svg"},
{"key": "shop", "value": "photo", "description": "🄿 Photography Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-camera-retro.svg"},
{"key": "shop", "value": "pottery", "description": "🄿 Pottery Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/vase.svg"},
{"key": "shop", "value": "printer_ink", "description": "🄿 Printer Ink Store", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/fas-print.svg"},
@@ -1393,6 +1397,7 @@
{"key": "circumference", "description": "🄵 Circumference"},
{"key": "clothes", "description": "🄵 Clothes"},
{"key": "collection_times", "description": "🄵 Collection Times"},
{"key": "collector", "description": "🄵 Items"},
{"key": "colour", "description": "🄵 Color"},
{"key": "comment", "description": "🄵 Changeset Comment"},
{"key": "communication:", "description": "🄵 Communication Types"},
@@ -1683,10 +1688,11 @@
{"key": "park_ride", "description": "🄵 Park and Ride"},
{"key": "parking_space", "description": "🄵 Type"},
{"key": "parking", "value": "surface", "description": "🄵 Type"},
{"key": "parking", "value": "sheds", "description": "🄵 Type"},
{"key": "parking", "value": "lane", "description": "🄵 Type"},
{"key": "parking", "value": "carports", "description": "🄵 Type"},
{"key": "parking", "value": "garage_boxes", "description": "🄵 Type"},
{"key": "parking", "value": "lane", "description": "🄵 Type"},
{"key": "parking", "value": "rooftop", "description": "🄵 Type"},
{"key": "parking", "value": "sheds", "description": "🄵 Type"},
{"key": "payment:", "description": "🄵 Payment Types"},
{"key": "phases", "description": "🄵 Phases"},
{"key": "phone", "description": "🄵 Telephone"},
@@ -2000,6 +2006,7 @@
{"key": "amenity", "value": "firepit", "description": "🄳 ➜ leisure=firepit"},
{"key": "amenity", "value": "garage", "description": "🄳 ➜ landuse=garages"},
{"key": "amenity", "value": "garages", "description": "🄳 ➜ landuse=garages"},
{"key": "amenity", "value": "givebox", "description": "🄳 ➜ amenity=give_box"},
{"key": "amenity", "value": "gym", "description": "🄳 ➜ leisure=fitness_centre"},
{"key": "amenity", "value": "hotel", "description": "🄳 ➜ tourism=hotel"},
{"key": "amenity", "value": "kiosk", "description": "🄳 ➜ shop=kiosk"},
@@ -2043,6 +2050,8 @@
{"key": "camp_site", "value": "camp_pitch", "description": "🄳 ➜ tourism=camp_pitch"},
{"key": "color", "description": "🄳 ➜ colour=*"},
{"key": "company", "value": "consulting", "description": "🄳 ➜ office=consulting"},
{"key": "content", "value": "unknown", "description": "🄳"},
{"key": "contents", "description": "🄳 ➜ content=*"},
{"key": "craft", "value": "catering", "description": "🄳 ➜ craft=caterer"},
{"key": "craft", "value": "glass", "description": "🄳 ➜ craft=glaziery"},
{"key": "craft", "value": "jeweler", "description": "🄳 ➜ shop=jewelry"},
@@ -2118,6 +2127,8 @@
{"key": "internet_access:type", "description": "🄳 ➜ internet_access=*"},
{"key": "kerb", "value": "dropped", "description": "🄳 ➜ kerb=lowered"},
{"key": "kerb", "value": "flat", "description": "🄳 ➜ kerb=flush"},
{"key": "landcover", "value": "flower_bed", "description": "🄳 ➜ landuse=flowerbed"},
{"key": "landcover", "value": "flowerbed", "description": "🄳 ➜ landuse=flowerbed"},
{"key": "landuse", "value": "conservation", "description": "🄳 ➜ boundary=protected_area"},
{"key": "landuse", "value": "field", "description": "🄳 ➜ landuse=farmland"},
{"key": "landuse", "value": "garden", "description": "🄳 ➜ leisure=garden"},
@@ -2136,11 +2147,13 @@
{"key": "LEVELS", "description": "🄳 ➜ building:levels=*"},
{"key": "levels_count", "description": "🄳 ➜ building:levels=*"},
{"key": "man_made", "value": "cut_line", "description": "🄳 ➜ man_made=cutline"},
{"key": "man_made", "value": "flower_bed", "description": "🄳 ➜ landuse=flowerbed"},
{"key": "man_made", "value": "flowerbed", "description": "🄳 ➜ landuse=flowerbed"},
{"key": "man_made", "value": "fuel_storage_tank", "description": "🄳 ➜ man_made=storage_tank + content=fuel"},
{"key": "man_made", "value": "gas_well", "description": "🄳 ➜ man_made=petroleum_well + substance=gas"},
{"key": "man_made", "value": "jetty", "description": "🄳 ➜ man_made=pier"},
{"key": "man_made", "value": "mdf", "description": "🄳 ➜ telecom=exchange"},
{"key": "man_made", "value": "MDF", "description": "🄳 ➜ telecom=exchange"},
{"key": "man_made", "value": "fuel_storage_tank", "description": "🄳 ➜ man_made=storage_tank + content=fuel"},
{"key": "man_made", "value": "oil_tank", "description": "🄳 ➜ man_made=storage_tank + content=oil"},
{"key": "man_made", "value": "oil_well", "description": "🄳 ➜ man_made=petroleum_well + substance=oil"},
{"key": "man_made", "value": "telephone_exchange", "description": "🄳 ➜ telecom=exchange"},
@@ -2180,6 +2193,12 @@
{"key": "operator:type", "value": "Public", "description": "🄳 ➜ operator:type=public"},
{"key": "operator:type", "value": "Publico", "description": "🄳 ➜ operator:type=public"},
{"key": "operator:type", "value": "unknown", "description": "🄳"},
{"key": "parking", "value": "covered", "description": "🄳 ➜ covered=yes"},
{"key": "parking", "value": "customers", "description": "🄳 ➜ access=customers"},
{"key": "parking", "value": "entrance", "description": "🄳 ➜ amenity=parking_entrance"},
{"key": "parking", "value": "park_and_ride", "description": "🄳 ➜ park_ride=yes"},
{"key": "parking", "value": "private", "description": "🄳 ➜ access=private"},
{"key": "parking", "value": "street", "description": "🄳 ➜ parking=lane"},
{"key": "place_name", "description": "🄳 ➜ name=*"},
{"key": "pole", "value": "transition", "description": "🄳 ➜ location:transition=yes"},
{"key": "postcode", "description": "🄳 ➜ addr:postcode=*"},
+73 -26
View File
@@ -39,26 +39,22 @@
"add_area": {
"title": "Area",
"description": "Add parks, buildings, lakes or other areas to the map.",
"tail": "Click on the map to start drawing an area, like a park, lake, or building.",
"filter_tooltip": "areas"
},
"add_line": {
"title": "Line",
"description": "Add highways, streets, pedestrian paths, canals or other lines to the map.",
"tail": "Click on the map to start drawing a road, path, or route.",
"filter_tooltip": "lines"
},
"add_point": {
"title": "Point",
"description": "Add restaurants, monuments, postal boxes or other points to the map.",
"tail": "Click on the map to add a point.",
"filter_tooltip": "points"
},
"add_note": {
"title": "Note",
"label": "Add Note",
"description": "Spotted an issue? Let other mappers know.",
"tail": "Click on the map to add a note.",
"key": "N"
},
"add_preset": {
@@ -68,12 +64,6 @@
"title": "Browse",
"description": "Pan and zoom the map."
},
"draw_area": {
"tail": "Click to add nodes to your area. Click the first node to finish the area."
},
"draw_line": {
"tail": "Click to add more nodes to the line. Click on other lines to connect to them, and double-click to end the line."
},
"drag_node": {
"connected_to_hidden": "This can't be edited because it is connected to a hidden feature."
}
@@ -113,6 +103,33 @@
"change_tags": {
"annotation": "Changed tags."
},
"copy": {
"title": "Copy",
"description": {
"single": "Set this feature for pasting.",
"multiple": "Set these features for pasting."
},
"annotation": {
"single": "Copied a feature.",
"multiple": "Copied {n} features."
},
"too_large": {
"single": "This can't be copied because not enough of it is currently visible.",
"multiple": "These can't be copied because not enough of them are currently visible."
}
},
"paste": {
"title": "Paste",
"description": {
"single": "Add a duplicate {feature} here.",
"multiple": "Add {n} duplicate features here."
},
"annotation": {
"single": "Pasted a feature.",
"multiple": "Pasted {n} features."
},
"nothing_copied": "No features have been copied."
},
"circularize": {
"title": "Circularize",
"description": {
@@ -491,6 +508,9 @@
"vertex": {
"single": "Extract this point from its parent lines/areas."
},
"line": {
"single": "Extract a point from this line."
},
"area": {
"single": "Extract a point from this area."
}
@@ -932,7 +952,7 @@
"custom_background": {
"tooltip": "Edit custom background",
"header": "Custom Background Settings",
"instructions": "Enter a tile URL template. Valid tokens are:\n {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n {-y} or {ty} for flipped TMS-style Y coordinates\n {u} for quadtile scheme\n {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}",
"instructions": "Enter a tile URL template below.\n\nSupported WMS tokens:\n `{proj}`: requested projection (`EPSG:3857` only)\n `{wkid}`: same as proj, but without the EPSG (`3857` only)\n `{width}`, `{height}`: requested image dimensions (`256` only)\n `{bbox}`: requested bounding box (e.g. `minX,minY,maxX,maxY`)\n\nSupported TMS tokens:\n `{zoom}` or `{z}, `{x}`, `{y}`: Z/X/Y tile coordinates\n `{-y}` or `{ty}`: flipped TMS-style Y coordinates\n `{switch:a,b,c}`: DNS server multiplexing\n `{u}`: quadtile (Bing) scheme\n\nExample:\n{example}",
"template": {
"placeholder": "Enter a url template"
}
@@ -2294,19 +2314,16 @@
"welcome": "Welcome! This walkthrough will teach you the basics of editing on OpenStreetMap.",
"practice": "All of the data in this walkthrough is just for practicing, and any edits that you make in the walkthrough will not be saved.",
"words": "This walkthrough will introduce some new words and concepts. When we introduce a new word, we'll use *italics*.",
"mouse": "You can use any input device to edit the map, but this walkthrough assumes you have a mouse with left and right buttons. **If you want to attach a mouse, do so now, then click OK.**",
"leftclick": "When this tutorial asks you to click or double-click, we mean with the left button. On a trackpad it might be a single-click or single-finger tap. **Left-click {num} times.**",
"rightclick": "Sometimes we'll also ask you to right-click. This might be the same as control-click, or two-finger tap on a trackpad. Your keyboard might even have a 'menu' key that works like right-click. **Right-click {num} times.**",
"chapters": "So far, so good! You can use the buttons below to skip chapters at any time or to restart a chapter if you get stuck. Let's begin! **Click '{next}' to continue.**"
"chapters": "You can use the buttons below to skip chapters at any time or to restart a chapter if you get stuck. Let's begin! **Press '{next}' to continue.**"
},
"navigation": {
"title": "Navigation",
"drag": "The main map area shows OpenStreetMap data on top of a background.{br}You can drag the map by pressing and holding the left mouse button while moving the mouse around. You can also use the arrow keys on your keyboard. **Drag the map!**",
"zoom": "You can zoom in or out by scrolling with the mouse wheel or trackpad, or by clicking the {plus} / {minus} buttons. **Zoom the map!**",
"drag": "The main map area shows OpenStreetMap data on top of a background.{br}You can click-and-drag or tap-and-drag the map to move it around. You can also use the arrow keys on a keyboard. **Drag the map!**",
"zoom": "You can zoom in or out by scrolling with a mouse wheel, pinching on a touchscreen, or pressing the {plus} / {minus} buttons. **Zoom the map!**",
"features": "We use the word *features* to describe the things that appear on the map. Anything in the real world can be mapped as a feature on OpenStreetMap.",
"points_lines_areas": "Map features are represented using *points, lines, or areas.*",
"nodes_ways": "In OpenStreetMap, points are sometimes called *nodes*, and lines and areas are sometimes called *ways*.",
"click_townhall": "All features on the map can be selected by clicking on them. **Click on the point to select it.**",
"click_townhall": "All features on the map can be selected by clicking or tapping on them. **Select the point.**",
"selected_townhall": "Great! The point is now selected. Selected features are drawn with a pulsing glow.",
"editor_townhall": "When a feature is selected, the *feature editor* is displayed alongside the map.",
"preset_townhall": "The top part of the feature editor shows the feature's type. This point is a {preset}.",
@@ -2316,7 +2333,7 @@
"choose_street": "**Choose {name} from the list to select it.**",
"selected_street": "Great! {name} is now selected.",
"editor_street": "The fields shown for a street are different than the fields that were shown for the town hall.{br}For this selected street, the feature editor shows fields like '{field1}' and '{field2}'. **Close the feature editor by hitting escape or pressing the {button} button.**",
"play": "Try moving the map and clicking on some other features to see what kinds of things can be added to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**"
"play": "Try exploring the map and selecting some other features to see what kinds of things can be added to OpenStreetMap. **When you are ready to continue to the next chapter, press '{next}'.**"
},
"points": {
"title": "Points",
@@ -2427,6 +2444,7 @@
"enter": "Enter",
"esc": "Esc",
"home": "Home",
"menu": "Menu",
"option": "Option",
"pause": "Pause",
"pgdn": "PgDn",
@@ -2510,6 +2528,8 @@
"split": "Split a line into two at the selected node",
"reverse": "Reverse selected features",
"move": "Move selected features",
"nudge": "Nudge selected features",
"nudge_more": "Nudge selected features by a lot",
"rotate": "Rotate selected features",
"orthogonalize": "Square corners of a line or area",
"straighten": "Straighten a line or points",
@@ -3006,6 +3026,9 @@
"collection_times": {
"label": "Collection Times"
},
"collector": {
"label": "Items"
},
"colour": {
"label": "Color",
"terms": ""
@@ -3231,6 +3254,13 @@
"anticlockwise": "Counterclockwise"
}
},
"direction_vertex_dual": {
"label": "Direction Affected",
"options": {
"forward": "Forward",
"backward": "Backward"
}
},
"direction_vertex": {
"label": "Direction Affected",
"options": {
@@ -4017,12 +4047,13 @@
"label": "Type",
"options": {
"surface": "Surface",
"multi-storey": "Multilevel",
"underground": "Underground",
"sheds": "Sheds",
"multi-storey": "Multilevel",
"lane": "Roadside Lane",
"carports": "Carports",
"garage_boxes": "Garage Boxes",
"lane": "Roadside Lane"
"rooftop": "Rooftop",
"sheds": "Sheds"
}
},
"payment_multi_fee": {
@@ -5200,7 +5231,7 @@
"name": "Embassy"
},
"amenity/ferry_terminal": {
"name": "Ferry Station / Terminal"
"name": "Ferry Terminal"
},
"amenity/nursing_home": {
"name": "Nursing Home"
@@ -5467,6 +5498,10 @@
"name": "Gambling Hall",
"terms": "betting,bingo,blackjack,casino,craps,gamble,gambling,keno,lottery,pachinko,poker,roulette,slot machines,slots"
},
"amenity/give_box": {
"name": "Free Box",
"terms": "donations,free box,free table,freebox,give box,give shelf,givebox,library,share shelf"
},
"amenity/grave_yard": {
"name": "Graveyard",
"terms": "burial ground,cemetary,cemetery,churchyard,columbarium,grave yard,graveyard,mausoleum,tomb"
@@ -6602,11 +6637,11 @@
"terms": "glass,stained-glass,window"
},
"craft/handicraft": {
"name": "Handicraft",
"name": "Handicraft Workspace",
"terms": ""
},
"craft/hvac": {
"name": "HVAC",
"name": "HVAC Workplace",
"terms": "heat*,vent*,air conditioning"
},
"craft/insulator": {
@@ -6888,6 +6923,10 @@
"name": "Counselling Center",
"terms": ""
},
"healthcare/dentist/orthodontics": {
"name": "Orthodontist",
"terms": "braces,dentistry,dentofacial orthopedics,headgear,jaw alignment,teeth,tooth"
},
"healthcare/hospice": {
"name": "Hospice",
"terms": "terminal,illness"
@@ -7898,6 +7937,10 @@
"name": "Clearcut Forest",
"terms": "cut,forest,lumber,tree,wood"
},
"man_made/courtyard": {
"name": "Courtyard",
"terms": "court,enclosed open air,quadrangle,yard"
},
"man_made/crane": {
"name": "Crane",
"terms": ""
@@ -8847,7 +8890,7 @@
"terms": "bus,public transit,public transportation,station,terminal,transit,transportation"
},
"public_transport/station_ferry": {
"name": "Ferry Station / Terminal",
"name": "Ferry Terminal",
"terms": "boat,dock,ferry,pier,public transit,public transportation,station,terminal,transit,transportation"
},
"public_transport/station_light_rail": {
@@ -9239,6 +9282,10 @@
"name": "Coffee Store",
"terms": ""
},
"shop/collector": {
"name": "Collectibles Shop",
"terms": "antiques,coins,collection,collectors,comics,dolls,figurines,numismatics,philately,stamps,thrift"
},
"shop/computer": {
"name": "Computer Store",
"terms": "desktop,laptop,hardware,operating system,software"
+10 -3
View File
@@ -1,4 +1,5 @@
import { actionDeleteNode } from './delete_node';
import { actionDeleteWay } from './delete_way';
import { utilArrayUniq } from '../util';
@@ -36,9 +37,7 @@ export function actionConnect(nodeIDs) {
parents = graph.parentWays(node);
for (j = 0; j < parents.length; j++) {
if (!parents[j].areAdjacent(node.id, survivor.id)) {
graph = graph.replace(parents[j].replaceNode(node.id, survivor.id));
}
graph = graph.replace(parents[j].replaceNode(node.id, survivor.id));
}
parents = graph.parentRelations(node);
@@ -52,6 +51,14 @@ export function actionConnect(nodeIDs) {
graph = graph.replace(survivor);
// find and delete any degenerate ways created by connecting adjacent vertices
parents = graph.parentWays(survivor);
for (i = 0; i < parents.length; i++) {
if (parents[i].isDegenerate()) {
graph = actionDeleteWay(parents[i].id)(graph);
}
}
return graph;
};
+26 -18
View File
@@ -1,8 +1,8 @@
import { geoPath as d3_geoPath } from 'd3-geo';
import { geoCentroid as d3_geoCentroid } from 'd3-geo';
import { osmNode } from '../osm/node';
export function actionExtract(entityID, projection) {
export function actionExtract(entityID) {
var extractedNodeID;
@@ -13,7 +13,7 @@ export function actionExtract(entityID, projection) {
return extractFromNode(entity, graph);
}
return extractFromArea(entity, graph);
return extractFromWayOrRelation(entity, graph);
};
function extractFromNode(node, graph) {
@@ -37,19 +37,26 @@ export function actionExtract(entityID, projection) {
}, graph);
}
function extractFromArea(entity, graph) {
function extractFromWayOrRelation(entity, graph) {
var fromGeometry = entity.geometry(graph);
var keysToCopyAndRetain = ['source', 'wheelchair'];
var keysToRetain = ['area', 'type'];
var keysToRetain = ['area'];
var buildingKeysToRetain = ['architect', 'building', 'height', 'layer'];
var centroid = d3_geoPath(projection).centroid(entity.asGeoJSON(graph, true));
var centroid = d3_geoCentroid(entity.asGeoJSON(graph));
var isBuilding = entity.tags.building;
var isBuilding = entity.tags.building && entity.tags.building !== 'no';
var areaTags = Object.assign({}, entity.tags); // shallow copy
var entityTags = Object.assign({}, entity.tags); // shallow copy
var pointTags = {};
for (var key in areaTags) {
for (var key in entityTags) {
if (entity.type === 'relation' &&
key === 'type') {
continue;
}
if (keysToRetain.indexOf(key) !== -1) {
continue;
@@ -62,21 +69,22 @@ export function actionExtract(entityID, projection) {
key.match(/^roof:.{1,}/)) continue;
}
// copy the tag from the area to the point
pointTags[key] = areaTags[key];
// copy the tag from the entity to the point
pointTags[key] = entityTags[key];
// leave addresses and some other tags so they're on both features
if (keysToCopyAndRetain.indexOf(key) !== -1 || key.match(/^addr:.{1,}/)) {
if (keysToCopyAndRetain.indexOf(key) !== -1 ||
key.match(/^addr:.{1,}/)) {
continue;
}
// remove the tag from the area
delete areaTags[key];
// remove the tag from the entity
delete entityTags[key];
}
if (!isBuilding) {
// ensure that the area keeps the area geometry
areaTags.area = 'yes';
if (!isBuilding && fromGeometry === 'area') {
// ensure that areas keep area geometry
entityTags.area = 'yes';
}
var replacement = osmNode({ loc: centroid, tags: pointTags });
@@ -84,7 +92,7 @@ export function actionExtract(entityID, projection) {
extractedNodeID = replacement.id;
return graph.replace(entity.update({tags: areaTags}));
return graph.replace(entity.update({tags: entityTags}));
}
action.getExtractedNodeID = function() {
-6
View File
@@ -37,11 +37,5 @@ export function behaviorAddWay(context) {
};
behavior.tail = function(text) {
draw.tail(text);
return behavior;
};
return utilRebind(behavior, dispatch, 'on');
}
-99
View File
@@ -1,99 +0,0 @@
import { event as d3_event } from 'd3-selection';
import { uiCmd } from '../ui/cmd';
import { utilArrayGroupBy } from '../util';
export function behaviorCopy(context) {
function groupEntities(ids, graph) {
var entities = ids.map(function (id) { return graph.entity(id); });
return Object.assign(
{ relation: [], way: [], node: [] },
utilArrayGroupBy(entities, 'type')
);
}
function getDescendants(id, graph, descendants) {
var entity = graph.entity(id);
var children;
descendants = descendants || {};
if (entity.type === 'relation') {
children = entity.members.map(function(m) { return m.id; });
} else if (entity.type === 'way') {
children = entity.nodes;
} else {
children = [];
}
for (var i = 0; i < children.length; i++) {
if (!descendants[children[i]]) {
descendants[children[i]] = true;
descendants = getDescendants(children[i], graph, descendants);
}
}
return descendants;
}
function getSelectionText() {
return window.getSelection().toString();
}
function doCopy() {
// prevent copy during low zoom selection
if (!context.map().withinEditableZoom()) return;
if (!getSelectionText()) {
d3_event.preventDefault();
}
var graph = context.graph();
var selected = groupEntities(context.selectedIDs(), graph);
var canCopy = [];
var skip = {};
var entity;
var i;
for (i = 0; i < selected.relation.length; i++) {
entity = selected.relation[i];
if (!skip[entity.id] && entity.isComplete(graph)) {
canCopy.push(entity.id);
skip = getDescendants(entity.id, graph, skip);
}
}
for (i = 0; i < selected.way.length; i++) {
entity = selected.way[i];
if (!skip[entity.id]) {
canCopy.push(entity.id);
skip = getDescendants(entity.id, graph, skip);
}
}
for (i = 0; i < selected.node.length; i++) {
entity = selected.node[i];
if (!skip[entity.id]) {
canCopy.push(entity.id);
}
}
context.copyIDs(canCopy);
}
function behavior() {
context.keybinding().on(uiCmd('⌘C'), doCopy);
return behavior;
}
behavior.off = function() {
context.keybinding().off(uiCmd('⌘C'));
};
return behavior;
}
+38 -33
View File
@@ -7,6 +7,7 @@ import {
selection as d3_selection
} from 'd3-selection';
import { geoVecLength } from '../geo';
import { osmNote } from '../osm';
import { utilRebind } from '../util/rebind';
import { utilFastMouse, utilPrefixCSSProperty, utilPrefixDOMProperty } from '../util';
@@ -29,11 +30,17 @@ import { utilFastMouse, utilPrefixCSSProperty, utilPrefixDOMProperty } from '../
export function behaviorDrag() {
var dispatch = d3_dispatch('start', 'move', 'end');
// see also behaviorSelect
var _tolerancePx = 1; // keep this low to facilitate pixel-perfect micromapping
var _penTolerancePx = 4; // styluses can be touchy so require greater movement - #1981
var _origin = null;
var _selector = '';
var _event;
var _target;
var _surface;
var _pointerId;
// use pointer events on supported platforms; fallback to mouse events
var _pointerPrefix = 'PointerEvent' in window ? 'pointer' : 'mouse';
@@ -49,12 +56,6 @@ export function behaviorDrag() {
};
function d3_eventCancel() {
d3_event.stopPropagation();
d3_event.preventDefault();
}
function eventOf(thiz, argumentz) {
return function(e1) {
e1.target = behavior;
@@ -64,13 +65,17 @@ export function behaviorDrag() {
function pointerdown() {
if (_pointerId) return;
_pointerId = d3_event.pointerId || 'mouse';
_target = this;
_event = eventOf(_target, arguments);
// only force reflow once per drag
var pointerLocGetter = utilFastMouse(_surface || _target.parentNode);
var eventTarget = d3_event.target;
var offset;
var startOrigin = pointerLocGetter(d3_event);
var started = false;
@@ -91,38 +96,44 @@ export function behaviorDrag() {
function pointermove() {
if (_pointerId !== (d3_event.pointerId || 'mouse')) return;
var p = pointerLocGetter(d3_event);
var dx = p[0] - startOrigin[0];
var dy = p[1] - startOrigin[1];
if (dx === 0 && dy === 0)
return;
startOrigin = p;
d3_eventCancel();
if (!started) {
var dist = geoVecLength(startOrigin, p);
var tolerance = d3_event.pointerType === 'pen' ? _penTolerancePx : _tolerancePx;
// don't start until the drag has actually moved somewhat
if (dist < tolerance) return;
started = true;
_event({ type: 'start' });
} else {
_event({
type: 'move',
point: [p[0] + offset[0], p[1] + offset[1]],
delta: [dx, dy]
});
}
startOrigin = p;
d3_event.stopPropagation();
d3_event.preventDefault();
var dx = p[0] - startOrigin[0];
var dy = p[1] - startOrigin[1];
_event({
type: 'move',
point: [p[0] + offset[0], p[1] + offset[1]],
delta: [dx, dy]
});
}
function pointerup() {
if (_pointerId !== (d3_event.pointerId || 'mouse')) return;
_pointerId = null;
if (started) {
_event({ type: 'end' });
d3_eventCancel();
if (d3_event.target === eventTarget) {
d3_select(window)
.on('click.drag', click, true);
}
d3_event.stopPropagation();
d3_event.preventDefault();
}
d3_select(window)
@@ -131,17 +142,11 @@ export function behaviorDrag() {
selectEnable();
}
function click() {
d3_eventCancel();
d3_select(window)
.on('click.drag', null);
}
}
function behavior(selection) {
_pointerId = null;
var matchesSelector = utilPrefixDOMProperty('matchesSelector');
var delegate = pointerdown;
-17
View File
@@ -8,11 +8,9 @@ import {
import { presetManager } from '../presets';
import { behaviorEdit } from './edit';
import { behaviorHover } from './hover';
import { behaviorTail } from './tail';
import { geoChooseEdge, geoVecLength } from '../geo';
import { utilFastMouse, utilKeybinding, utilRebind } from '../util';
var _usedTails = {};
var _disableSpace = false;
var _lastSpace = null;
@@ -26,7 +24,6 @@ export function behaviorDraw(context) {
var _hover = behaviorHover(context).altDisables(true).ignoreVertex(true)
.on('hover', context.ui().sidebar.hover);
var tail = behaviorTail();
var edit = behaviorEdit(context);
var closeTolerance = 4;
@@ -201,10 +198,6 @@ export function behaviorDraw(context) {
context.install(_hover);
context.install(edit);
if (!context.inIntro() && !_usedTails[tail.text()]) {
context.install(tail);
}
keybinding
.on('⌫', backspace)
.on('⌦', del)
@@ -231,11 +224,6 @@ export function behaviorDraw(context) {
context.uninstall(_hover);
context.uninstall(edit);
if (!context.inIntro() && !_usedTails[tail.text()]) {
context.uninstall(tail);
_usedTails[tail.text()] = true;
}
selection
.on('mouseenter.draw', null)
.on('mouseleave.draw', null)
@@ -251,11 +239,6 @@ export function behaviorDraw(context) {
};
behavior.tail = function(_) {
tail.text(_);
return behavior;
};
behavior.hover = function() {
return _hover;
};
-6
View File
@@ -428,11 +428,5 @@ export function behaviorDrawWay(context, wayID, index, mode, startGraph) {
};
drawWay.tail = function(text) {
behavior.tail(text);
return drawWay;
};
return utilRebind(drawWay, dispatch, 'on');
}
-2
View File
@@ -1,6 +1,5 @@
export { behaviorAddWay } from './add_way';
export { behaviorBreathe } from './breathe';
export { behaviorCopy } from './copy';
export { behaviorDrag } from './drag';
export { behaviorDrawWay } from './draw_way';
export { behaviorDraw } from './draw';
@@ -11,4 +10,3 @@ export { behaviorLasso } from './lasso';
export { behaviorOperation } from './operation';
export { behaviorPaste } from './paste';
export { behaviorSelect } from './select';
export { behaviorTail } from './tail';
+1
View File
@@ -30,6 +30,7 @@ export function behaviorOperation(context) {
.text(_operation.annotation() || _operation.title);
flash();
if (_operation.point) _operation.point(null);
_operation();
}
}
+6 -6
View File
@@ -6,7 +6,7 @@ import { geoExtent, geoPointInPolygon, geoVecSubtract } from '../geo';
import { modeMove } from '../modes/move';
import { uiCmd } from '../ui/cmd';
// see also `operationPaste`
export function behaviorPaste(context) {
function doPaste() {
@@ -22,13 +22,13 @@ export function behaviorPaste(context) {
if (!geoPointInPolygon(mouse, viewport)) return;
var extent = geoExtent();
var oldIDs = context.copyIDs();
if (!oldIDs.length) return;
var extent = geoExtent();
var oldGraph = context.copyGraph();
var newIDs = [];
if (!oldIDs.length) return;
var action = actionCopyEntities(oldIDs, oldGraph);
context.perform(action);
@@ -54,8 +54,8 @@ export function behaviorPaste(context) {
}
// Put pasted objects where mouse pointer is..
var center = projection(extent.center());
var delta = geoVecSubtract(mouse, center);
var copyPoint = (context.copyLonLat() && projection(context.copyLonLat())) || projection(extent.center());
var delta = geoVecSubtract(mouse, copyPoint);
context.perform(actionMove(newIDs, delta, projection));
context.enter(modeMove(context, newIDs, baseGraph));
+128 -64
View File
@@ -1,82 +1,135 @@
import { event as d3_event, select as d3_select } from 'd3-selection';
import { geoVecLength } from '../geo';
import { prefs } from '../core/preferences';
import { modeBrowse } from '../modes/browse';
import { modeSelect } from '../modes/select';
import { modeSelectData } from '../modes/select_data';
import { modeSelectNote } from '../modes/select_note';
import { modeSelectError } from '../modes/select_error';
import { osmEntity, osmNote, QAItem } from '../osm';
import { utilArrayIdentical } from '../util/array';
import { utilFastMouse } from '../util/util';
export function behaviorSelect(context) {
// legacy option to show menu on every click
var isShowAlways = +prefs('edit-menu-show-always') === 1;
var tolerance = 4;
var _lastMouse = null;
var _tolerancePx = 4; // see also behaviorDrag
var _lastPointerEvent = null;
var _showMenu = false;
var _p1 = null;
var _downPointerId = null;
var _longPressTimeout = null;
var _lastInteractionType = null;
// use pointer events on supported platforms; fallback to mouse events
var _pointerPrefix = 'PointerEvent' in window ? 'pointer' : 'mouse';
function point() {
return utilFastMouse(context.container().node())(d3_event);
function point(event) {
// Don't use map().mouse() since additional pointers unrelated to selection can
// move between pointerdown and pointerup. Use the `main-map` coordinate system
// since the surface and supersurface are transformed when drag-panning.
return utilFastMouse(context.container().select('.main-map').node())(event || d3_event);
}
function mapContains(event) {
var rect = context.container().select('.main-map').node().getBoundingClientRect();
return event.clientX >= rect.left &&
event.clientX <= rect.right &&
event.clientY >= rect.top &&
event.clientY <= rect.bottom;
}
function keydown() {
var e = d3_event;
if (e && e.shiftKey) {
if (d3_event.keyCode === 32) {
// don't react to spacebar events during text input
var activeNode = document.activeElement;
if (activeNode && new Set(['INPUT', 'TEXTAREA']).has(activeNode.nodeName)) return;
}
if (d3_event.keyCode === 93 || // context menu key
d3_event.keyCode === 32) { // spacebar
d3_event.preventDefault();
}
if (d3_event.repeat) return; // ignore repeated events for held keys
// if any key is pressed the user is probably doing something other than long-pressing
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
if (d3_event.shiftKey) {
context.surface()
.classed('behavior-multiselect', true);
}
if (e && e.keyCode === 93) { // context menu
e.preventDefault();
e.stopPropagation();
if (d3_event.keyCode === 32) { // spacebar
if (!_p1) {
_p1 = point(_lastPointerEvent);
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
_longPressTimeout = window.setTimeout(didLongPress, 500, 'spacebar');
}
}
}
function keyup() {
var e = d3_event;
if (!e || !e.shiftKey) {
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
if (!d3_event.shiftKey) {
context.surface()
.classed('behavior-multiselect', false);
}
if (e && e.keyCode === 93) { // context menu
e.preventDefault();
e.stopPropagation();
if (d3_event.keyCode === 93) { // context menu key
d3_event.preventDefault();
_lastInteractionType = 'menukey';
contextmenu();
} else if (d3_event.keyCode === 32) { // spacebar
d3_event.preventDefault();
_lastInteractionType = 'spacebar';
click();
}
}
function pointerdown() {
if (!_p1) {
_p1 = point();
}
if (_p1) return;
_p1 = point();
_downPointerId = d3_event.pointerId || 'mouse';
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
_longPressTimeout = window.setTimeout(didLongPress, 500, 'longdown-' + (d3_event.pointerType || 'mouse'));
_lastPointerEvent = d3_event;
d3_select(window)
.on(_pointerPrefix + 'up.select', pointerup, true);
}
_showMenu = isShowAlways;
function didLongPress(iType) {
// treat long presses like right-clicks
_longPressTimeout = null;
_lastInteractionType = iType;
_showMenu = true;
click();
}
function pointermove() {
if (d3_event) {
_lastMouse = d3_event;
}
if (_downPointerId && _downPointerId !== (d3_event.pointerId || 'mouse')) return;
_lastPointerEvent = d3_event;
}
function pointerup() {
if (_downPointerId !== (d3_event.pointerId || 'mouse')) return;
_downPointerId = null;
d3_select(window)
.on(_pointerPrefix + 'up.select', null, true);
click();
}
@@ -84,14 +137,16 @@ export function behaviorSelect(context) {
function contextmenu() {
var e = d3_event;
e.preventDefault();
e.stopPropagation();
if (!+e.clientX && !+e.clientY) {
if (_lastMouse) {
e.sourceEvent = _lastMouse;
if (_lastPointerEvent) {
e.sourceEvent = _lastPointerEvent;
} else {
return;
}
} else {
_lastPointerEvent = d3_event;
_lastInteractionType = 'rightclick';
}
if (!_p1) {
@@ -103,29 +158,35 @@ export function behaviorSelect(context) {
function click() {
d3_select(window)
.on(_pointerPrefix + 'up.select', null, true);
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
if (!_p1) return;
var p2 = point();
if (!_p1) {
resetProperties();
return;
}
var p2 = point(_lastPointerEvent);
var dist = geoVecLength(_p1, p2);
_p1 = null;
if (dist > tolerance) return;
if (dist > _tolerancePx || !mapContains(_lastPointerEvent)) {
resetProperties();
return;
}
var datum = d3_event.target.__data__ || (_lastMouse && _lastMouse.target.__data__);
var isMultiselect = d3_event.shiftKey || context.surface().select('.lasso').node();
var datum = (d3_event && d3_event.target.__data__) || (_lastPointerEvent && _lastPointerEvent.target.__data__);
var isMultiselect = (d3_event && d3_event.shiftKey) || context.surface().select('.lasso').node();
processClick(datum, isMultiselect);
processClick(datum, isMultiselect, p2);
}
function processClick(datum, isMultiselect) {
function processClick(datum, isMultiselect, point) {
var mode = context.mode();
var entity = datum && datum.properties && datum.properties.entity;
if (entity) datum = entity;
if (datum && datum.type === 'midpoint') {
// treat targeting midpoints as if targeting the parent way
datum = datum.parents[0];
}
@@ -137,39 +198,27 @@ export function behaviorSelect(context) {
context.selectedErrorID(null);
if (!isMultiselect) {
if (selectedIDs.length > 1 && (_showMenu && !isShowAlways)) {
// multiple things already selected, just show the menu...
mode.reselect().showMenu();
} else {
if (mode.id !== 'select' || !utilArrayIdentical(mode.selectedIDs(), [datum.id])) {
newMode = modeSelect(context, [datum.id]);
// select a single thing if it's not already selected
context.enter(newMode);
if (_showMenu) newMode.showMenu();
} else {
mode.reselect();
if (_showMenu) mode.showMenu();
}
if (selectedIDs.length <= 1 || !_showMenu) {
// always enter modeSelect even if the entity is already
// selected since listeners may expect `context.enter` events,
// e.g. in the walkthrough
newMode = modeSelect(context, [datum.id]);
context.enter(newMode);
}
} else {
if (selectedIDs.indexOf(datum.id) !== -1) {
// clicked entity is already in the selectedIDs list..
if (_showMenu && !isShowAlways) {
// don't deselect clicked entity, just show the menu.
mode.reselect().showMenu();
} else {
if (!_showMenu) {
// deselect clicked entity, then reenter select mode or return to browse mode..
selectedIDs = selectedIDs.filter(function(id) { return id !== datum.id; });
context.enter(selectedIDs.length ? modeSelect(context, selectedIDs) : modeBrowse(context));
}
} else {
// clicked entity is not in the selected list, add it..
selectedIDs = selectedIDs.concat([datum.id]);
newMode = modeSelect(context, selectedIDs);
context.enter(newMode);
if (_showMenu) newMode.showMenu();
}
}
@@ -196,19 +245,34 @@ export function behaviorSelect(context) {
}
}
// reset for next time..
context.ui().closeEditMenu();
// always request to show the edit menu in case the mode needs it
if (_showMenu) context.ui().showEditMenu(point, _lastInteractionType);
resetProperties();
}
function resetProperties() {
_showMenu = false;
_p1 = null;
_downPointerId = null;
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
_longPressTimeout = null;
_lastInteractionType = null;
// don't reset _lastPointerEvent since it might still be useful
}
function behavior(selection) {
_lastMouse = null;
_showMenu = false;
_p1 = null;
resetProperties();
_lastPointerEvent = context.map().lastPointerEvent();
d3_select(window)
.on('keydown.select', keydown)
.on('keyup.select', keyup)
.on(_pointerPrefix + 'move.select', pointermove, true)
.on('contextmenu.select-window', function() {
// Edge and IE really like to show the contextmenu on the
// menubar when user presses a keyboard menu button
@@ -216,13 +280,11 @@ export function behaviorSelect(context) {
var e = d3_event;
if (+e.clientX === 0 && +e.clientY === 0) {
d3_event.preventDefault();
d3_event.stopPropagation();
}
});
selection
.on(_pointerPrefix + 'down.select', pointerdown)
.on(_pointerPrefix + 'move.select', pointermove)
.on('contextmenu.select', contextmenu);
if (d3_event && d3_event.shiftKey) {
@@ -233,15 +295,17 @@ export function behaviorSelect(context) {
behavior.off = function(selection) {
if (_longPressTimeout) window.clearTimeout(_longPressTimeout);
d3_select(window)
.on('keydown.select', null)
.on('keyup.select', null)
.on('contextmenu.select-window', null)
.on(_pointerPrefix + 'move.select', null, true)
.on(_pointerPrefix + 'up.select', null, true);
selection
.on(_pointerPrefix + 'down.select', null)
.on(_pointerPrefix + 'move.select', null)
.on('contextmenu.select', null);
context.surface()
-99
View File
@@ -1,99 +0,0 @@
import {
event as d3_event,
select as d3_select
} from 'd3-selection';
import { utilSetTransform } from '../util';
import { utilGetDimensions } from '../util/dimensions';
export function behaviorTail() {
var container;
var xmargin = 25;
var tooltipSize = [0, 0];
var selectionSize = [0, 0];
var _text;
function behavior(selection) {
if (!_text) return;
d3_select(window)
.on('resize.tail', function() { selectionSize = utilGetDimensions(selection); });
container = d3_select(document.body)
.append('div')
.style('display', 'none')
.attr('class', 'tail popover-inner');
container.append('div')
.text(_text);
selection
.on('mousemove.tail', mousemove)
.on('mouseenter.tail', mouseenter)
.on('mouseleave.tail', mouseleave);
container
.on('mousemove.tail', mousemove);
tooltipSize = utilGetDimensions(container);
selectionSize = utilGetDimensions(selection);
function show() {
container.style('display', 'block');
tooltipSize = utilGetDimensions(container);
}
function mousemove() {
if (container.style('display') === 'none') show();
var xoffset = ((d3_event.clientX + tooltipSize[0] + xmargin) > selectionSize[0]) ?
-tooltipSize[0] - xmargin : xmargin;
container.classed('left', xoffset > 0);
utilSetTransform(container, d3_event.clientX + xoffset, d3_event.clientY);
}
function mouseleave() {
if (d3_event.relatedTarget !== container.node()) {
container.style('display', 'none');
}
}
function mouseenter() {
if (d3_event.relatedTarget !== container.node()) {
show();
}
}
}
behavior.off = function(selection) {
if (!_text) return;
container
.on('mousemove.tail', null)
.remove();
selection
.on('mousemove.tail', null)
.on('mouseenter.tail', null)
.on('mouseleave.tail', null);
d3_select(window)
.on('resize.tail', null);
};
behavior.text = function(val) {
if (!arguments.length) return _text;
_text = val;
return behavior;
};
return behavior;
}
+7
View File
@@ -282,6 +282,13 @@ export function coreContext() {
return context;
};
let _copyLonLat;
context.copyLonLat = function(val) {
if (!arguments.length) return _copyLonLat;
_copyLonLat = val;
return context;
};
/* Background */
let _background;
-2
View File
@@ -1,4 +1,3 @@
import { t } from '../core/localizer';
import { actionAddEntity } from '../actions/add_entity';
import { actionAddMidpoint } from '../actions/add_midpoint';
import { actionAddVertex } from '../actions/add_vertex';
@@ -12,7 +11,6 @@ export function modeAddArea(context, mode) {
mode.id = 'add-area';
var behavior = behaviorAddWay(context)
.tail(t('modes.add_area.tail'))
.on('start', start)
.on('startFromWay', startFromWay)
.on('startFromNode', startFromNode);
-2
View File
@@ -1,4 +1,3 @@
import { t } from '../core/localizer';
import { actionAddEntity } from '../actions/add_entity';
import { actionAddMidpoint } from '../actions/add_midpoint';
import { actionAddVertex } from '../actions/add_vertex';
@@ -12,7 +11,6 @@ export function modeAddLine(context, mode) {
mode.id = 'add-line';
var behavior = behaviorAddWay(context)
.tail(t('modes.add_line.tail'))
.on('start', start)
.on('startFromWay', startFromWay)
.on('startFromNode', startFromNode);
-1
View File
@@ -16,7 +16,6 @@ export function modeAddNote(context) {
};
var behavior = behaviorDraw(context)
.tail(t('modes.add_note.tail'))
.on('click', add)
.on('cancel', cancel)
.on('finish', cancel);
-1
View File
@@ -13,7 +13,6 @@ export function modeAddPoint(context, mode) {
mode.id = 'add-point';
var behavior = behaviorDraw(context)
.tail(t('modes.add_point.tail'))
.on('click', add)
.on('clickWay', addWay)
.on('clickNode', addNode)
+6
View File
@@ -8,6 +8,7 @@ import { behaviorSelect } from '../behavior/select';
import { modeDragNode } from './drag_node';
import { modeDragNote } from './drag_note';
import { operationPaste } from '../operations/paste';
export function modeBrowse(context) {
var mode = {
@@ -60,5 +61,10 @@ export function modeBrowse(context) {
};
mode.operations = function() {
return [operationPaste(context)];
};
return mode;
}
-1
View File
@@ -16,7 +16,6 @@ export function modeDrawArea(context, wayID, startGraph, button) {
var way = context.entity(wayID);
behavior = behaviorDrawWay(context, wayID, undefined, mode, startGraph)
.tail(t('modes.draw_area.tail'))
.on('rejectedSelfIntersection.modeDrawArea', function() {
context.ui().flash
.text(t('self_intersection.error.areas'))();
-1
View File
@@ -20,7 +20,6 @@ export function modeDrawLine(context, wayID, startGraph, button, affix, continui
var headID = (affix === 'prefix') ? way.first() : way.last();
behavior = behaviorDrawWay(context, wayID, index, mode, startGraph)
.tail(t('modes.draw_line.tail'))
.on('rejectedSelfIntersection.modeDrawLine', function() {
context.ui().flash
.text(t('self_intersection.error.lines'))();
+6 -6
View File
@@ -30,12 +30,12 @@ export function modeMove(context, entityIDs, baseGraph) {
var keybinding = utilKeybinding('move');
var behaviors = [
behaviorEdit(context),
operationCircularize(entityIDs, context).behavior,
operationDelete(entityIDs, context).behavior,
operationOrthogonalize(entityIDs, context).behavior,
operationReflectLong(entityIDs, context).behavior,
operationReflectShort(entityIDs, context).behavior,
operationRotate(entityIDs, context).behavior
operationCircularize(context, entityIDs).behavior,
operationDelete(context, entityIDs).behavior,
operationOrthogonalize(context, entityIDs).behavior,
operationReflectLong(context, entityIDs).behavior,
operationReflectShort(context, entityIDs).behavior,
operationRotate(context, entityIDs).behavior
];
var annotation = entityIDs.length === 1 ?
t('operations.move.annotation.' + context.graph().geometry(entityIDs[0])) :
+6 -6
View File
@@ -34,12 +34,12 @@ export function modeRotate(context, entityIDs) {
var keybinding = utilKeybinding('rotate');
var behaviors = [
behaviorEdit(context),
operationCircularize(entityIDs, context).behavior,
operationDelete(entityIDs, context).behavior,
operationMove(entityIDs, context).behavior,
operationOrthogonalize(entityIDs, context).behavior,
operationReflectLong(entityIDs, context).behavior,
operationReflectShort(entityIDs, context).behavior
operationCircularize(context, entityIDs).behavior,
operationDelete(context, entityIDs).behavior,
operationMove(context, entityIDs).behavior,
operationOrthogonalize(context, entityIDs).behavior,
operationReflectLong(context, entityIDs).behavior,
operationReflectShort(context, entityIDs).behavior
];
var annotation = entityIDs.length === 1 ?
t('operations.rotate.annotation.' + context.graph().geometry(entityIDs[0])) :
+8 -2
View File
@@ -16,6 +16,7 @@ export function modeSave(context) {
var commit = uiCommit(context)
.on('cancel', cancel);
var _conflictsUi; // uiConflicts
var _location;
var _success;
@@ -65,7 +66,7 @@ export function modeSave(context) {
.classed('active', true)
.classed('inactive', false);
var ui = uiConflicts(context)
_conflictsUi = uiConflicts(context)
.conflictList(conflicts)
.origChanges(origChanges)
.on('cancel', function() {
@@ -86,7 +87,7 @@ export function modeSave(context) {
uploader.processResolvedConflicts(changeset);
});
selection.call(ui);
selection.call(_conflictsUi);
}
@@ -199,6 +200,11 @@ export function modeSave(context) {
}
mode.selectedIDs = function() {
return _conflictsUi ? _conflictsUi.shownEntityIds() : [];
};
mode.enter = function() {
// Show sidebar
context.ui().sidebar.expand();
+40 -75
View File
@@ -4,21 +4,22 @@ import { t } from '../core/localizer';
import { actionAddMidpoint } from '../actions/add_midpoint';
import { actionDeleteRelation } from '../actions/delete_relation';
import { actionMove } from '../actions/move';
import { behaviorBreathe } from '../behavior/breathe';
import { behaviorCopy } from '../behavior/copy';
import { behaviorHover } from '../behavior/hover';
import { behaviorLasso } from '../behavior/lasso';
import { behaviorPaste } from '../behavior/paste';
import { behaviorSelect } from '../behavior/select';
import { geoExtent, geoChooseEdge, geoPointInPolygon } from '../geo';
import { operationMove } from '../operations/move';
import { geoExtent, geoChooseEdge } from '../geo';
import { modeBrowse } from './browse';
import { modeDragNode } from './drag_node';
import { modeDragNote } from './drag_note';
import { osmNode, osmWay } from '../osm';
import * as Operations from '../operations/index';
import { uiEditMenu } from '../ui/edit_menu';
import { uiCmd } from '../ui/cmd';
import {
utilArrayIntersection, utilDeepMemberSelector, utilEntityOrDeepMemberSelector,
@@ -38,7 +39,6 @@ export function modeSelect(context, selectedIDs) {
var keybinding = utilKeybinding('select');
var breatheBehavior = behaviorBreathe(context);
var behaviors = [
behaviorCopy(context),
behaviorPaste(context),
breatheBehavior,
behaviorHover(context),
@@ -48,7 +48,6 @@ export function modeSelect(context, selectedIDs) {
modeDragNote(context).behavior
];
var inspector; // unused?
var _editMenu; // uiEditMenu
var _newFeature = false;
var _follow = false;
@@ -143,57 +142,6 @@ export function modeSelect(context, selectedIDs) {
}
function closeMenu() {
// remove any existing menu no matter how it was added
context.map().supersurface
.select('.edit-menu').remove();
}
mode.showMenu = function() {
// remove any displayed menu
closeMenu();
// disable menu if in wide selection, for example
if (!context.map().editableDataEnabled()) return;
// don't show the menu for relations alone
if (selectedIDs.every(function(id) {
return context.graph().geometry(id) === 'relation';
})) return;
var point = context.map().mouse();
var viewport = geoExtent(context.projection.clipExtent()).polygon();
// make sure a vaild position can be determined
if (!point || !geoPointInPolygon(point, viewport)) return;
var surfaceNode = context.surface().node();
if (surfaceNode.focus) { // FF doesn't support it
// focus the surface or else clicking off the menu may not trigger modeBrowse
surfaceNode.focus();
}
// don't load the menu until it's needed
if (!_editMenu) _editMenu = uiEditMenu(context);
_editMenu
.anchorLoc(point)
.operations(operations);
// render the menu
context.map().supersurface.call(_editMenu);
};
function toggleMenu() {
if (context.map().supersurface.select('.edit-menu').empty()) {
mode.showMenu();
} else {
closeMenu();
}
}
mode.selectedIDs = function() {
return selectedIDs;
};
@@ -204,12 +152,6 @@ export function modeSelect(context, selectedIDs) {
};
mode.reselect = function() {
if (!checkSelectedIDs()) return;
return mode;
};
mode.newFeature = function(val) {
if (!arguments.length) return _newFeature;
_newFeature = val;
@@ -234,12 +176,12 @@ export function modeSelect(context, selectedIDs) {
});
operations = Object.values(Operations)
.map(function(o) { return o(selectedIDs, context); })
.map(function(o) { return o(context, selectedIDs); })
.filter(function(o) { return o.available() && o.id !== 'delete' && o.id !== 'downgrade'; });
var downgradeOperation = Operations.operationDowngrade(selectedIDs, context);
var downgradeOperation = Operations.operationDowngrade(context, selectedIDs);
// don't allow delete if downgrade is available
var lastOperation = !context.inIntro() && downgradeOperation.available() ? downgradeOperation : Operations.operationDelete(selectedIDs, context);
var lastOperation = !context.inIntro() && downgradeOperation.available() ? downgradeOperation : Operations.operationDelete(context, selectedIDs);
operations.push(lastOperation);
@@ -250,9 +192,13 @@ export function modeSelect(context, selectedIDs) {
});
// remove any displayed menu
closeMenu();
context.ui().closeEditMenu();
}
mode.operations = function() {
return operations;
};
mode.enter = function() {
if (!checkSelectedIDs()) return;
@@ -269,9 +215,16 @@ export function modeSelect(context, selectedIDs) {
.on([']', 'pgdown'], nextVertex)
.on(['{', uiCmd('⌘['), 'home'], firstVertex)
.on(['}', uiCmd('⌘]'), 'end'], lastVertex)
.on(uiCmd('⇧←'), nudgeSelection([-10, 0]))
.on(uiCmd('⇧↑'), nudgeSelection([0, -10]))
.on(uiCmd('⇧→'), nudgeSelection([10, 0]))
.on(uiCmd('⇧↓'), nudgeSelection([0, 10]))
.on(uiCmd('⇧⌘←'), nudgeSelection([-100, 0]))
.on(uiCmd('⇧⌘↑'), nudgeSelection([0, -100]))
.on(uiCmd('⇧⌘→'), nudgeSelection([100, 0]))
.on(uiCmd('⇧⌘↓'), nudgeSelection([0, 100]))
.on(['\\', 'pause'], nextParent)
.on('⎋', esc, true)
.on('space', toggleMenu);
.on('⎋', esc, true);
d3_select(document)
.call(keybinding);
@@ -285,11 +238,10 @@ export function modeSelect(context, selectedIDs) {
// reselect after change in case relation members were removed or added
selectElements();
})
.on('undone.select', update)
.on('redone.select', update);
.on('undone.select', checkSelectedIDs)
.on('redone.select', checkSelectedIDs);
context.map()
.on('move.select', closeMenu)
.on('drawn.select', selectElements)
.on('crossEditableZoom.select', function() {
selectElements();
@@ -317,9 +269,22 @@ export function modeSelect(context, selectedIDs) {
}
function update() {
closeMenu();
checkSelectedIDs();
function nudgeSelection(delta) {
return function() {
// prevent nudging during low zoom selection
if (!context.map().withinEditableZoom()) return;
var moveOp = operationMove(context, selectedIDs);
if (moveOp.disabled()) {
context.ui().flash
.duration(4000)
.iconName('#iD-operation-' + moveOp.id)
.iconClass('operation disabled')
.text(moveOp.tooltip)();
} else {
context.perform(actionMove(selectedIDs, delta, context.projection), moveOp.annotation());
}
};
}
@@ -516,7 +481,7 @@ export function modeSelect(context, selectedIDs) {
d3_select(document)
.call(keybinding.unbind);
closeMenu();
context.ui().closeEditMenu();
context.history()
.on('change.select', null)
+1 -1
View File
@@ -47,7 +47,7 @@ export function modeSelectData(context, selectedDatum) {
// Return to browse mode if selected DOM elements have
// disappeared because the user moved them out of view..
var source = d3_event && d3_event.type === 'zoom' && d3_event.sourceEvent;
if (drawn && source && (source.type === 'mousemove' || source.type === 'touchmove')) {
if (drawn && source && (source.type === 'pointermove' || source.type === 'mousemove' || source.type === 'touchmove')) {
context.enter(modeBrowse(context));
}
} else {
+1 -1
View File
@@ -124,7 +124,7 @@ export function modeSelectError(context, selectedErrorID, selectedErrorService)
// Return to browse mode if selected DOM elements have
// disappeared because the user moved them out of view..
var source = d3_event && d3_event.type === 'zoom' && d3_event.sourceEvent;
if (drawn && source && (source.type === 'mousemove' || source.type === 'touchmove')) {
if (drawn && source && (source.type === 'pointermove' || source.type === 'mousemove' || source.type === 'touchmove')) {
context.enter(modeBrowse(context));
}
+1 -1
View File
@@ -67,7 +67,7 @@ export function modeSelectNote(context, selectedNoteID) {
// Return to browse mode if selected DOM elements have
// disappeared because the user moved them out of view..
var source = d3_event && d3_event.type === 'zoom' && d3_event.sourceEvent;
if (drawn && source && (source.type === 'mousemove' || source.type === 'touchmove')) {
if (drawn && source && (source.type === 'pointermove' || source.type === 'mousemove' || source.type === 'touchmove')) {
context.enter(modeBrowse(context));
}
+1 -1
View File
@@ -4,7 +4,7 @@ import { behaviorOperation } from '../behavior/operation';
import { utilGetAllNodes } from '../util';
export function operationCircularize(selectedIDs, context) {
export function operationCircularize(context, selectedIDs) {
var _extent;
var _actions = selectedIDs.map(getAction).filter(Boolean);
var _amount = _actions.length === 1 ? 'single' : 'multiple';
+1 -1
View File
@@ -4,7 +4,7 @@ import { behaviorOperation } from '../behavior/operation';
import { utilArrayGroupBy } from '../util';
export function operationContinue(selectedIDs, context) {
export function operationContinue(context, selectedIDs) {
var graph = context.graph();
var entities = selectedIDs.map(function(id) { return graph.entity(id); });
var geometries = Object.assign(
+151
View File
@@ -0,0 +1,151 @@
import { event as d3_event } from 'd3-selection';
import { t } from '../core/localizer';
import { behaviorOperation } from '../behavior/operation';
import { uiCmd } from '../ui/cmd';
import { geoExtent } from '../geo';
import { utilArrayGroupBy, utilGetAllNodes } from '../util';
export function operationCopy(context, selectedIDs) {
var _multi = selectedIDs.length === 1 ? 'single' : 'multiple';
function getFilteredIdsToCopy() {
return selectedIDs.filter(function(selectedID) {
var entity = context.graph().hasEntity(selectedID);
// don't copy untagged vertices separately from ways
return entity.hasInterestingTags() || entity.geometry(context.graph()) !== 'vertex';
});
}
var operation = function() {
if (!getSelectionText()) {
d3_event.preventDefault();
}
var graph = context.graph();
var selected = groupEntities(getFilteredIdsToCopy(), graph);
var canCopy = [];
var skip = {};
var entity;
var i;
for (i = 0; i < selected.relation.length; i++) {
entity = selected.relation[i];
if (!skip[entity.id] && entity.isComplete(graph)) {
canCopy.push(entity.id);
skip = getDescendants(entity.id, graph, skip);
}
}
for (i = 0; i < selected.way.length; i++) {
entity = selected.way[i];
if (!skip[entity.id]) {
canCopy.push(entity.id);
skip = getDescendants(entity.id, graph, skip);
}
}
for (i = 0; i < selected.node.length; i++) {
entity = selected.node[i];
if (!skip[entity.id]) {
canCopy.push(entity.id);
}
}
context.copyIDs(canCopy);
if (_point &&
(canCopy.length !== 1 || graph.entity(canCopy[0]).type !== 'node')) {
// store the anchor coordinates if copying more than a single node
context.copyLonLat(context.projection.invert(_point));
} else {
context.copyLonLat(null);
}
};
function groupEntities(ids, graph) {
var entities = ids.map(function (id) { return graph.entity(id); });
return Object.assign(
{ relation: [], way: [], node: [] },
utilArrayGroupBy(entities, 'type')
);
}
function getDescendants(id, graph, descendants) {
var entity = graph.entity(id);
var children;
descendants = descendants || {};
if (entity.type === 'relation') {
children = entity.members.map(function(m) { return m.id; });
} else if (entity.type === 'way') {
children = entity.nodes;
} else {
children = [];
}
for (var i = 0; i < children.length; i++) {
if (!descendants[children[i]]) {
descendants[children[i]] = true;
descendants = getDescendants(children[i], graph, descendants);
}
}
return descendants;
}
function getSelectionText() {
return window.getSelection().toString();
}
operation.available = function() {
return getFilteredIdsToCopy().length > 0;
};
operation.disabled = function() {
var nodes = utilGetAllNodes(getFilteredIdsToCopy(), context.graph());
var extent = nodes.reduce(function(extent, node) {
return extent.extend(node.extent(context.graph()));
}, geoExtent());
if (extent.area() && extent.percentContainedIn(context.map().extent()) < 0.8) {
return 'too_large';
}
return false;
};
operation.tooltip = function() {
var disable = operation.disabled();
return disable ?
t('operations.copy.' + disable + '.' + _multi) :
t('operations.copy.description' + '.' + _multi);
};
operation.annotation = function() {
return selectedIDs.length === 1 ?
t('operations.copy.annotation.single') :
t('operations.copy.annotation.multiple', { n: selectedIDs.length.toString() });
};
var _point;
operation.point = function(val) {
_point = val;
return operation;
};
operation.id = 'copy';
operation.keys = [uiCmd('⌘C')];
operation.title = t('operations.copy.title');
operation.behavior = behaviorOperation(context).which(operation);
return operation;
}
+1 -1
View File
@@ -8,7 +8,7 @@ import { uiCmd } from '../ui/cmd';
import { utilGetAllNodes } from '../util';
export function operationDelete(selectedIDs, context) {
export function operationDelete(context, selectedIDs) {
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple');
var action = actionDeleteMultiple(selectedIDs);
var nodes = utilGetAllNodes(selectedIDs, context.graph());
+1 -1
View File
@@ -4,7 +4,7 @@ import { behaviorOperation } from '../behavior/operation';
import { utilGetAllNodes } from '../util/index';
export function operationDisconnect(selectedIDs, context) {
export function operationDisconnect(context, selectedIDs) {
var vertexIDs = [];
var wayIDs = [];
var otherIDs = [];
+1 -1
View File
@@ -5,7 +5,7 @@ import { t } from '../core/localizer';
import { uiCmd } from '../ui/cmd';
import { presetManager } from '../presets';
export function operationDowngrade(selectedIDs, context) {
export function operationDowngrade(context, selectedIDs) {
var affectedFeatureCount = 0;
var downgradeType;
+8 -31
View File
@@ -1,44 +1,20 @@
import { actionExtract } from '../actions/extract';
import { actionMoveNode } from '../actions/move_node';
import { behaviorOperation } from '../behavior/operation';
import { modeMove } from '../modes/move';
import { modeSelect } from '../modes/select';
import { t } from '../core/localizer';
import { presetManager } from '../presets';
export function operationExtract(selectedIDs, context) {
export function operationExtract(context, selectedIDs) {
var entityID = selectedIDs.length && selectedIDs[0];
var action = actionExtract(entityID, context.projection);
var action = actionExtract(entityID);
var geometry = entityID && context.graph().hasEntity(entityID) && context.graph().geometry(entityID);
var extent = geometry === 'area' && context.entity(entityID).extent(context.graph());
var extent = (geometry === 'area' || geometry === 'line') && context.graph().entity(entityID).extent(context.graph());
var operation = function () {
context.perform(action); // do the extract
context.validator().validate();
var extractedNodeID = action.getExtractedNodeID();
var mouse = context.map().mouseCoordinates();
if (mouse.some(isNaN)) {
enterMoveMode();
} else {
// move detached node to the mouse location (transitioned)
context.perform(actionMoveNode(extractedNodeID, mouse));
// after transition completes, put at final mouse location and enter move mode.
window.setTimeout(function() {
mouse = context.map().mouseCoordinates();
context.replace(actionMoveNode(extractedNodeID, mouse));
enterMoveMode();
}, 150);
}
function enterMoveMode() {
var baseGraph = context.graph();
context.enter(modeMove(context, [extractedNodeID], baseGraph));
}
context.perform(action, operation.annotation()); // do the extract
context.enter(modeSelect(context, [action.getExtractedNodeID()]));
};
@@ -51,8 +27,9 @@ export function operationExtract(selectedIDs, context) {
if (!entity.hasInterestingTags()) return false;
if (geometry === 'area') {
if (geometry === 'area' || geometry === 'line') {
var preset = presetManager.match(entity, graph);
// only allow extraction from ways/multipolygons if the preset supports points
return preset.geometry.indexOf('point') !== -1;
}
+2
View File
@@ -1,5 +1,6 @@
export { operationCircularize } from './circularize';
export { operationContinue } from './continue';
export { operationCopy } from './copy';
export { operationDelete } from './delete';
export { operationDisconnect } from './disconnect';
export { operationDowngrade } from './downgrade';
@@ -7,6 +8,7 @@ export { operationExtract } from './extract';
export { operationMerge } from './merge';
export { operationMove } from './move';
export { operationOrthogonalize } from './orthogonalize';
export { operationPaste } from './paste';
export { operationReflectShort, operationReflectLong } from './reflect';
export { operationReverse } from './reverse';
export { operationRotate } from './rotate';
+1 -1
View File
@@ -9,7 +9,7 @@ import { behaviorOperation } from '../behavior/operation';
import { modeSelect } from '../modes/select';
import { presetManager } from '../presets';
export function operationMerge(selectedIDs, context) {
export function operationMerge(context, selectedIDs) {
var join = actionJoin(selectedIDs);
var merge = actionMerge(selectedIDs);
+1 -1
View File
@@ -5,7 +5,7 @@ import { modeMove } from '../modes/move';
import { utilGetAllNodes } from '../util';
export function operationMove(selectedIDs, context) {
export function operationMove(context, selectedIDs) {
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple');
var nodes = utilGetAllNodes(selectedIDs, context.graph());
var coords = nodes.map(function(n) { return n.loc; });
+1 -1
View File
@@ -4,7 +4,7 @@ import { behaviorOperation } from '../behavior/operation';
import { utilGetAllNodes } from '../util';
export function operationOrthogonalize(selectedIDs, context) {
export function operationOrthogonalize(context, selectedIDs) {
var _extent;
var _type;
var _actions = selectedIDs.map(chooseAction).filter(Boolean);
+98
View File
@@ -0,0 +1,98 @@
import { actionCopyEntities } from '../actions/copy_entities';
import { actionMove } from '../actions/move';
import { modeSelect } from '../modes/select';
import { geoExtent, geoVecSubtract } from '../geo';
import { t } from '../core/localizer';
import { uiCmd } from '../ui/cmd';
import { utilDisplayLabel } from '../util/util';
// see also `behaviorPaste`
export function operationPaste(context) {
var _pastePoint;
var operation = function() {
if (!_pastePoint) return;
var oldIDs = context.copyIDs();
if (!oldIDs.length) return;
var projection = context.projection;
var extent = geoExtent();
var oldGraph = context.copyGraph();
var newIDs = [];
var action = actionCopyEntities(oldIDs, oldGraph);
context.perform(action);
var copies = action.copies();
var originals = new Set();
Object.values(copies).forEach(function(entity) { originals.add(entity.id); });
for (var id in copies) {
var oldEntity = oldGraph.entity(id);
var newEntity = copies[id];
extent._extend(oldEntity.extent(oldGraph));
// Exclude child nodes from newIDs if their parent way was also copied.
var parents = context.graph().parentWays(newEntity);
var parentCopied = parents.some(function(parent) {
return originals.has(parent.id);
});
if (!parentCopied) {
newIDs.push(newEntity.id);
}
}
// Use the location of the copy operation to offset the paste location,
// or else use the center of the pasted extent
var copyPoint = (context.copyLonLat() && projection(context.copyLonLat())) ||
projection(extent.center());
var delta = geoVecSubtract(_pastePoint, copyPoint);
// Move the pasted objects to be anchored at the paste location
context.replace(actionMove(newIDs, delta, projection), operation.annotation());
context.enter(modeSelect(context, newIDs));
};
operation.point = function(val) {
_pastePoint = val;
return operation;
};
operation.available = function() {
return context.mode().id === 'browse';
};
operation.disabled = function() {
return !context.copyIDs().length;
};
operation.tooltip = function() {
var oldGraph = context.copyGraph();
var ids = context.copyIDs();
if (!ids.length) {
return t('operations.paste.nothing_copied');
}
return ids.length === 1 ?
t('operations.paste.description.single', { feature: utilDisplayLabel(oldGraph.entity(ids[0]), oldGraph) }) :
t('operations.paste.description.multiple', { n: ids.length.toString() });
};
operation.annotation = function() {
var ids = context.copyIDs();
return ids.length === 1 ?
t('operations.paste.annotation.single') :
t('operations.paste.annotation.multiple', { n: ids.length.toString() });
};
operation.id = 'paste';
operation.keys = [uiCmd('⌘V')];
operation.title = t('operations.paste.title');
return operation;
}
+5 -5
View File
@@ -5,17 +5,17 @@ import { geoExtent } from '../geo';
import { utilGetAllNodes } from '../util';
export function operationReflectShort(selectedIDs, context) {
return operationReflect(selectedIDs, context, 'short');
export function operationReflectShort(context, selectedIDs) {
return operationReflect(context, selectedIDs, 'short');
}
export function operationReflectLong(selectedIDs, context) {
return operationReflect(selectedIDs, context, 'long');
export function operationReflectLong(context, selectedIDs) {
return operationReflect(context, selectedIDs, 'long');
}
export function operationReflect(selectedIDs, context, axis) {
export function operationReflect(context, selectedIDs, axis) {
axis = axis || 'long';
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple');
var nodes = utilGetAllNodes(selectedIDs, context.graph());
+1 -1
View File
@@ -3,7 +3,7 @@ import { actionReverse } from '../actions/reverse';
import { behaviorOperation } from '../behavior/operation';
export function operationReverse(selectedIDs, context) {
export function operationReverse(context, selectedIDs) {
var operation = function() {
context.perform(function combinedReverseAction(graph) {
+1 -1
View File
@@ -5,7 +5,7 @@ import { modeRotate } from '../modes/rotate';
import { utilGetAllNodes } from '../util';
export function operationRotate(selectedIDs, context) {
export function operationRotate(context, selectedIDs) {
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple');
var nodes = utilGetAllNodes(selectedIDs, context.graph());
var coords = nodes.map(function(n) { return n.loc; });
+1 -1
View File
@@ -4,7 +4,7 @@ import { behaviorOperation } from '../behavior/operation';
import { modeSelect } from '../modes/select';
export function operationSplit(selectedIDs, context) {
export function operationSplit(context, selectedIDs) {
var vertices = selectedIDs
.filter(function(id) { return context.graph().geometry(id) === 'vertex'; });
var entityID = vertices[0];
+1 -1
View File
@@ -5,7 +5,7 @@ import { behaviorOperation } from '../behavior/operation';
import { utilArrayDifference, utilGetAllNodes } from '../util/index';
export function operationStraighten(selectedIDs, context) {
export function operationStraighten(context, selectedIDs) {
var wayIDs = selectedIDs.filter(function(id) { return id.charAt(0) === 'w'; });
var nodeIDs = selectedIDs.filter(function(id) { return id.charAt(0) === 'n'; });
+73 -42
View File
@@ -29,44 +29,44 @@ function vintageRange(vintage) {
export function rendererBackgroundSource(data) {
var source = Object.assign({}, data); // shallow copy
var offset = [0, 0];
var name = source.name;
var description = source.description;
var best = !!source.best;
var template = source.encrypted ? utilAesDecrypt(source.template) : source.template;
var _offset = [0, 0];
var _name = source.name;
var _description = source.description;
var _best = !!source.best;
var _template = source.encrypted ? utilAesDecrypt(source.template) : source.template;
source.tileSize = data.tileSize || 256;
source.zoomExtent = data.zoomExtent || [0, 22];
source.overzoom = data.overzoom !== false;
source.offset = function(val) {
if (!arguments.length) return offset;
offset = val;
if (!arguments.length) return _offset;
_offset = val;
return source;
};
source.nudge = function(val, zoomlevel) {
offset[0] += val[0] / Math.pow(2, zoomlevel);
offset[1] += val[1] / Math.pow(2, zoomlevel);
_offset[0] += val[0] / Math.pow(2, zoomlevel);
_offset[1] += val[1] / Math.pow(2, zoomlevel);
return source;
};
source.name = function() {
var id_safe = source.id.replace(/\./g, '<TX_DOT>');
return t('imagery.' + id_safe + '.name', { default: name });
return t('imagery.' + id_safe + '.name', { default: _name });
};
source.description = function() {
var id_safe = source.id.replace(/\./g, '<TX_DOT>');
return t('imagery.' + id_safe + '.description', { default: description });
return t('imagery.' + id_safe + '.description', { default: _description });
};
source.best = function() {
return best;
return _best;
};
@@ -82,15 +82,35 @@ export function rendererBackgroundSource(data) {
};
source.template = function(_) {
if (!arguments.length) return template;
if (source.id === 'custom') template = _;
source.template = function(val) {
if (!arguments.length) return _template;
if (source.id === 'custom') {
_template = val;
}
return source;
};
source.url = function(coord) {
if (this.type === 'wms') {
var result = _template;
if (result === '') return result; // source 'none'
// Guess a type based on the tokens present in the template
// (This is for 'custom' source, where we don't know)
if (!source.type) {
if (/\{(proj|wkid|bbox)\}/.test(_template)) {
source.type = 'wms';
source.projection = 'EPSG:3857'; // guess
} else if (/\{(x|y)\}/.test(_template)) {
source.type = 'tms';
} else if (/\{u\}/.test(_template)) {
source.type = 'bing';
}
}
if (source.type === 'wms') {
var tileToProjectedCoords = (function(x, y, z) {
//polyfill for IE11, PhantomJS
var sinh = Math.sinh || function(x) {
@@ -102,7 +122,7 @@ export function rendererBackgroundSource(data) {
var lon = x / zoomSize * Math.PI * 2 - Math.PI;
var lat = Math.atan(sinh(Math.PI * (1 - 2 * y / zoomSize)));
switch (this.projection) {
switch (source.projection) {
case 'EPSG:4326':
return {
x: lon * 180 / Math.PI,
@@ -115,13 +135,14 @@ export function rendererBackgroundSource(data) {
y: 20037508.34 / Math.PI * mercCoords[1]
};
}
}).bind(this);
});
var tileSize = this.tileSize;
var projection = this.projection;
var tileSize = source.tileSize;
var projection = source.projection;
var minXmaxY = tileToProjectedCoords(coord[0], coord[1], coord[2]);
var maxXminY = tileToProjectedCoords(coord[0]+1, coord[1]+1, coord[2]);
return template.replace(/\{(\w+)\}/g, function (token, key) {
result = result.replace(/\{(\w+)\}/g, function (token, key) {
switch (key) {
case 'width':
case 'height':
@@ -144,28 +165,38 @@ export function rendererBackgroundSource(data) {
return token;
}
});
} else if (source.type === 'tms') {
result = result
.replace('{x}', coord[0])
.replace('{y}', coord[1])
// TMS-flipped y coordinate
.replace(/\{[t-]y\}/, Math.pow(2, coord[2]) - coord[1] - 1)
.replace(/\{z(oom)?\}/, coord[2]);
} else if (source.type === 'bing') {
result = result
.replace('{u}', function() {
var u = '';
for (var zoom = coord[2]; zoom > 0; zoom--) {
var b = 0;
var mask = 1 << (zoom - 1);
if ((coord[0] & mask) !== 0) b++;
if ((coord[1] & mask) !== 0) b += 2;
u += b.toString();
}
return u;
});
}
return template
.replace('{x}', coord[0])
.replace('{y}', coord[1])
// TMS-flipped y coordinate
.replace(/\{[t-]y\}/, Math.pow(2, coord[2]) - coord[1] - 1)
.replace(/\{z(oom)?\}/, coord[2])
.replace(/\{switch:([^}]+)\}/, function(s, r) {
var subdomains = r.split(',');
return subdomains[(coord[0] + coord[1]) % subdomains.length];
})
.replace('{u}', function() {
var u = '';
for (var zoom = coord[2]; zoom > 0; zoom--) {
var b = 0;
var mask = 1 << (zoom - 1);
if ((coord[0] & mask) !== 0) b++;
if ((coord[1] & mask) !== 0) b += 2;
u += b.toString();
}
return u;
});
// these apply to any type..
result = result.replace(/\{switch:([^}]+)\}/, function(s, r) {
var subdomains = r.split(',');
return subdomains[(coord[0] + coord[1]) % subdomains.length];
});
return result;
};
+28 -8
View File
@@ -60,7 +60,7 @@ export function rendererMap(context) {
var _isTransformed = false;
var _minzoom = 0;
var _getMouseCoords;
var _mouseEvent;
var _lastPointerEvent;
var _lastWithinEditableZoom;
// whether a pointerdown event started the zoom
@@ -180,17 +180,19 @@ export function rendererMap(context) {
})
.on('gesturechange.surface', gestureChange)
.on(_pointerPrefix + 'down.zoom', function() {
_lastPointerEvent = d3_event;
if (d3_event.button === 2) {
d3_event.stopPropagation();
}
}, true)
.on(_pointerPrefix + 'up.zoom', function() {
_lastPointerEvent = d3_event;
if (resetTransform()) {
immediateRedraw();
}
})
.on(_pointerPrefix + 'move.map', function() {
_mouseEvent = d3_event;
_lastPointerEvent = d3_event;
})
.on(_pointerPrefix + 'over.vertices', function() {
if (map.editableDataEnabled() && !_isTransformed) {
@@ -318,6 +320,7 @@ export function rendererMap(context) {
var data;
var set;
var filter;
var applyFeatureLayerFilters = true;
if (map.isInWideSelection()) {
data = [];
@@ -327,6 +330,8 @@ export function rendererMap(context) {
});
fullRedraw = true;
filter = utilFunctor(true);
// selected features should always be visible, so we can skip filtering
applyFeatureLayerFilters = false;
} else if (difference) {
var complete = difference.complete(map.extent());
@@ -354,7 +359,11 @@ export function rendererMap(context) {
}
}
data = features.filter(data, graph);
if (applyFeatureLayerFilters) {
data = features.filter(data, graph);
} else {
context.features().resetStats();
}
if (mode && mode.id === 'select') {
// update selected vertices - the user might have just double-clicked a way,
@@ -555,7 +564,13 @@ export function rendererMap(context) {
y = y2;
k = k2;
eventTransform = d3_zoomIdentity.translate(x2, y2).scale(k2);
_selection.node().__zoom = eventTransform;
if (_zoomerPanner._transform) {
// utilZoomPan interface
_zoomerPanner._transform(eventTransform);
} else {
// d3_zoom interface
_selection.node().__zoom = eventTransform;
}
}
}
@@ -593,7 +608,7 @@ export function rendererMap(context) {
}
if (source) {
_mouseEvent = event;
_lastPointerEvent = event;
}
_isTransformed = true;
_transformLast = eventTransform;
@@ -676,8 +691,13 @@ export function rendererMap(context) {
};
map.lastPointerEvent = function() {
return _lastPointerEvent;
};
map.mouse = function() {
var event = _mouseEvent || d3_event;
var event = _lastPointerEvent || d3_event;
if (event) {
var s;
while ((s = event.sourceEvent)) { event = s; }
@@ -906,7 +926,7 @@ export function rendererMap(context) {
map.transformEase = function(t2, duration) {
duration = duration || 250;
setTransform(t2, duration, false);
setTransform(t2, duration, false /* don't force */);
return map;
};
@@ -1009,7 +1029,7 @@ export function rendererMap(context) {
map.isInWideSelection = function() {
return !map.withinEditableZoom() && context.mode() && context.mode().id === 'select';
return !map.withinEditableZoom() && context.selectedIDs().length;
};
+7 -2
View File
@@ -83,8 +83,13 @@ export default {
},
reset() {
let _strings = {};
let _colors = {};
if (_cache) {
Object.values(_cache.inflightTile).forEach(abortRequest);
// Strings and colors are static and should not be re-populated
_strings = _cache.strings;
_colors = _cache.colors;
}
_cache = {
data: {},
@@ -93,8 +98,8 @@ export default {
inflightPost: {},
closed: {},
rtree: new RBush(),
strings: {},
colors: {}
strings: _strings,
colors: _colors
};
},
+6 -4
View File
@@ -470,14 +470,16 @@ export default {
_pannellumViewer = window.pannellum.viewer('ideditor-viewer-streetside', options);
var pointerPrefix = 'PointerEvent' in window ? 'pointer' : 'mouse';
_pannellumViewer
.on('mousedown', () => {
.on(pointerPrefix + 'down', () => {
d3_select(window)
.on('mousemove.pannellum', () => { dispatch.call('viewerChanged'); });
.on(pointerPrefix + 'move.pannellum', () => { dispatch.call('viewerChanged'); });
})
.on('mouseup', () => {
.on(pointerPrefix + 'up', () => {
d3_select(window)
.on('mousemove.pannellum', null);
.on(pointerPrefix + 'move.pannellum', null);
// continue dispatching events for a few seconds, in case viewer has inertia.
let t = d3_timer(elapsed => {
+1
View File
@@ -55,6 +55,7 @@ uiCmd.display = function(code) {
'⇟': mac ? '⇟ ' + t('shortcuts.key.end') : t('shortcuts.key.end'),
'↵': mac ? '↵ ' + t('shortcuts.key.return') : t('shortcuts.key.enter'),
'⎋': mac ? '⎋ ' + t('shortcuts.key.esc') : t('shortcuts.key.esc'),
'☰': mac ? '☰ ' + t('shortcuts.key.menu') : t('shortcuts.key.menu'),
};
return replacements[code] || code;
+10
View File
@@ -25,6 +25,7 @@ export function uiConflicts(context) {
var keybinding = utilKeybinding('conflicts');
var _origChanges;
var _conflictList;
var _shownConflictIndex;
function keybindingOn() {
@@ -145,6 +146,7 @@ export function uiConflicts(context) {
function showConflict(selection, index) {
index = utilWrap(index, _conflictList.length);
_shownConflictIndex = index;
var parent = d3_select(selection.node().parentNode);
@@ -343,5 +345,13 @@ export function uiConflicts(context) {
};
conflicts.shownEntityIds = function() {
if (_conflictList && typeof _shownConflictIndex === 'number') {
return [_conflictList[_shownConflictIndex].id];
}
return [];
};
return utilRebind(conflicts, dispatch, 'on');
}
+14 -9
View File
@@ -10,7 +10,7 @@ import { uiToggle } from './toggle';
// Tooltips and svg mask used to highlight certain features
export function uiCurtain() {
export function uiCurtain(containerNode) {
var surface = d3_select(null),
tooltip = d3_select(null),
@@ -46,8 +46,8 @@ export function uiCurtain() {
function resize() {
surface
.attr('width', window.innerWidth)
.attr('height', window.innerHeight);
.attr('width', containerNode.clientWidth)
.attr('height', containerNode.clientHeight);
curtain.cut(darkness.datum());
}
}
@@ -72,6 +72,9 @@ export function uiCurtain() {
}
if (box && box.getBoundingClientRect) {
box = copyBox(box.getBoundingClientRect());
var containerRect = containerNode.getBoundingClientRect();
box.top -= containerRect.top;
box.left -= containerRect.left;
}
options = options || {};
@@ -121,8 +124,8 @@ export function uiCurtain() {
}
var tip = copyBox(tooltip.node().getBoundingClientRect()),
w = window.innerWidth,
h = window.innerHeight,
w = containerNode.clientWidth,
h = containerNode.clientHeight,
tooltipWidth = 200,
tooltipArrow = 5,
side, pos;
@@ -134,7 +137,7 @@ export function uiCurtain() {
tip.height += 80;
}
// trim box dimensions to just the portion that fits in the window..
// trim box dimensions to just the portion that fits in the container..
if (tooltipBox.top + tooltipBox.height > h) {
tooltipBox.height -= (tooltipBox.top + tooltipBox.height - h);
}
@@ -238,9 +241,11 @@ export function uiCurtain() {
selection
.attr('d', function(d) {
var string = 'M 0,0 L 0,' + window.innerHeight + ' L ' +
window.innerWidth + ',' + window.innerHeight + 'L' +
window.innerWidth + ',0 Z';
var containerWidth = containerNode.clientWidth;
var containerHeight = containerNode.clientHeight;
var string = 'M 0,0 L 0,' + containerHeight + ' L ' +
containerWidth + ',' + containerHeight + 'L' +
containerWidth + ',0 Z';
if (!d) return string;
return string + 'M' +
+29 -4
View File
@@ -11,7 +11,10 @@ export function uiEditMenu(context) {
var _operations = [];
// the position the menu should be displayed relative to
var _anchorLoc = [0, 0];
// a string indicating how the menu was opened
var _triggerType = '';
var _vpTopMargin = 85; // viewport top margin
var _vpBottomMargin = 45; // viewport bottom margin
var _vpSideMargin = 35; // viewport side margin
@@ -33,15 +36,30 @@ export function uiEditMenu(context) {
var offset = [0, 0];
var viewport = context.surfaceRect();
// position the menu above the anchor for stylus and finger input
// since the mapper's hand likely obscures the screen below the anchor
var menuTop = _triggerType.includes('touch') || _triggerType.includes('pen');
var menuLeft = displayOnLeft(viewport);
offset[0] = menuLeft ? -1 * (_menuSideMargin + _menuWidth) : _menuSideMargin;
var menuHeight = _verticalPadding * 2 + _operations.length * _buttonHeight;
if (_anchorLoc[1] + menuHeight > (viewport.height - _vpBottomMargin)) {
// menu is near bottom viewport edge, shift upwards
offset[1] = -1 * (_anchorLoc[1] + menuHeight - viewport.height + _vpBottomMargin);
if (menuTop) {
if (_anchorLoc[1] - menuHeight < _vpTopMargin) {
// menu is near top viewport edge, shift downward
offset[1] = -_anchorLoc[1] + _vpTopMargin;
} else {
offset[1] = -menuHeight;
}
} else {
if (_anchorLoc[1] + menuHeight > (viewport.height - _vpBottomMargin)) {
// menu is near bottom viewport edge, shift upwards
offset[1] = -_anchorLoc[1] - menuHeight + viewport.height - _vpBottomMargin;
} else {
offset[1] = 0;
}
}
var origin = geoVecAdd(_anchorLoc, offset);
@@ -91,7 +109,8 @@ export function uiEditMenu(context) {
}
function pointerdown() {
d3_event.stopPropagation(); // https://github.com/openstreetmap/iD/issues/1869
// don't let button presses also act as map input - #1869
d3_event.stopPropagation();
}
};
@@ -152,6 +171,12 @@ export function uiEditMenu(context) {
return editMenu;
};
editMenu.triggerType = function(val) {
if (!arguments.length) return _triggerType;
_triggerType = val;
return editMenu;
};
editMenu.operations = function(val) {
if (!arguments.length) return _operations;
_operations = val;
+48 -4
View File
@@ -14,6 +14,7 @@ import { utilGetDimensions } from '../util/dimensions';
import { uiAccount } from './account';
import { uiAttribution } from './attribution';
import { uiContributors } from './contributors';
import { uiEditMenu } from './edit_menu';
import { uiFeatureInfo } from './feature_info';
import { uiFlash } from './flash';
import { uiFullScreen } from './full_screen';
@@ -318,10 +319,10 @@ export function uiInit(context) {
.on('↑', pan([0, panPixels]))
.on('→', pan([-panPixels, 0]))
.on('↓', pan([0, -panPixels]))
.on(['⇧←', uiCmd('⌘←')], pan([map.dimensions()[0], 0]))
.on(['⇧↑', uiCmd('⌘↑')], pan([0, map.dimensions()[1]]))
.on(['⇧→', uiCmd('⌘→')], pan([-map.dimensions()[0], 0]))
.on(['⇧↓', uiCmd('⌘↓')], pan([0, -map.dimensions()[1]]))
.on(uiCmd('⌘←'), pan([map.dimensions()[0], 0]))
.on(uiCmd('⌘↑'), pan([0, map.dimensions()[1]]))
.on(uiCmd('⌘→'), pan([-map.dimensions()[0], 0]))
.on(uiCmd('⌘↓'), pan([0, -map.dimensions()[1]]))
.on(uiCmd('⌘' + t('background.key')), function quickSwitch() {
if (d3_event) {
d3_event.stopImmediatePropagation();
@@ -398,6 +399,7 @@ export function uiInit(context) {
function pan(d) {
return function() {
if (d3_event.shiftKey) return;
if (context.container().select('.combobox').size()) return;
d3_event.preventDefault();
context.map().pan(d, 100);
@@ -548,6 +550,48 @@ export function uiInit(context) {
};
var _editMenu; // uiEditMenu
ui.showEditMenu = function(anchorPoint, triggerType, operations) {
// remove any displayed menu
ui.closeEditMenu();
if (!operations && context.mode().operations) operations = context.mode().operations();
if (!operations || !operations.length) return;
// disable menu if in wide selection, for example
if (!context.map().editableDataEnabled()) return;
var surfaceNode = context.surface().node();
if (surfaceNode.focus) { // FF doesn't support it
// focus the surface or else clicking off the menu may not trigger modeBrowse
surfaceNode.focus();
}
// don't load the menu until it's needed
if (!_editMenu) _editMenu = uiEditMenu(context);
operations.forEach(function(operation) {
if (operation.point) operation.point(anchorPoint);
});
_editMenu
.anchorLoc(anchorPoint)
.triggerType(triggerType)
.operations(operations);
// render the menu
context.map().supersurface.call(_editMenu);
};
ui.closeEditMenu = function() {
// remove any existing menu no matter how it was added
context.map().supersurface
.select('.edit-menu').remove();
};
var _saveLoading = d3_select(null);
context.uploader()
+7 -7
View File
@@ -343,7 +343,7 @@ export function uiIntroBuilding(context, reveal) {
var node = selectMenuItem(context, 'orthogonalize').node();
if (!node) return;
continueTo(clickSquare);
}, 300); // after menu visible
}, 50); // after menu visible
});
context.map().on('move.intro drawn.intro', function() {
@@ -386,7 +386,7 @@ export function uiIntroBuilding(context, reveal) {
}
});
context.map().on('move.intro drawn.intro', function() {
context.map().on('move.intro', function() {
var node = selectMenuItem(context, 'orthogonalize').node();
if (!wasChanged && !node) { return continueTo(rightClickHouse); }
@@ -412,7 +412,7 @@ export function uiIntroBuilding(context, reveal) {
function continueTo(nextStep) {
context.on('enter.intro', null);
context.map().on('move.intro drawn.intro', null);
context.map().on('move.intro', null);
context.history().on('change.intro', null);
nextStep();
}
@@ -661,7 +661,7 @@ export function uiIntroBuilding(context, reveal) {
var node = selectMenuItem(context, 'circularize').node();
if (!node) return;
continueTo(clickCircle);
}, 300); // after menu visible
}, 50); // after menu visible
});
revealTank(tank, t('intro.buildings.rightclick_tank'));
@@ -708,7 +708,7 @@ export function uiIntroBuilding(context, reveal) {
}
});
context.map().on('move.intro drawn.intro', function() {
context.map().on('move.intro', function() {
var node = selectMenuItem(context, 'circularize').node();
if (!wasChanged && !node) { return continueTo(rightClickTank); }
@@ -724,7 +724,7 @@ export function uiIntroBuilding(context, reveal) {
// Something changed. Wait for transition to complete and check undo annotation.
timeout(function() {
if (context.history().undoAnnotation() === t('operations.circularize.annotation.area')) {
if (context.history().undoAnnotation() === t('operations.circularize.annotation.single')) {
continueTo(play);
} else {
continueTo(retryClickCircle);
@@ -734,7 +734,7 @@ export function uiIntroBuilding(context, reveal) {
function continueTo(nextStep) {
context.on('enter.intro', null);
context.map().on('move.intro drawn.intro', null);
context.map().on('move.intro', null);
context.history().on('change.intro', null);
nextStep();
}
+1 -3
View File
@@ -1,7 +1,6 @@
import { t, localizer } from '../../core/localizer';
import { localize } from './helper';
import { presetManager } from '../../presets';
import { prefs } from '../../core/preferences';
import { fileFetcher } from '../../core/file_fetcher';
import { coreGraph } from '../../core/graph';
@@ -112,7 +111,7 @@ export function uiIntro(context) {
context.container().selectAll('.main-map .layer-background').style('opacity', 1);
let curtain = uiCurtain();
let curtain = uiCurtain(context.container().node());
selection.call(curtain);
// Store that the user started the walkthrough..
@@ -125,7 +124,6 @@ export function uiIntro(context) {
let chapters = chapterFlow.map((chapter, i) => {
let s = chapterUi[chapter](context, curtain.reveal)
.on('done', () => {
presetManager.init(); // clear away "recent" presets
buttons
.filter(d => d.title === s.title)
+3 -3
View File
@@ -200,7 +200,7 @@ export function uiIntroLine(context, reveal) {
function retryIntersect() {
d3_select(window).on('mousedown.intro', eventCancel, true);
d3_select(window).on('pointerdown.intro mousedown.intro', eventCancel, true);
var box = pad(tulipRoadIntersection, 80, context);
reveal(box,
@@ -676,7 +676,7 @@ export function uiIntroLine(context, reveal) {
var node = selectMenuItem(context, 'split').node();
if (!node) return;
continueTo(splitIntersection);
}, 300); // after menu visible
}, 50); // after menu visible
});
context.history().on('change.intro', function() {
@@ -1054,7 +1054,7 @@ export function uiIntroLine(context, reveal) {
chapter.exit = function() {
timeouts.forEach(window.clearTimeout);
d3_select(window).on('mousedown.intro', null, true);
d3_select(window).on('pointerdown.intro mousedown.intro', null, true);
context.on('enter.intro exit.intro', null);
context.map().on('move.intro drawn.intro', null);
context.history().on('change.intro', null);
+6 -6
View File
@@ -295,6 +295,11 @@ export function uiIntroNavigation(context, reveal) {
var onClick = function() { continueTo(fieldsTownHall); };
reveal('.entity-editor-pane .section-feature-type',
t('intro.navigation.preset_townhall', { preset: preset.name() }),
{ buttonText: t('intro.ok'), buttonCallback: onClick }
);
context.on('exit.intro', function() {
continueTo(clickTownHall);
});
@@ -305,11 +310,6 @@ export function uiIntroNavigation(context, reveal) {
}
});
reveal('.entity-editor .preset-list-item',
t('intro.navigation.preset_townhall', { preset: preset.name() }),
{ buttonText: t('intro.ok'), buttonCallback: onClick }
);
function continueTo(nextStep) {
context.on('exit.intro', null);
context.history().on('change.intro', null);
@@ -329,7 +329,7 @@ export function uiIntroNavigation(context, reveal) {
var onClick = function() { continueTo(closeTownHall); };
reveal('.inspector-body .preset-editor',
reveal('.entity-editor-pane .section-preset-fields',
t('intro.navigation.fields_townhall'),
{ buttonText: t('intro.ok'), buttonCallback: onClick }
);
+5 -5
View File
@@ -388,7 +388,7 @@ export function uiIntroPoint(context, reveal) {
reveal(box, t('intro.points.rightclick'), { duration: 600 });
timeout(function() {
context.map().on('move.intro drawn.intro', function() {
context.map().on('move.intro', function() {
var entity = context.hasEntity(_pointID);
if (!entity) return chapter.restart();
var box = pointBox(entity.loc, context);
@@ -405,12 +405,12 @@ export function uiIntroPoint(context, reveal) {
var node = selectMenuItem(context, 'delete').node();
if (!node) return;
continueTo(enterDelete);
}, 300); // after menu visible
}, 50); // after menu visible
});
function continueTo(nextStep) {
context.on('enter.intro', null);
context.map().on('move.intro drawn.intro', null);
context.map().on('move.intro', null);
nextStep();
}
}
@@ -429,7 +429,7 @@ export function uiIntroPoint(context, reveal) {
);
timeout(function() {
context.map().on('move.intro drawn.intro', function() {
context.map().on('move.intro', function() {
revealEditMenu(entity.loc,
t('intro.points.delete', { button: icon('#iD-operation-delete', 'pre-text') }),
{ duration: 0}
@@ -450,7 +450,7 @@ export function uiIntroPoint(context, reveal) {
});
function continueTo(nextStep) {
context.map().on('move.intro drawn.intro', null);
context.map().on('move.intro', null);
context.history().on('change.intro', null);
context.on('exit.intro', null);
nextStep();
+1 -221
View File
@@ -1,8 +1,4 @@
import { dispatch as d3_dispatch } from 'd3-dispatch';
import {
event as d3_event,
select as d3_select
} from 'd3-selection';
import { t } from '../../core/localizer';
import { utilRebind } from '../../util/rebind';
@@ -10,7 +6,6 @@ import { utilRebind } from '../../util/rebind';
export function uiIntroWelcome(context, reveal) {
var dispatch = d3_dispatch('done');
var listener = clickListener();
var chapter = {
title: 'intro.welcome.title'
@@ -35,101 +30,11 @@ export function uiIntroWelcome(context, reveal) {
function words() {
reveal('.intro-nav-wrap .chapter-welcome',
t('intro.welcome.words'),
{ buttonText: t('intro.ok'), buttonCallback: mouse }
{ buttonText: t('intro.ok'), buttonCallback: chapters }
);
}
function mouse() {
reveal('.intro-nav-wrap .chapter-welcome',
t('intro.welcome.mouse'),
{ buttonText: t('intro.ok'), buttonCallback: leftClick }
);
}
function leftClick() {
var counter = 0;
var times = 5;
var tooltip = reveal('.intro-nav-wrap .chapter-welcome',
t('intro.welcome.leftclick', { num: times }),
{ tooltipClass: 'intro-mouse' }
);
tooltip.selectAll('.popover-inner')
.insert('svg', 'span')
.attr('class', 'tooltip-illustration')
.append('use')
.attr('xlink:href', '#iD-walkthrough-mouse');
tooltip
.append('div')
.attr('class', 'counter');
tooltip.call(listener);
listener.on('click', function(which) {
if (which === 'left') {
context.container().select('.curtain-tooltip.intro-mouse .counter')
.text(String(++counter));
if (counter === times) {
window.setTimeout(function() { continueTo(rightClick); }, 1000);
}
}
});
function continueTo(nextStep) {
listener.on('click', null);
tooltip.call(listener.off);
tooltip.select('.counter').remove();
nextStep();
}
}
function rightClick() {
var counter = 0;
var times = 5;
var tooltip = reveal('.intro-nav-wrap .chapter-welcome',
t('intro.welcome.rightclick', { num: times }),
{ tooltipClass: 'intro-mouse' }
);
tooltip.selectAll('.popover-inner')
.insert('svg', 'span')
.attr('class', 'tooltip-illustration')
.append('use')
.attr('xlink:href', '#iD-walkthrough-mouse');
tooltip
.append('div')
.attr('class', 'counter');
tooltip.call(listener);
listener.on('click', function(which) {
if (which === 'right') {
context.container().select('.curtain-tooltip.intro-mouse .counter')
.text(String(++counter));
if (counter === times) {
window.setTimeout(function() { continueTo(chapters); }, 1000);
}
}
});
function continueTo(nextStep) {
listener.on('click', null);
tooltip.call(listener.off);
tooltip.select('.counter').remove();
nextStep();
}
}
function chapters() {
dispatch.call('done');
reveal('.intro-nav-wrap .chapter-navigation',
@@ -144,7 +49,6 @@ export function uiIntroWelcome(context, reveal) {
chapter.exit = function() {
listener.off();
context.container().select('.curtain-tooltip.intro-mouse')
.selectAll('.counter')
.remove();
@@ -159,127 +63,3 @@ export function uiIntroWelcome(context, reveal) {
return utilRebind(chapter, dispatch, 'on');
}
function clickListener() {
var dispatch = d3_dispatch('click');
var minTime = 120;
var tooltip = d3_select(null);
var down = {};
// `down` keeps track of which buttons/keys are down.
// Setting a property in `down` happens immediately.
// Unsetting a property in `down` is delayed because
// on Windows a contextmenu event happens after keyup/mouseup
function keydown() {
if (d3_event.keyCode === 93) { // context menu
d3_event.preventDefault();
d3_event.stopPropagation();
down.menu = d3_event.timeStamp;
tooltip.classed('rightclick', true);
}
}
function keyup() {
if (d3_event.keyCode === 93) { // context menu
d3_event.preventDefault();
d3_event.stopPropagation();
var endTime = d3_event.timeStamp;
var startTime = down.menu || endTime;
var delay = (endTime - startTime < minTime) ? minTime : 0;
window.setTimeout(function() {
tooltip.classed('rightclick', false);
down.menu = undefined; // delayed, for Windows
}, delay);
dispatch.call('click', this, 'right');
}
}
function mousedown() {
var button = d3_event.button;
if (button === 0 && !d3_event.ctrlKey) {
tooltip.classed('leftclick', true);
} else if (button === 2) {
tooltip.classed('rightclick', true);
}
down[button] = d3_event.timeStamp;
}
function mouseup() {
var button = d3_event.button;
var endTime = d3_event.timeStamp;
var startTime = down[button] || endTime;
var delay = (endTime - startTime < minTime) ? minTime : 0;
if (button === 0 && !d3_event.ctrlKey) {
window.setTimeout(function() {
tooltip.classed('leftclick', false);
down[button] = undefined; // delayed, for Windows
}, delay);
dispatch.call('click', this, 'left');
} else if (button === 2) {
window.setTimeout(function() {
tooltip.classed('rightclick', false);
down[button] = undefined; // delayed, for Windows
}, delay);
dispatch.call('click', this, 'right');
} else {
window.setTimeout(function() {
down[button] = undefined; // delayed, for Windows
}, delay);
}
}
function contextmenu() {
d3_event.preventDefault();
d3_event.stopPropagation();
if (!down[2] && !down.menu) {
tooltip.classed('rightclick', true);
window.setTimeout(function() {
tooltip.classed('rightclick', false);
}, minTime);
dispatch.call('click', this, 'right');
}
}
var behavior = function(selection) {
tooltip = selection;
down = {};
d3_select(window)
.on('keydown.intro', keydown)
.on('keyup.intro', keyup)
.on('mousedown.intro', mousedown)
.on('mouseup.intro', mouseup)
.on('contextmenu.intro', contextmenu);
};
behavior.off = function() {
d3_select(window)
.on('keydown.intro', null)
.on('keyup.intro', null)
.on('mousedown.intro', null)
.on('mouseup.intro', null)
.on('contextmenu.intro', null);
tooltip
.classed('leftclick', false)
.classed('rightclick', false);
};
return utilRebind(behavior, dispatch, 'on');
}
+2 -2
View File
@@ -57,14 +57,14 @@ export function uiPanelLocation(context) {
selection.call(redraw);
context.surface()
.on('mousemove.info-location', function() {
.on(('PointerEvent' in window ? 'pointer' : 'mouse') + 'move.info-location', function() {
selection.call(redraw);
});
};
panel.off = function() {
context.surface()
.on('mousemove.info-location', null);
.on('.info-location', null);
};
panel.id = 'location';
+40 -7
View File
@@ -13,6 +13,8 @@ export function uiPhotoviewer(context) {
var dispatch = d3_dispatch('resize');
var _pointerPrefix = 'PointerEvent' in window ? 'pointer' : 'mouse';
function photoviewer(selection) {
selection
.append('button')
@@ -25,27 +27,34 @@ export function uiPhotoviewer(context) {
.append('div')
.call(svgIcon('#iD-icon-close'));
function preventDefault() {
d3_event.preventDefault();
}
selection
.append('button')
.attr('class', 'resize-handle-xy')
.on('touchstart touchdown touchend', preventDefault)
.on(
'mousedown',
_pointerPrefix + 'down',
buildResizeListener(selection, 'resize', dispatch, { resizeOnX: true, resizeOnY: true })
);
selection
.append('button')
.attr('class', 'resize-handle-x')
.on('touchstart touchdown touchend', preventDefault)
.on(
'mousedown',
_pointerPrefix + 'down',
buildResizeListener(selection, 'resize', dispatch, { resizeOnX: true })
);
selection
.append('button')
.attr('class', 'resize-handle-y')
.on('touchstart touchdown touchend', preventDefault)
.on(
'mousedown',
_pointerPrefix + 'down',
buildResizeListener(selection, 'resize', dispatch, { resizeOnY: true })
);
@@ -54,16 +63,23 @@ export function uiPhotoviewer(context) {
services.openstreetcam.loadViewer(context);
function buildResizeListener(target, eventName, dispatch, options) {
var resizeOnX = !!options.resizeOnX;
var resizeOnY = !!options.resizeOnY;
var minHeight = options.minHeight || 240;
var minWidth = options.minWidth || 320;
var pointerId;
var startX;
var startY;
var startWidth;
var startHeight;
function startResize() {
if (pointerId !== (d3_event.pointerId || 'mouse')) return;
d3_event.preventDefault();
d3_event.stopPropagation();
var mapSize = context.map().dimensions();
if (resizeOnX) {
@@ -86,19 +102,36 @@ export function uiPhotoviewer(context) {
}
function stopResize() {
if (pointerId !== (d3_event.pointerId || 'mouse')) return;
d3_event.preventDefault();
d3_event.stopPropagation();
// remove all the listeners we added
d3_select(window)
.on('.' + eventName, null);
}
return function initResize() {
d3_event.preventDefault();
d3_event.stopPropagation();
pointerId = d3_event.pointerId || 'mouse';
startX = d3_event.clientX;
startY = d3_event.clientY;
startWidth = target.node().getBoundingClientRect().width;
startHeight = target.node().getBoundingClientRect().height;
var targetRect = target.node().getBoundingClientRect();
startWidth = targetRect.width;
startHeight = targetRect.height;
d3_select(window)
.on('mousemove.' + eventName, startResize, false)
.on('mouseup.' + eventName, stopResize, false);
.on(_pointerPrefix + 'move.' + eventName, startResize, false)
.on(_pointerPrefix + 'up.' + eventName, stopResize, false);
if (_pointerPrefix === 'pointer') {
d3_select(window)
.on('pointercancel.' + eventName, stopResize, false);
}
};
}
}
+29 -8
View File
@@ -152,8 +152,32 @@ export function uiPopover(klass) {
var display = _displayType.apply(this, arguments);
if (display === 'hover') {
anchor.on(_pointerPrefix + 'enter.popover', show);
anchor.on(_pointerPrefix + 'leave.popover', hide);
var _lastNonMouseEnterTime;
anchor.on(_pointerPrefix + 'enter.popover', function() {
if (d3_event.pointerType) {
if (d3_event.pointerType !== 'mouse') {
_lastNonMouseEnterTime = d3_event.timeStamp;
// only allow hover behavior for mouse input
return;
} else if (_lastNonMouseEnterTime &&
d3_event.timeStamp - _lastNonMouseEnterTime < 500) {
// HACK: iOS 13.4 sends an erroneous `mouse` type pointerenter
// event for non-mouse interactions right after sending
// the correct type pointerenter event. Workaround by discarding
// any mouse event that occurs immediately after a non-mouse event.
return;
}
}
// don't show if buttons are pressed, e.g. during click and drag of map
if (d3_event.buttons !== 0) return;
show.apply(this, arguments);
});
anchor.on(_pointerPrefix + 'leave.popover', function() {
hide.apply(this, arguments);
});
} else if (display === 'clickFocus') {
anchor
@@ -179,15 +203,11 @@ export function uiPopover(klass) {
function show() {
var displayType = _displayType.apply(this, arguments);
if (displayType === 'hover' && d3_event.pointerType === 'touch') {
// don't show hover popovers on touch devices
return;
}
var anchor = d3_select(this);
var popoverSelection = anchor.selectAll('.popover-' + _id);
if (popoverSelection.empty()) { // popover was removed somehow, put it back
if (popoverSelection.empty()) {
// popover was removed somehow, put it back
anchor.call(popover.destroy);
anchor.each(setup);
popoverSelection = anchor.selectAll('.popover-' + _id);
@@ -195,6 +215,7 @@ export function uiPopover(klass) {
popoverSelection.classed('in', true);
var displayType = _displayType.apply(this, arguments);
if (displayType === 'clickFocus') {
anchor.classed('active', true);
popoverSelection.node().focus();
+1 -1
View File
@@ -53,7 +53,7 @@ export function uiPresetList(context) {
d3_event.keyCode === utilKeybinding.keyCodes['⌦'])) {
d3_event.preventDefault();
d3_event.stopPropagation();
operationDelete(_entityIDs, context)();
operationDelete(context, _entityIDs)();
// hack to let undo work when search is autofocused
} else if (search.property('value').length === 0 &&
+49 -28
View File
@@ -16,6 +16,8 @@ export function uiSectionBackgroundOffset(context) {
.disclosureContent(renderDisclosureContent)
.expandedByDefault(false);
var _pointerPrefix = 'PointerEvent' in window ? 'pointer' : 'mouse';
var _directions = [
['right', [0.5, 0]],
['top', [0, -0.5]],
@@ -24,7 +26,7 @@ export function uiSectionBackgroundOffset(context) {
];
function d3_eventCancel() {
function cancelEvent() {
d3_event.stopPropagation();
d3_event.preventDefault();
}
@@ -59,7 +61,7 @@ export function uiSectionBackgroundOffset(context) {
}
function clickNudgeButton(d) {
function pointerdownNudgeButton(d) {
var interval;
var timeout = window.setTimeout(function() {
interval = window.setInterval(nudge.bind(null, d), 100);
@@ -69,13 +71,13 @@ export function uiSectionBackgroundOffset(context) {
window.clearTimeout(timeout);
window.clearInterval(interval);
d3_select(window)
.on('mouseup.buttonoffset', null, true)
.on('mousedown.buttonoffset', null, true);
.on(_pointerPrefix + 'up.buttonoffset', null, true)
.on(_pointerPrefix + 'down.buttonoffset', null, true);
}
d3_select(window)
.on('mouseup.buttonoffset', doneNudge, true)
.on('mousedown.buttonoffset', doneNudge, true);
.on(_pointerPrefix + 'up.buttonoffset', doneNudge, true)
.on(_pointerPrefix + 'down.buttonoffset', doneNudge, true);
nudge(d);
}
@@ -107,30 +109,44 @@ export function uiSectionBackgroundOffset(context) {
var origin = [d3_event.clientX, d3_event.clientY];
var pointerId = d3_event.pointerId || 'mouse';
context.container()
.append('div')
.attr('class', 'nudge-surface');
d3_select(window)
.on('mousemove.offset', function() {
var latest = [d3_event.clientX, d3_event.clientY];
var d = [
-(origin[0] - latest[0]) / 4,
-(origin[1] - latest[1]) / 4
];
.on(_pointerPrefix + 'move.drag-bg-offset', pointermove)
.on(_pointerPrefix + 'up.drag-bg-offset', pointerup);
origin = latest;
nudge(d);
})
.on('mouseup.offset', function() {
if (d3_event.button !== 0) return;
context.container().selectAll('.nudge-surface')
.remove();
if (_pointerPrefix === 'pointer') {
d3_select(window)
.on('pointercancel.drag-bg-offset', pointerup);
}
d3_select(window)
.on('mousemove.offset', null)
.on('mouseup.offset', null);
});
function pointermove() {
if (pointerId !== (d3_event.pointerId || 'mouse')) return;
var latest = [d3_event.clientX, d3_event.clientY];
var d = [
-(origin[0] - latest[0]) / 4,
-(origin[1] - latest[1]) / 4
];
origin = latest;
nudge(d);
}
function pointerup() {
if (pointerId !== (d3_event.pointerId || 'mouse')) return;
if (d3_event.button !== 0) return;
context.container().selectAll('.nudge-surface')
.remove();
d3_select(window)
.on('.drag-bg-offset', null);
}
}
@@ -150,7 +166,11 @@ export function uiSectionBackgroundOffset(context) {
var nudgeEnter = containerEnter
.append('div')
.attr('class', 'nudge-outer-rect')
.on('mousedown', dragOffset);
.on('touchstart touchmove touchend', function() {
// prevent scrolling while dragging
d3_event.preventDefault();
})
.on(_pointerPrefix + 'down', dragOffset);
nudgeEnter
.append('div')
@@ -164,18 +184,19 @@ export function uiSectionBackgroundOffset(context) {
.data(_directions).enter()
.append('button')
.attr('class', function(d) { return d[0] + ' nudge'; })
.on('contextmenu', d3_eventCancel)
.on('mousedown', function(d) {
.on('contextmenu', cancelEvent)
.on(_pointerPrefix + 'down', function(d) {
if (d3_event.button !== 0) return;
clickNudgeButton(d[1]);
pointerdownNudgeButton(d[1]);
});
containerEnter
.append('button')
.attr('title', t('background.reset'))
.attr('class', 'nudge-reset disabled')
.on('contextmenu', d3_eventCancel)
.on('contextmenu', cancelEvent)
.on('click', function() {
d3_event.preventDefault();
if (d3_event.button !== 0) return;
resetOffset();
})
+1 -5
View File
@@ -83,11 +83,7 @@ export function uiSectionFeatureType(context) {
.on('click', function() {
dispatch.call('choose', this, _presets);
})
.on('mousedown', function() {
d3_event.preventDefault();
d3_event.stopPropagation();
})
.on('mouseup', function() {
.on('pointerdown pointerup mousedown mouseup', function() {
d3_event.preventDefault();
d3_event.stopPropagation();
});
+1 -1
View File
@@ -279,7 +279,7 @@ export function uiSectionRawTagEditor(id, context) {
});
items.selectAll('button.remove')
.on('mousedown', removeTag); // 'click' fires too late - #5878
.on(('PointerEvent' in window ? 'pointer' : 'mouse') + 'down', removeTag); // 'click' fires too late - #5878
}
+2
View File
@@ -57,6 +57,7 @@ export function uiTooltip(klass) {
headingSelect.enter()
.append('div')
.attr('class', 'tooltip-heading')
.merge(headingSelect)
.html(heading);
var textSelect = selection
@@ -69,6 +70,7 @@ export function uiTooltip(klass) {
textSelect.enter()
.append('div')
.attr('class', 'tooltip-text')
.merge(textSelect)
.html(text);
var keyhintWrap = selection
+12 -6
View File
@@ -27,19 +27,24 @@ export function utilDoubleUp() {
// ignore right-click
if (d3_event.ctrlKey || d3_event.button === 2) return;
var loc = utilFastMouse(this)(d3_event);
var loc = [d3_event.clientX, d3_event.clientY];
// Don't rely on pointerId here since it can change between pointerdown
// events on touch devices
if (_pointer && !pointerIsValidFor(loc)) {
// if this pointer is no longer valid, clear it so another can be started
_pointer = undefined;
}
if (!_pointer) {
// don't rely on the pointerId since it can change between down events on touch devices
_pointer = {
startLoc: loc,
startTime: new Date().getTime(),
upCount: 0
upCount: 0,
pointerId: d3_event.pointerId
};
} else { // double down
_pointer.pointerId = d3_event.pointerId;
}
}
@@ -48,14 +53,15 @@ export function utilDoubleUp() {
// ignore right-click
if (d3_event.ctrlKey || d3_event.button === 2) return;
if (!_pointer) return;
if (!_pointer || _pointer.pointerId !== d3_event.pointerId) return;
_pointer.upCount += 1;
if (_pointer.upCount === 2) { // double up!
var loc = utilFastMouse(this)(d3_event);
var loc = [d3_event.clientX, d3_event.clientY];
if (pointerIsValidFor(loc)) {
dispatch.call('doubleUp', this, loc);
var locInThis = utilFastMouse(this)(d3_event);
dispatch.call('doubleUp', this, locInThis);
}
// clear the pointer info in any case
_pointer = undefined;
+2 -2
View File
@@ -10,7 +10,7 @@ export function utilSessionMutex(name) {
function renew() {
var expires = new Date();
expires.setSeconds(expires.getSeconds() + 5);
document.cookie = name + '=1; expires=' + expires.toUTCString();
document.cookie = name + '=1; expires=' + expires.toUTCString() + '; sameSite=strict';
}
mutex.lock = function () {
@@ -24,7 +24,7 @@ export function utilSessionMutex(name) {
mutex.unlock = function () {
if (!intervalID) return;
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT';
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; sameSite=strict';
clearInterval(intervalID);
intervalID = null;
};
+35 -28
View File
@@ -3,10 +3,11 @@
import { dispatch as d3_dispatch } from 'd3-dispatch';
import { interpolateZoom } from 'd3-interpolate';
import { event as d3_event, customEvent as d3_customEvent } from 'd3-selection';
import { event as d3_event, customEvent as d3_customEvent, select as d3_select } from 'd3-selection';
import { interrupt as d3_interrupt } from 'd3-transition';
import { zoomIdentity as d3_zoomIdentity } from 'd3-zoom';
import ZoomEvent from '../../node_modules/d3-zoom/src/event.js';
import { Transform, identity } from '../../node_modules/d3-zoom/src/transform.js';
import { Transform } from '../../node_modules/d3-zoom/src/transform.js';
import { utilFastMouse, utilFunctor } from './util';
@@ -28,10 +29,6 @@ function defaultExtent() {
return [[0, 0], [e.clientWidth, e.clientHeight]];
}
function defaultTransform() {
return this.__zoom || identity;
}
function defaultWheelDelta() {
return -d3_event.deltaY * (d3_event.deltaMode === 1 ? 0.05 : d3_event.deltaMode ? 1 : 0.002);
}
@@ -56,22 +53,24 @@ export function utilZoomPan() {
translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
interpolate = interpolateZoom,
listeners = d3_dispatch('start', 'zoom', 'end'),
_wheelDelay = 150;
_wheelDelay = 150,
_transform = d3_zoomIdentity,
_activeGesture;
function zoom(selection) {
selection
.property('__zoom', defaultTransform)
.on('pointerdown.zoom', pointerdown)
.on('pointermove.zoom', pointermove)
.on('pointerup.zoom pointercancel.zoom', pointerup)
.on('wheel.zoom', wheeled)
.style('touch-action', 'none')
.style('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
d3_select(window)
.on('pointermove.zoompan', pointermove)
.on('pointerup.zoompan pointercancel.zoompan', pointerup);
}
zoom.transform = function(collection, transform, point) {
var selection = collection.selection ? collection.selection() : collection;
selection.property('__zoom', defaultTransform);
if (collection !== selection) {
schedule(collection, transform, point);
} else {
@@ -86,7 +85,7 @@ export function utilZoomPan() {
zoom.scaleBy = function(selection, k, p) {
zoom.scaleTo(selection, function() {
var k0 = this.__zoom.k,
var k0 = _transform.k,
k1 = typeof k === 'function' ? k.apply(this, arguments) : k;
return k0 * k1;
}, p);
@@ -95,7 +94,7 @@ export function utilZoomPan() {
zoom.scaleTo = function(selection, k, p) {
zoom.transform(selection, function() {
var e = extent.apply(this, arguments),
t0 = this.__zoom,
t0 = _transform,
p0 = p == null ? centroid(e) : typeof p === 'function' ? p.apply(this, arguments) : p,
p1 = t0.invert(p0),
k1 = typeof k === 'function' ? k.apply(this, arguments) : k;
@@ -105,7 +104,7 @@ export function utilZoomPan() {
zoom.translateBy = function(selection, x, y) {
zoom.transform(selection, function() {
return constrain(this.__zoom.translate(
return constrain(_transform.translate(
typeof x === 'function' ? x.apply(this, arguments) : x,
typeof y === 'function' ? y.apply(this, arguments) : y
), extent.apply(this, arguments), translateExtent);
@@ -115,9 +114,9 @@ export function utilZoomPan() {
zoom.translateTo = function(selection, x, y, p) {
zoom.transform(selection, function() {
var e = extent.apply(this, arguments),
t = this.__zoom,
t = _transform,
p0 = p == null ? centroid(e) : typeof p === 'function' ? p.apply(this, arguments) : p;
return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(
return constrain(d3_zoomIdentity.translate(p0[0], p0[1]).scale(t.k).translate(
typeof x === 'function' ? -x.apply(this, arguments) : -x,
typeof y === 'function' ? -y.apply(this, arguments) : -y
), e, translateExtent);
@@ -149,7 +148,7 @@ export function utilZoomPan() {
e = extent.apply(that, args),
p = point == null ? centroid(e) : typeof point === 'function' ? point.apply(that, args) : point,
w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
a = that.__zoom,
a = _transform,
b = typeof transform === 'function' ? transform.apply(that, args) : transform,
i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
return function(t) {
@@ -161,7 +160,7 @@ export function utilZoomPan() {
}
function gesture(that, args, clean) {
return (!clean && that.__zooming) || new Gesture(that, args);
return (!clean && _activeGesture) || new Gesture(that, args);
}
function Gesture(that, args) {
@@ -174,7 +173,7 @@ export function utilZoomPan() {
Gesture.prototype = {
start: function() {
if (++this.active === 1) {
this.that.__zooming = this;
_activeGesture = this;
this.emit('start');
}
return this;
@@ -183,26 +182,26 @@ export function utilZoomPan() {
if (this.mouse && key !== 'mouse') this.mouse[1] = transform.invert(this.mouse[0]);
if (this.pointer0 && key !== 'touch') this.pointer0[1] = transform.invert(this.pointer0[0]);
if (this.pointer1 && key !== 'touch') this.pointer1[1] = transform.invert(this.pointer1[0]);
this.that.__zoom = transform;
_transform = transform;
this.emit('zoom');
return this;
},
end: function() {
if (--this.active === 0) {
delete this.that.__zooming;
_activeGesture = null;
this.emit('end');
}
return this;
},
emit: function(type) {
d3_customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);
d3_customEvent(new ZoomEvent(zoom, type, _transform), listeners.apply, listeners, [type, this.that, this.args]);
}
};
function wheeled() {
if (!filter.apply(this, arguments)) return;
var g = gesture(this, arguments),
t = this.__zoom,
t = _transform,
k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
p = utilFastMouse(this)(d3_event);
@@ -250,7 +249,7 @@ export function utilZoomPan() {
d3_event.stopImmediatePropagation();
_pointerLocGetter = utilFastMouse(this);
var loc = _pointerLocGetter(d3_event);
var p = [loc, this.__zoom.invert(loc), d3_event.pointerId];
var p = [loc, _transform.invert(loc), d3_event.pointerId];
if (!g.pointer0) {
g.pointer0 = p;
started = true;
@@ -266,7 +265,9 @@ export function utilZoomPan() {
}
function pointermove() {
if (!this.__zooming || !_pointerLocGetter) return;
if (!_downPointerIDs.has(d3_event.pointerId)) return;
if (!_activeGesture || !_pointerLocGetter) return;
var g = gesture(this, arguments);
@@ -291,7 +292,7 @@ export function utilZoomPan() {
if (isPointer0) g.pointer0[0] = loc;
else if (isPointer1) g.pointer1[0] = loc;
t = g.that.__zoom;
t = _transform;
if (g.pointer1) {
var p0 = g.pointer0[0], l0 = g.pointer0[1],
p1 = g.pointer1[0], l1 = g.pointer1[1],
@@ -309,9 +310,11 @@ export function utilZoomPan() {
}
function pointerup() {
if (!_downPointerIDs.has(d3_event.pointerId)) return;
_downPointerIDs.delete(d3_event.pointerId);
if (!this.__zooming) return;
if (!_activeGesture) return;
var g = gesture(this, arguments);
@@ -324,7 +327,7 @@ export function utilZoomPan() {
g.pointer0 = g.pointer1;
delete g.pointer1;
}
if (g.pointer0) g.pointer0[1] = this.__zoom.invert(g.pointer0[0]);
if (g.pointer0) g.pointer0[1] = _transform.invert(g.pointer0[0]);
else {
g.end();
}
@@ -358,6 +361,10 @@ export function utilZoomPan() {
return arguments.length ? (interpolate = _, zoom) : interpolate;
};
zoom._transform = function(_) {
return arguments.length ? (_transform = _, zoom) : _transform;
};
zoom.on = function() {
var value = listeners.on.apply(listeners, arguments);
return value === listeners ? zoom : value;
+1 -1
View File
@@ -65,7 +65,7 @@ export function validationDisconnectedWay() {
entityIds: [singleEntity.id],
onClick: function(context) {
var id = this.issue.entityIds[0];
var operation = operationDelete([id], context);
var operation = operationDelete(context, [id]);
if (!operation.disabled()) {
operation();
}
+2 -2
View File
@@ -202,11 +202,11 @@ export function validationMismatchedGeometry() {
var extractOnClick = null;
if (!context.hasHiddenConnections(entityId) &&
!actionExtract(entityId, context.projection).disabled(context.graph())) {
!actionExtract(entityId).disabled(context.graph())) {
extractOnClick = function(context) {
var entityId = this.issue.entityIds[0];
var action = actionExtract(entityId, context.projection);
var action = actionExtract(entityId);
context.perform(
action,
t('operations.extract.annotation.single')
+2 -2
View File
@@ -107,12 +107,12 @@ export function validationMissingTag(context) {
var deleteOnClick;
var id = this.entityIds[0];
var operation = operationDelete([id], context);
var operation = operationDelete(context, [id]);
var disabledReasonID = operation.disabled();
if (!disabledReasonID) {
deleteOnClick = function(context) {
var id = this.issue.entityIds[0];
var operation = operationDelete([id], context);
var operation = operationDelete(context, [id]);
if (!operation.disabled()) {
operation();
}

Some files were not shown because too many files have changed in this diff Show More