Skip to content

Commit

Permalink
windows support - refs mapbox/tilelive#40
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Nov 15, 2013
1 parent 2c5d8d9 commit 93a838c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion models/Tileset.server.bones
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ models.Tileset.prototype.sync = function(method, model, success, error) {
case 'read':
var uri = model.options.uri;
if (!uri) uri = Bones.plugin.config.tiles + model.options.basepath + '?id=' + model.get('id');

// Workaround https://github.com/mapbox/tilelive.js/issues/40
if (process.platform === 'win32' && typeof uri === 'string') {
uri = url.parse(uri, true);
if (uri.protocol && uri.protocol.length <= 2) {
uri.protocol = null;
}
}
tilelive.info(uri, function(err, data, source) {
var err = err || tilelive.verify(data, source);
if (err) return error(err);
Expand Down

0 comments on commit 93a838c

Please sign in to comment.