Skip to content

Commit

Permalink
Fixed issues with demo maps. Fixed potential issue with matrix filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Fairgrieve authored and Scott Fairgrieve committed Oct 27, 2015
1 parent 5c9ebbf commit a11e3e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
25 changes: 5 additions & 20 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,25 @@ <h5>CSS Filter</h5>
var layerChoices = {
Stamen: {
Toner: {
thumbnail: 'http://tile.stamen.com/toner/12/655/1583.jpg',
thumbnail: 'http://a.tile.stamen.com/toner/12/655/1583.png',
getLayer: function (classFunction) {
return new classFunction('http://tile.stamen.com/toner/{z}/{x}/{y}.jpg', {
return new classFunction('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', {
detectRetina: true
});
}
},
Terrain: {
thumbnail: 'http://tile.stamen.com/terrain/12/655/1583.jpg',
getLayer: function (classFunction) {
return new classFunction('http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg', {
return new classFunction('http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.jpg', {
detectRetina: true
});
}
},
Watercolor: {
thumbnail: 'http://tile.stamen.com/watercolor/12/655/1583.jpg',
getLayer: function (classFunction) {
return new classFunction('http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', {
return new classFunction('http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', {
detectRetina: true
});
}
Expand Down Expand Up @@ -233,8 +233,7 @@ <h5>CSS Filter</h5>
});
}
}
},
Mapbox: {}
}
};

var styles = ['streets', 'light', 'dark', 'satellite', 'streets-satellite', 'wheatpaste', 'streets-basic', 'comic', 'outdoors', 'run-bike-hike', 'pencil', 'pirates', 'emerald', 'high-contrast'];
Expand All @@ -247,20 +246,6 @@ <h5>CSS Filter</h5>
}
};

for (var i = 0; i < styles.length; ++i) {
var styleName = styles[i];
var parts = styleName.split('-');

var name = _.map(parts, function (part) {
return part[0].toUpperCase() + part.substring(1);
}).join(' ');

layerChoices.Mapbox[name] = {
thumbnail: 'https://a.tiles.mapbox.com/v4/mapbox.' + styleName + '/12/655/1583.png?access_token=' + apiKey,
getLayer: createFunc(styleName)
};
}

// Store the currently selected filters
var selectedCSSFilter = L.ImageFilters.Presets.CSS.None;
var selectedChannelFilter = L.ImageFilters.Presets.CanvasChannel.None;
Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet-tilefilter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a11e3e8

Please sign in to comment.