Merge branch 'layerzoom'

This commit is contained in:
root 2013-02-26 11:40:58 -05:00
commit 7deb1b86e0

View File

@ -9,7 +9,13 @@ tree.LayerXML = function(obj, styles) {
var prop_string = '';
for (var prop in obj.properties) {
prop_string += ' ' + prop + '="' + obj.properties[prop] + '"\n';
if (prop === 'minzoom') {
prop_string += ' maxzoom="' + tree.Zoom.ranges[obj.properties[prop]] + '"\n';
} else if (prop === 'maxzoom') {
prop_string += ' minzoom="' + tree.Zoom.ranges[obj.properties[prop]+1] + '"\n';
} else {
prop_string += ' ' + prop + '="' + obj.properties[prop] + '"\n';
}
}
return '<Layer' +