Merge branch 'master' into bigbackbuffer

This commit is contained in:
Éric Lemoine
2011-10-28 21:26:59 +02:00
47 changed files with 240 additions and 247 deletions

View File

@@ -210,35 +210,6 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
}
},
/**
* Method: activate
* Activates the control.
*
* Returns:
* {Boolean} The control was effectively activated.
*/
activate: function () {
if (!this.active) {
this.handler.activate();
}
return OpenLayers.Control.prototype.activate.apply(
this, arguments
);
},
/**
* Method: deactivate
* Deactivates the control.
*
* Returns:
* {Boolean} The control was effectively deactivated.
*/
deactivate: function () {
return OpenLayers.Control.prototype.deactivate.apply(
this, arguments
);
},
/**
* Method: getInfoForClick
* Called on click

View File

@@ -267,7 +267,7 @@ OpenLayers.Format.Context = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,
keywords: context.keywords,
logo: context.logo,
descriptionURL: context.descriptionURL
}
};
options.metadata = metadata;

View File

@@ -297,7 +297,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
"Filter": function(filter) {
var node = this.createElementNSPlus("ogc:Filter");
if (filter.type === "FID") {
this.writeFeatureIdNodes(filter, node);
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, filter, node);
} else {
this.writeNode(this.getFilterType(filter), filter, node);
}
@@ -314,7 +314,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
childFilter = filter.filters[i];
if (childFilter.type === "FID") {
this.writeFeatureIdNodes(childFilter, node);
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node
@@ -329,7 +329,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
childFilter = filter.filters[i];
if (childFilter.type === "FID") {
this.writeFeatureIdNodes(childFilter, node);
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node
@@ -342,7 +342,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
var node = this.createElementNSPlus("ogc:Not");
var childFilter = filter.filters[0];
if (childFilter.type === "FID") {
this.writeFeatureIdNodes(childFilter, node);
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node

View File

@@ -429,7 +429,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
setFilterProperty: function(filter) {
if(filter.filters) {
for(var i=0, len=filter.filters.length; i<len; ++i) {
this.setFilterProperty(filter.filters[i]);
OpenLayers.Format.WFST.v1.prototype.setFilterProperty.call(this, filter.filters[i]);
}
} else {
if(filter instanceof OpenLayers.Filter.Spatial && !filter.property) {

View File

@@ -169,7 +169,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
}
}
if(options.filter) {
this.setFilterProperty(options.filter);
OpenLayers.Format.WFST.v1_1_0.prototype.setFilterProperty.call(this, options.filter);
this.writeNode("ogc:Filter", options.filter, node);
}
return node;

View File

@@ -112,6 +112,7 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
var layer = {
styles: [],
formats: [],
dimensions: [],
tileMatrixSetLinks: []
};
layer.layers = [];
@@ -218,7 +219,23 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
obj.serviceMetadataUrl = {};
obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
// TODO: other attributes of <ServiceMetadataURL> element
}
},
"LegendURL": function(node, obj) {
obj.legend = {};
obj.legend.href = node.getAttribute("xlink:href");
obj.legend.format = node.getAttribute("format");
},
"Dimension": function(node, obj) {
var dimension = {values: []};
this.readChildNodes(node, dimension);
obj.dimensions.push(dimension);
},
"Default": function(node, obj) {
obj["default"] = this.getChildValue(node);
},
"Value": function(node, obj) {
obj.values.push(this.getChildValue(node));
}
},
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
},

View File

@@ -242,6 +242,7 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, {
},
"wcs": OpenLayers.Format.WCSGetCoverage.prototype.writers.wcs,
"wfs": OpenLayers.Format.WFST.v1_1_0.prototype.writers.wfs,
"ogc": OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc,
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.writers.ows
},

View File

@@ -325,15 +325,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
/**
* Method: getServerResolution
* Return the server-supported resolution that is the closest to
* the resolution passed as a parameter. If no resolution is
* passed the map resolution is used.
* Return the closest highest server-supported resolution. Throw an
* exception if none is found in the serverResolutions array.
*
* Parameters:
* resolution - {Number} The base resolution.
* resolution - {Number} The base resolution. If undefined the
* map resolution is used.
*
* Returns:
* {Number} The closest server supported resolution.
* {Number} The closest highest server resolution value.
*/
getServerResolution: function(resolution) {
resolution = resolution || this.map.getResolution();

View File

@@ -299,11 +299,11 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIProperty: maxExtent
* {<OpenLayers.Bounds>} The maximum extent for the map. Defaults to the
* whole world in decimal degrees
* (-180, -90, 180, 90). Specify a different
* extent in the map options if you are not using a
* geographic projection and displaying the whole
* world.
* whole world in decimal degrees (-180, -90, 180, 90). Specify a
* different extent in the map options if you are not using a geographic
* projection and displaying the whole world. To restrict user panning
* and zooming of the map, use <restrictedExtent> instead. The value
* for <maxExtent> will change calculations for tile URLs.
*/
maxExtent: null,

View File

@@ -132,7 +132,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
this.translate(this.xOffset, 0);
return true;
} else {
inRange = this.translate(left - this.left + this.xOffset, top - this.top);
var inRange = this.translate(left - this.left + this.xOffset, top - this.top);
if (!inRange) {
// recenter the coordinate system
this.setExtent(extent, true);