fix #63: support = for zoomlevels

This commit is contained in:
Konstantin Käfer 2011-01-25 18:21:53 -05:00
parent 7798757cb6
commit cfac34fef8

View File

@ -56,7 +56,11 @@ tree.ZoomFilter.ranges = {
*/
tree.ZoomFilter.rangeFromCondition = function(op, value) {
var range = [];
if (op === '>' || op === '>=') {
if (op === '=') {
for (var i = 0; i < tree.ZoomFilter.maxZoom; i++) {
range[i] = (i == value);
}
} else if (op === '>' || op === '>=') {
if (op === '>') value++;
for (var i = 0; i < tree.ZoomFilter.maxZoom; i++) {
range[i] = (i >= value);