mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 16:19:48 +02:00
@@ -298,6 +298,11 @@ form.hide {
|
||||
.margin1 {margin: 10px;}
|
||||
.margin2 {margin: 20px;}
|
||||
|
||||
.loading {
|
||||
background: url(../img/loader_bg.gif);
|
||||
background-size:5px 5px;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
|
||||
button {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 606 B |
@@ -16,8 +16,10 @@ iD.ui.Geocoder = function(context) {
|
||||
if (d3.event.keyCode !== 13) return;
|
||||
d3.event.preventDefault();
|
||||
var searchVal = this.value;
|
||||
inputNode.classed('loading', true);
|
||||
d3.json('http://nominatim.openstreetmap.org/search/' +
|
||||
encodeURIComponent(searchVal) + '?limit=10&format=json', function(err, resp) {
|
||||
inputNode.classed('loading', false);
|
||||
if (err) return hide();
|
||||
if (!resp.length) {
|
||||
return iD.ui.flash(context.container())
|
||||
|
||||
Reference in New Issue
Block a user