Added capability enums.
Fixed layer.getExtent() and improved error message.