mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Add address ui element with street suggestions
This commit is contained in:
+16
-1
@@ -1586,4 +1586,19 @@ div.combobox {
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 840px) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Address input */
|
||||
|
||||
.preset-input .addr-housename {
|
||||
width: 300px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preset-input .addr-number {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.preset-input .addr-streetname {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
<script src='js/id/ui/taglist.js'></script>
|
||||
<script src='js/id/ui/presetgrid.js'></script>
|
||||
<script src='js/id/ui/tageditor.js'></script>
|
||||
<script src='js/id/ui/address.js'></script>
|
||||
|
||||
<script src='js/id/actions.js'></script>
|
||||
<script src="js/id/actions/add_midpoint.js"></script>
|
||||
|
||||
@@ -85,3 +85,7 @@ iD.geo.pathLength = function(path) {
|
||||
}
|
||||
return length;
|
||||
};
|
||||
|
||||
iD.geo.metresToCoordinates = function(loc, vector) {
|
||||
return [vector[1] / 111200, vector[0] / 111200 / Math.cos(loc[1])];
|
||||
};
|
||||
|
||||
@@ -134,6 +134,11 @@ iD.ui.preset = function() {
|
||||
// Multiple elements, eg, address
|
||||
} else {
|
||||
if (d.type === 'address') {
|
||||
wrap.append('div')
|
||||
.attr('class', 'col8 preset-input', d)
|
||||
.call(iD.ui.preset.address()
|
||||
.context(context)
|
||||
.entity(entity));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
{
|
||||
"key": "cuisine",
|
||||
"type": "combo"
|
||||
},
|
||||
{
|
||||
"type": "address",
|
||||
"title": "Address"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user