Changeset 5305
- Timestamp:
- 11/30/07 12:48:48 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/ahocevar/styles/lib/OpenLayers/Rule/Comparison.js
r5299 r5305 6 6 /** 7 7 * @requires: OpenLayers/Rule.js 8 * @requires: OpenLayers/Style.js9 8 * 10 9 * Class: OpenLayers.Rule.Comparison … … 21 20 * APIProperty: type 22 21 * {String} type: type of the comparison. This is one of 23 * - OpenLayers.Rule.Comparison.EQUAL_TO = "= ";22 * - OpenLayers.Rule.Comparison.EQUAL_TO = "=="; 24 23 * - OpenLayers.Rule.Comparison.NOT_EQUAL_TO = "!="; 25 24 * - OpenLayers.Rule.Comparison.LESS_THAN = "<"; … … 103 102 case OpenLayers.Rule.Comparison.LESS_THAN_OR_EQUAL_TO: 104 103 case OpenLayers.Rule.Comparison.GREATER_THAN_OR_EQUAL_TO: 105 return this.binaryCompare(feature, this.property, 106 OpenLayers.Style.createLiteral(this.value, feature)); 104 return this.binaryCompare(feature, this.property, this.value); 107 105 108 106 case OpenLayers.Rule.Comparison.BETWEEN: 109 107 var result = 110 attributes[this.property] > 111 OpenLayers.Style.createLiteral( 112 this.lowerBoundary, feature); 108 attributes[this.property] > this.lowerBoundary; 113 109 result = result && 114 attributes[this.property] < 115 OpenLayers.Style.createLiteral( 116 this.upperBoundary, feature); 110 attributes[this.property] < this.upperBoundary; 117 111 return result; 118 112 case OpenLayers.Rule.Comparison.LIKE: 119 var regexp = new RegExp( 120 OpenLayers.Style.createLiteral(this.value, feature), 113 var regexp = new RegExp(this.value, 121 114 "gi"); 122 115 return regexp.test(attributes[this.property]);
