diff --git a/css/app.css b/css/app.css index d25b31f48..9b576ec15 100644 --- a/css/app.css +++ b/css/app.css @@ -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 { diff --git a/img/loader_bg.gif b/img/loader_bg.gif new file mode 100644 index 000000000..3d88f3d12 Binary files /dev/null and b/img/loader_bg.gif differ diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index f11b026e4..d73c19dce 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -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())