Merge branch 'master' into osm

Conflicts:
	notes/2.12.md
This commit is contained in:
Éric Lemoine
2012-01-17 09:10:27 +01:00
17 changed files with 256 additions and 21 deletions
+4 -1
View File
@@ -24,7 +24,10 @@ OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
/**
* Supported event types:
* - *locationupdated* Triggered when browser return a new position
* - *locationupdated* Triggered when browser return a new position. Listeners will
* receive an object with a 'position' property which is the browser.geolocation.position
* native object, as well as a 'point' property which is the location transformed in the
* current map projection.
* - *locationfailed* Triggered when geolocation has failed
* - *locationuncapable* Triggered when control is activated on a browser
* which doesn't support geolocation
@@ -262,7 +262,9 @@ OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML,
dc_element[attrs[i].name] = attrs[i].nodeValue;
}
dc_element.value = this.getChildValue(node);
obj[name].push(dc_element);
if (dc_element.value != "") {
obj[name].push(dc_element);
}
}
},
"dct": {
+1 -1
View File
@@ -294,7 +294,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class(
var px = approx(point.x, digs);
var py = approx(point.y, digs);
function getX(y, x1, y1, x2, y2) {
return (((x1 - x2) * y) + ((x2 * y1) - (x1 * y2))) / (y1 - y2);
return (y - y2) * ((x2 - x1) / (y2 - y1)) + x2;
}
var numSeg = this.components.length - 1;
var start, end, x1, y1, x2, y2, cx, cy;
+15 -1
View File
@@ -265,6 +265,16 @@ OpenLayers.Layer = OpenLayers.Class({
* {Float}
*/
minResolution: null,
/**
* Property: resolution
* {Float} Current resolution that the layer is drawn in. This is
* used to determine whether the zoom has changed when calling
* <moveTo> from <redraw>. Subclasses may set this.resolution to
* null prior to calling redraw to force passing zoomChanged
* true to moveTo.
*/
resolution: null,
/**
* APIProperty: numZoomLevels
@@ -552,7 +562,8 @@ OpenLayers.Layer = OpenLayers.Class({
var extent = this.getExtent();
if (extent && this.inRange && this.visibility) {
var zoomChanged = true;
zoomChanged = this.resolution == null ||
this.resolution !== this.map.getResolution();
this.moveTo(extent, zoomChanged, false);
this.events.triggerEvent("moveend",
{"zoomChanged": zoomChanged});
@@ -577,6 +588,7 @@ OpenLayers.Layer = OpenLayers.Class({
display = display && this.inRange;
}
this.display(display);
this.resolution = this.map.getResolution();
},
/**
@@ -632,6 +644,8 @@ OpenLayers.Layer = OpenLayers.Class({
// deal with gutters
this.setTileSize();
this.resolution = null;
}
},
+2 -1
View File
@@ -120,6 +120,7 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, {
*/
mergeNewParams:function(newParams) {
this.params = OpenLayers.Util.extend(this.params, newParams);
this.resolution = null;
var ret = this.redraw();
if(this.map != null) {
this.map.events.triggerEvent("changelayer", {
@@ -144,7 +145,7 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, {
if (force) {
return this.mergeNewParams({"_olSalt": Math.random()});
} else {
return OpenLayers.Layer.prototype.redraw.apply(this, []);
return OpenLayers.Layer.prototype.redraw.call(this);
}
},
+2 -2
View File
@@ -9,8 +9,8 @@
*/
/**
* TODO: remove this dependency in 3.0
* @requires OpenLayers/Format/QueryStringFilter.js
* if application uses the query string, for example, for BBOX parameters,
* OpenLayers/Format/QueryStringFilter.js should be included in the build config file
*/
/**
+5
View File
@@ -9,6 +9,11 @@
* @requires OpenLayers/Format/GeoJSON.js
*/
/**
* if application uses the query string, for example, for BBOX parameters,
* OpenLayers/Format/QueryStringFilter.js should be included in the build config file
*/
/**
* Class: OpenLayers.Protocol.Script
* A basic Script protocol for vector layers. Create a new instance with the