Backport for maxNumberOfFeaturesForPreview

Modified maxNumberOfFeaturesForPreview using metadatamap.