Export properties so libary can be used in compiled mode

This commit is contained in:
Tom Payne
2012-08-03 10:37:17 +02:00
parent 59398db62b
commit 0c35d50fed
2 changed files with 128 additions and 0 deletions

View File

@@ -57,6 +57,10 @@ goog.inherits(ol.Layer, ol.Object);
ol.Layer.prototype.getBrightness = function() { ol.Layer.prototype.getBrightness = function() {
return /** @type {number} */ this.get(ol.LayerProperty.BRIGHTNESS); return /** @type {number} */ this.get(ol.LayerProperty.BRIGHTNESS);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getBrightness',
ol.Layer.prototype.getBrightness);
/** /**
@@ -65,6 +69,11 @@ ol.Layer.prototype.getBrightness = function() {
ol.Layer.prototype.getContrast = function() { ol.Layer.prototype.getContrast = function() {
return /** @type {number} */ this.get(ol.LayerProperty.CONTRAST); return /** @type {number} */ this.get(ol.LayerProperty.CONTRAST);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getContrast',
ol.Layer.prototype.getContrast);
/** /**
@@ -73,6 +82,10 @@ ol.Layer.prototype.getContrast = function() {
ol.Layer.prototype.getHue = function() { ol.Layer.prototype.getHue = function() {
return /** @type {number} */ this.get(ol.LayerProperty.HUE); return /** @type {number} */ this.get(ol.LayerProperty.HUE);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getHue',
ol.Layer.prototype.getHue);
/** /**
@@ -81,6 +94,10 @@ ol.Layer.prototype.getHue = function() {
ol.Layer.prototype.getOpacity = function() { ol.Layer.prototype.getOpacity = function() {
return /** @type {number} */ this.get(ol.LayerProperty.OPACITY); return /** @type {number} */ this.get(ol.LayerProperty.OPACITY);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getOpacity',
ol.Layer.prototype.getOpacity);
/** /**
@@ -89,6 +106,10 @@ ol.Layer.prototype.getOpacity = function() {
ol.Layer.prototype.getSaturation = function() { ol.Layer.prototype.getSaturation = function() {
return /** @type {number} */ this.get(ol.LayerProperty.SATURATION); return /** @type {number} */ this.get(ol.LayerProperty.SATURATION);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getSaturation',
ol.Layer.prototype.getSaturation);
/** /**
@@ -105,6 +126,10 @@ ol.Layer.prototype.getStore = function() {
ol.Layer.prototype.getVisible = function() { ol.Layer.prototype.getVisible = function() {
return /** @type {boolean} */ this.get(ol.LayerProperty.VISIBLE); return /** @type {boolean} */ this.get(ol.LayerProperty.VISIBLE);
}; };
goog.exportProperty(
ol.Layer.prototype,
'getVisible',
ol.Layer.prototype.getVisible);
/** /**
@@ -124,6 +149,10 @@ ol.Layer.prototype.setBrightness = function(brightness) {
this.set(ol.LayerProperty.BRIGHTNESS, brightness); this.set(ol.LayerProperty.BRIGHTNESS, brightness);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setBrightness',
ol.Layer.prototype.setBrightness);
/** /**
@@ -135,6 +164,10 @@ ol.Layer.prototype.setContrast = function(contrast) {
this.set(ol.LayerProperty.CONTRAST, contrast); this.set(ol.LayerProperty.CONTRAST, contrast);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setContrast',
ol.Layer.prototype.setContrast);
/** /**
@@ -145,6 +178,10 @@ ol.Layer.prototype.setHue = function(hue) {
this.set(ol.LayerProperty.HUE, hue); this.set(ol.LayerProperty.HUE, hue);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setHue',
ol.Layer.prototype.setHue);
/** /**
@@ -156,6 +193,10 @@ ol.Layer.prototype.setOpacity = function(opacity) {
this.set(ol.LayerProperty.OPACITY, opacity); this.set(ol.LayerProperty.OPACITY, opacity);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setOpacity',
ol.Layer.prototype.setOpacity);
/** /**
@@ -167,6 +208,10 @@ ol.Layer.prototype.setSaturation = function(saturation) {
this.set(ol.LayerProperty.SATURATION, saturation); this.set(ol.LayerProperty.SATURATION, saturation);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setSaturation',
ol.Layer.prototype.setSaturation);
/** /**
@@ -178,3 +223,7 @@ ol.Layer.prototype.setVisible = function(visible) {
this.set(ol.LayerProperty.VISIBLE, visible); this.set(ol.LayerProperty.VISIBLE, visible);
} }
}; };
goog.exportProperty(
ol.Layer.prototype,
'setVisible',
ol.Layer.prototype.setVisible);

View File

@@ -330,6 +330,10 @@ ol.Map.prototype.getBackgroundColor = function() {
return /** @type {ol.Color|undefined} */ ( return /** @type {ol.Color|undefined} */ (
this.get(ol.MapProperty.BACKGROUND_COLOR)); this.get(ol.MapProperty.BACKGROUND_COLOR));
}; };
goog.exportProperty(
ol.Map.prototype,
'getBackgroundColor',
ol.Map.prototype.getBackgroundColor);
/** /**
@@ -338,6 +342,10 @@ ol.Map.prototype.getBackgroundColor = function() {
ol.Map.prototype.getCenter = function() { ol.Map.prototype.getCenter = function() {
return /** @type {ol.Coordinate} */ this.get(ol.MapProperty.CENTER); return /** @type {ol.Coordinate} */ this.get(ol.MapProperty.CENTER);
}; };
goog.exportProperty(
ol.Map.prototype,
'getCenter',
ol.Map.prototype.getCenter);
/** /**
@@ -346,6 +354,10 @@ ol.Map.prototype.getCenter = function() {
ol.Map.prototype.getControls = function() { ol.Map.prototype.getControls = function() {
return /** @type {ol.Collection} */ this.get(ol.MapProperty.CONTROLS); return /** @type {ol.Collection} */ this.get(ol.MapProperty.CONTROLS);
}; };
goog.exportProperty(
ol.Map.prototype,
'getControls',
ol.Map.prototype.getControls);
/** /**
@@ -426,6 +438,10 @@ ol.Map.prototype.getPixelFromCoordinate = function(coordinate) {
ol.Map.prototype.getProjection = function() { ol.Map.prototype.getProjection = function() {
return /** @type {ol.Projection} */ this.get(ol.MapProperty.PROJECTION); return /** @type {ol.Projection} */ this.get(ol.MapProperty.PROJECTION);
}; };
goog.exportProperty(
ol.Map.prototype,
'getProjection',
ol.Map.prototype.getProjection);
/** /**
@@ -434,6 +450,10 @@ ol.Map.prototype.getProjection = function() {
ol.Map.prototype.getResolution = function() { ol.Map.prototype.getResolution = function() {
return /** @type {number} */ this.get(ol.MapProperty.RESOLUTION); return /** @type {number} */ this.get(ol.MapProperty.RESOLUTION);
}; };
goog.exportProperty(
ol.Map.prototype,
'getResolution',
ol.Map.prototype.getResolution);
/** /**
@@ -483,6 +503,10 @@ ol.Map.prototype.getRotatedExtent = function() {
ol.Map.prototype.getRotation = function() { ol.Map.prototype.getRotation = function() {
return /** @type {number|undefined} */ this.get(ol.MapProperty.ROTATION); return /** @type {number|undefined} */ this.get(ol.MapProperty.ROTATION);
}; };
goog.exportProperty(
ol.Map.prototype,
'getRotation',
ol.Map.prototype.getRotation);
/** /**
@@ -491,6 +515,10 @@ ol.Map.prototype.getRotation = function() {
ol.Map.prototype.getSize = function() { ol.Map.prototype.getSize = function() {
return /** @type {ol.Size|undefined} */ this.get(ol.MapProperty.SIZE); return /** @type {ol.Size|undefined} */ this.get(ol.MapProperty.SIZE);
}; };
goog.exportProperty(
ol.Map.prototype,
'getSize',
ol.Map.prototype.getSize);
/** /**
@@ -528,11 +556,16 @@ ol.Map.prototype.getUserExtent = function() {
/** /**
* @export
* @return {ol.Projection|undefined} Projection. * @return {ol.Projection|undefined} Projection.
*/ */
ol.Map.prototype.getUserProjection = function() { ol.Map.prototype.getUserProjection = function() {
return /** @type {ol.Projection} */ this.get(ol.MapProperty.USER_PROJECTION); return /** @type {ol.Projection} */ this.get(ol.MapProperty.USER_PROJECTION);
}; };
goog.exportProperty(
ol.Map.prototype,
'getUserProjection',
ol.Map.prototype.getUserProjection);
/** /**
@@ -759,6 +792,10 @@ ol.Map.prototype.removeLayerRenderer = function(layer) {
ol.Map.prototype.setBackgroundColor = function(backgroundColor) { ol.Map.prototype.setBackgroundColor = function(backgroundColor) {
this.set(ol.MapProperty.BACKGROUND_COLOR, backgroundColor); this.set(ol.MapProperty.BACKGROUND_COLOR, backgroundColor);
}; };
goog.exportProperty(
ol.Map.prototype,
'setBackgroundColor',
ol.Map.prototype.setBackgroundColor);
/** /**
@@ -767,6 +804,10 @@ ol.Map.prototype.setBackgroundColor = function(backgroundColor) {
ol.Map.prototype.setCenter = function(center) { ol.Map.prototype.setCenter = function(center) {
this.set(ol.MapProperty.CENTER, center); this.set(ol.MapProperty.CENTER, center);
}; };
goog.exportProperty(
ol.Map.prototype,
'setCenter',
ol.Map.prototype.setCenter);
/** /**
@@ -775,6 +816,10 @@ ol.Map.prototype.setCenter = function(center) {
ol.Map.prototype.setControls = function(controls) { ol.Map.prototype.setControls = function(controls) {
this.set(ol.MapProperty.CONTROLS, controls); this.set(ol.MapProperty.CONTROLS, controls);
}; };
goog.exportProperty(
ol.Map.prototype,
'setControls',
ol.Map.prototype.setControls);
/** /**
@@ -790,27 +835,42 @@ ol.Map.prototype.setLayerRenderer = function(layer, layerRenderer) {
/** /**
* @export
* @param {ol.Collection} layers Layers. * @param {ol.Collection} layers Layers.
*/ */
ol.Map.prototype.setLayers = function(layers) { ol.Map.prototype.setLayers = function(layers) {
this.set(ol.MapProperty.LAYERS, layers); this.set(ol.MapProperty.LAYERS, layers);
}; };
goog.exportProperty(
ol.Map.prototype,
'setLayers',
ol.Map.prototype.setLayers);
/** /**
* @export
* @param {number|undefined} resolution Resolution. * @param {number|undefined} resolution Resolution.
*/ */
ol.Map.prototype.setResolution = function(resolution) { ol.Map.prototype.setResolution = function(resolution) {
this.set(ol.MapProperty.RESOLUTION, resolution); this.set(ol.MapProperty.RESOLUTION, resolution);
}; };
goog.exportProperty(
ol.Map.prototype,
'setResolution',
ol.Map.prototype.setResolution);
/** /**
* @export
* @param {number|undefined} rotation Rotation. * @param {number|undefined} rotation Rotation.
*/ */
ol.Map.prototype.setRotation = function(rotation) { ol.Map.prototype.setRotation = function(rotation) {
this.set(ol.MapProperty.ROTATION, rotation); this.set(ol.MapProperty.ROTATION, rotation);
}; };
goog.exportProperty(
ol.Map.prototype,
'setRotation',
ol.Map.prototype.setRotation);
/** /**
@@ -822,30 +882,49 @@ ol.Map.prototype.setSize = function(size) {
this.set(ol.MapProperty.SIZE, size); this.set(ol.MapProperty.SIZE, size);
} }
}; };
goog.exportProperty(
ol.Map.prototype,
'setSize',
ol.Map.prototype.setSize);
/** /**
* @export
* @param {ol.Projection} projection Projection. * @param {ol.Projection} projection Projection.
*/ */
ol.Map.prototype.setProjection = function(projection) { ol.Map.prototype.setProjection = function(projection) {
this.set(ol.MapProperty.PROJECTION, projection); this.set(ol.MapProperty.PROJECTION, projection);
}; };
goog.exportProperty(
ol.Map.prototype,
'setProjection',
ol.Map.prototype.setProjection);
/** /**
* @export
* @param {ol.Coordinate} userCenter Center in user projection. * @param {ol.Coordinate} userCenter Center in user projection.
*/ */
ol.Map.prototype.setUserCenter = function(userCenter) { ol.Map.prototype.setUserCenter = function(userCenter) {
this.setCenter(this.userToMapTransform_(userCenter)); this.setCenter(this.userToMapTransform_(userCenter));
}; };
goog.exportProperty(
ol.Map.prototype,
'setUserCenter',
ol.Map.prototype.setUserCenter);
/** /**
* @export
* @param {ol.Projection} userProjection User projection. * @param {ol.Projection} userProjection User projection.
*/ */
ol.Map.prototype.setUserProjection = function(userProjection) { ol.Map.prototype.setUserProjection = function(userProjection) {
this.set(ol.MapProperty.USER_PROJECTION, userProjection); this.set(ol.MapProperty.USER_PROJECTION, userProjection);
}; };
goog.exportProperty(
ol.Map.prototype,
'setUserProjection',
ol.Map.prototype.setUserProjection);
/** /**