Use osm-auth 1.0.1, make authenticated OSM API calls

(re: #2262)
This commit is contained in:
Bryan Housel
2016-10-24 18:40:52 -04:00
parent 45d85e04c5
commit a601ccc0c9
2 changed files with 13 additions and 13 deletions
+12 -12
View File
@@ -464,20 +464,20 @@ export default {
dispatch.call('loading');
}
function bboxPath(tile) {
return '/api/0.6/map?bbox=' + tile.extent.toParam();
}
inflight[id] = that.loadFromAPI(
'/api/0.6/map?bbox=' + tile.extent.toParam(),
function(err, parsed) {
loadedTiles[id] = true;
delete inflight[id];
inflight[id] = that.loadFromAPI(bboxPath(tile), function(err, parsed) {
loadedTiles[id] = true;
delete inflight[id];
if (callback) {
callback(err, _.extend({ data: parsed }, tile));
}
if (callback) callback(err, _.extend({ data: parsed }, tile));
if (_.isEmpty(inflight)) {
dispatch.call('loaded');
}
});
if (_.isEmpty(inflight)) {
dispatch.call('loaded');
}
});
});
},
+1 -1
View File
@@ -27,7 +27,7 @@
"diacritics": "1.2.3",
"lodash": "4.16.4",
"marked": "0.3.6",
"osm-auth": "1.0.0",
"osm-auth": "1.0.1",
"rbush": "2.0.1",
"sexagesimal": "0.5.0",
"togeojson": "0.16.0",