Use correct changesets URL for dev

This commit is contained in:
John Firebaugh
2013-05-19 20:09:54 -07:00
parent 6c849baad6
commit d2e775ac65
3 changed files with 9 additions and 4 deletions

View File

@@ -25,6 +25,10 @@ iD.Connection = function() {
return url + '/browse/changeset/' + changesetId;
};
connection.changesetsURL = function(extent) {
return url + '/browse/changesets?bbox=' + extent.toParam();
};
connection.entityURL = function(entity) {
return url + '/browse/' + entity.type + '/' + entity.osmId();
};

View File

@@ -41,5 +41,9 @@ _.extend(iD.geo.Extent.prototype, {
return iD.geo.Extent(
[this[0][0] - dLon, this[0][1] - dLat],
[this[1][0] + dLon, this[1][1] + dLat]);
},
toParam: function() {
return [this[0][0], this[0][1], this[1][0], this[1][1]].join(',');
}
});

View File

@@ -34,10 +34,7 @@ iD.ui.Contributors = function(context) {
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', function() {
var ext = context.map().extent();
return 'http://www.openstreetmap.org/browse/changesets?bbox=' + [
ext[0][0], ext[0][1],
ext[1][0], ext[1][1]];
return context.connection().changesetsURL(context.map().extent());
})
.text(u.length - limit + 1);