mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-21 10:33:34 +00:00
24 lines
581 B
JavaScript
24 lines
581 B
JavaScript
iD.taginfo = function() {
|
|
var taginfo = {},
|
|
endpoint = 'http://taginfo.openstreetmap.org/api/2/';
|
|
|
|
taginfo.values = function(key, callback) {
|
|
d3.json(endpoint + 'db/keys/values?' +
|
|
iD.util.qsString({
|
|
key: key,
|
|
rp: 20,
|
|
sortname: 'count_all',
|
|
sortorder: 'desc',
|
|
page: 1
|
|
}), callback);
|
|
};
|
|
|
|
taginfo.endpoint = function(_) {
|
|
if (!arguments.length) return endpoint;
|
|
endpoint = _;
|
|
return taginfo;
|
|
};
|
|
|
|
return taginfo;
|
|
};
|