diff --git a/js/id/services/wiki.js b/js/id/services/wiki.js deleted file mode 100644 index 7273dffed..000000000 --- a/js/id/services/wiki.js +++ /dev/null @@ -1,32 +0,0 @@ -iD.wiki = function() { - var wiki = {}, - endpoint = 'http://wiki.openstreetmap.org/w/api.php'; - // ?action=query&prop=imageinfo&titles=Image:Residential.jpg&iiprop=url%7Ccontent&format=json&callback=foo', - - wiki.image = function(img, callback) { - d3.jsonp(endpoint + '?' + - iD.util.qsString({ - action: 'query', - prop: 'imageinfo', - titles: img, - iiprop: 'url', - format: 'json', - callback: '{callback}' - }), function(d) { - try { - callback(null, - d.query.pages[Object.keys(d.query.pages)[0]].imageinfo[0].url); - } catch(e) { - callback(new Error('Image not found')); - } - }); - }; - - wiki.endpoint = function(_) { - if (!arguments.length) return endpoint; - endpoint = _; - return wiki; - }; - - return wiki; -}; diff --git a/js/id/ui/tag_reference.js b/js/id/ui/tag_reference.js index f88576bef..8627ebe1c 100644 --- a/js/id/ui/tag_reference.js +++ b/js/id/ui/tag_reference.js @@ -27,14 +27,10 @@ iD.tagReference = function(selection) { .text('Description'); if (selection.datum().image) { - iD.wiki().image(selection.datum().image, function(err, src) { - if (!err) { - referenceBody - .append('img') - .attr('class', 'wiki-image') - .attr('src', src); - } - }); + referenceBody + .append('img') + .attr('class', 'wiki-image') + .attr('src', selection.datum().image.image_url); } referenceBody