0
/**
 * @const
 * @type {!storeLocator.FeatureSet}
 * @type {!storeLocator.FeatureSet}
 * @private
 */
MedicareDataSource.prototype.FEATURES_ = new storeLocator.FeatureSet(
    new storeLocator.Feature('Wheelchair-YES', 'Shoe1'),
    new storeLocator.Feature('Audio-YES', 'Shoe2')
);


/**
 * @return {!storeLocator.FeatureSet}
 */
MedicareDataSource.prototype.getFeatures = function() {
    return this.FEATURES_;
};

每次我去添加一行代码后Audio-YES输出消失在我的程序中?怎么了?

4

2 回答 2

0

您不能在new storeLocator.Feature('Audio-YES', 'Shoe2'). plot: storeLocator.FeatureSet是一个构造函数,你不用在那里写代码,你传递参数,用逗号分隔。

于 2013-05-12T06:28:56.413 回答
0

,也许您在插入新行之前忘记添加:

MedicareDataSource.prototype.FEATURES_ = new storeLocator.FeatureSet(
    new storeLocator.Feature('Wheelchair-YES', 'Shoe1'),
    new storeLocator.Feature('Audio-YES', 'Shoe2'), // don't forget the comma
    new storeLocator.Feature('something', 'else')
);
于 2013-05-12T06:30:01.163 回答