Rename ol.expression to ol.expr
This commit is contained in:
+25
-25
@@ -3,9 +3,9 @@ goog.provide('ol.style.IconLiteral');
|
||||
goog.provide('ol.style.IconType');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol.expression');
|
||||
goog.require('ol.expression.Expression');
|
||||
goog.require('ol.expression.Literal');
|
||||
goog.require('ol.expr');
|
||||
goog.require('ol.expr.Expression');
|
||||
goog.require('ol.expr.Literal');
|
||||
goog.require('ol.style.Point');
|
||||
goog.require('ol.style.PointLiteral');
|
||||
|
||||
@@ -70,47 +70,47 @@ ol.style.Icon = function(options) {
|
||||
goog.asserts.assert(options.url, 'url must be set');
|
||||
|
||||
/**
|
||||
* @type {ol.expression.Expression}
|
||||
* @type {ol.expr.Expression}
|
||||
* @private
|
||||
*/
|
||||
this.url_ = (options.url instanceof ol.expression.Expression) ?
|
||||
options.url : new ol.expression.Literal(options.url);
|
||||
this.url_ = (options.url instanceof ol.expr.Expression) ?
|
||||
options.url : new ol.expr.Literal(options.url);
|
||||
|
||||
/**
|
||||
* @type {ol.expression.Expression}
|
||||
* @type {ol.expr.Expression}
|
||||
* @private
|
||||
*/
|
||||
this.width_ = !goog.isDef(options.width) ?
|
||||
null :
|
||||
(options.width instanceof ol.expression.Expression) ?
|
||||
options.width : new ol.expression.Literal(options.width);
|
||||
(options.width instanceof ol.expr.Expression) ?
|
||||
options.width : new ol.expr.Literal(options.width);
|
||||
|
||||
/**
|
||||
* @type {ol.expression.Expression}
|
||||
* @type {ol.expr.Expression}
|
||||
* @private
|
||||
*/
|
||||
this.height_ = !goog.isDef(options.height) ?
|
||||
null :
|
||||
(options.height instanceof ol.expression.Expression) ?
|
||||
options.height : new ol.expression.Literal(options.height);
|
||||
(options.height instanceof ol.expr.Expression) ?
|
||||
options.height : new ol.expr.Literal(options.height);
|
||||
|
||||
/**
|
||||
* @type {ol.expression.Expression}
|
||||
* @type {ol.expr.Expression}
|
||||
* @private
|
||||
*/
|
||||
this.opacity_ = !goog.isDef(options.opacity) ?
|
||||
new ol.expression.Literal(ol.style.IconDefaults.opacity) :
|
||||
(options.opacity instanceof ol.expression.Expression) ?
|
||||
options.opacity : new ol.expression.Literal(options.opacity);
|
||||
new ol.expr.Literal(ol.style.IconDefaults.opacity) :
|
||||
(options.opacity instanceof ol.expr.Expression) ?
|
||||
options.opacity : new ol.expr.Literal(options.opacity);
|
||||
|
||||
/**
|
||||
* @type {ol.expression.Expression}
|
||||
* @type {ol.expr.Expression}
|
||||
* @private
|
||||
*/
|
||||
this.rotation_ = !goog.isDef(options.rotation) ?
|
||||
new ol.expression.Literal(ol.style.IconDefaults.rotation) :
|
||||
(options.rotation instanceof ol.expression.Expression) ?
|
||||
options.rotation : new ol.expression.Literal(options.rotation);
|
||||
new ol.expr.Literal(ol.style.IconDefaults.rotation) :
|
||||
(options.rotation instanceof ol.expr.Expression) ?
|
||||
options.rotation : new ol.expr.Literal(options.rotation);
|
||||
|
||||
};
|
||||
|
||||
@@ -121,26 +121,26 @@ ol.style.Icon = function(options) {
|
||||
*/
|
||||
ol.style.Icon.prototype.createLiteral = function(opt_feature) {
|
||||
|
||||
var url = ol.expression.evaluateFeature(this.url_, opt_feature);
|
||||
var url = ol.expr.evaluateFeature(this.url_, opt_feature);
|
||||
goog.asserts.assertString(url, 'url must be a string');
|
||||
goog.asserts.assert(url != '#', 'url must not be "#"');
|
||||
|
||||
var width;
|
||||
if (!goog.isNull(this.width_)) {
|
||||
width = ol.expression.evaluateFeature(this.width_, opt_feature);
|
||||
width = ol.expr.evaluateFeature(this.width_, opt_feature);
|
||||
goog.asserts.assertNumber(width, 'width must be a number');
|
||||
}
|
||||
|
||||
var height;
|
||||
if (!goog.isNull(this.height_)) {
|
||||
height = ol.expression.evaluateFeature(this.height_, opt_feature);
|
||||
height = ol.expr.evaluateFeature(this.height_, opt_feature);
|
||||
goog.asserts.assertNumber(height, 'height must be a number');
|
||||
}
|
||||
|
||||
var opacity = ol.expression.evaluateFeature(this.opacity_, opt_feature);
|
||||
var opacity = ol.expr.evaluateFeature(this.opacity_, opt_feature);
|
||||
goog.asserts.assertNumber(opacity, 'opacity must be a number');
|
||||
|
||||
var rotation = ol.expression.evaluateFeature(this.rotation_, opt_feature);
|
||||
var rotation = ol.expr.evaluateFeature(this.rotation_, opt_feature);
|
||||
goog.asserts.assertNumber(rotation, 'rotation must be a number');
|
||||
|
||||
return new ol.style.IconLiteral({
|
||||
|
||||
Reference in New Issue
Block a user