Merge branch 'master' into redraw

This commit is contained in:
Éric Lemoine
2012-01-04 09:06:29 +01:00
263 changed files with 757 additions and 564 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -104,7 +104,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
this.pane.style.height="100%";
if (OpenLayers.BROWSER_NAME == "msie") {
this.pane.style.background =
"url(" + OpenLayers.Util.getImagesLocation() + "blank.gif)";
"url(" + OpenLayers.Util.getImageLocation("blank.gif") + ")";
}
if (this.isFixed) {
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+37 -12
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -217,6 +217,12 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
* {Boolean} Whether the Vector Layer features have been drawn yet.
*/
drawn: false,
/**
* APIProperty: ratio
* {Float} This specifies the ratio of the size of the visiblity of the Vector Layer features to the size of the map.
*/
ratio: 1,
/**
* Constructor: OpenLayers.Layer.Vector
@@ -365,7 +371,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
displayError: function() {
if (this.reportError) {
OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",
{'renderers':this.renderers.join("\n")}));
{renderers: this. renderers.join('\n')}));
}
},
@@ -386,7 +392,11 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
this.map.removeLayer(this);
} else {
this.renderer.map = this.map;
this.renderer.setSize(this.map.getSize());
var newSize = this.map.getSize();
newSize.w = newSize.w * this.ratio;
newSize.h = newSize.h * this.ratio;
this.renderer.setSize(newSize);
}
},
@@ -435,7 +445,11 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
*/
onMapResize: function() {
OpenLayers.Layer.prototype.onMapResize.apply(this, arguments);
this.renderer.setSize(this.map.getSize());
var newSize = this.map.getSize();
newSize.w = newSize.w * this.ratio;
newSize.h = newSize.h * this.ratio;
this.renderer.setSize(newSize);
},
/**
@@ -463,14 +477,25 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
var coordSysUnchanged = true;
if (!dragging) {
this.renderer.root.style.visibility = "hidden";
this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
var extent = this.map.getExtent();
this.renderer.root.style.visibility = 'hidden';
var viewSize = this.map.getSize(),
viewWidth = viewSize.w,
viewHeight = viewSize.h,
offsetLeft = (viewWidth / 2 * this.ratio) - viewWidth / 2,
offsetTop = (viewHeight / 2 * this.ratio) - viewHeight / 2;
offsetLeft += parseInt(this.map.layerContainerDiv.style.left, 10);
offsetLeft = -Math.round(offsetLeft);
offsetTop += parseInt(this.map.layerContainerDiv.style.top, 10);
offsetTop = -Math.round(offsetTop);
this.div.style.left = offsetLeft + 'px';
this.div.style.top = offsetTop + 'px';
var extent = this.map.getExtent().scale(this.ratio);
coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);
this.renderer.root.style.visibility = "visible";
this.renderer.root.style.visibility = 'visible';
// Force a reflow on gecko based browsers to prevent jump/flicker.
// This seems to happen on only certain configurations; it was originally
@@ -995,4 +1020,4 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
},
CLASS_NAME: "OpenLayers.Layer.Vector"
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
@@ -96,7 +96,7 @@ OpenLayers.Layer.WorldWind = OpenLayers.Class(OpenLayers.Layer.Grid, {
Y: y
});
} else {
return OpenLayers.Util.getImagesLocation() + "blank.gif";
return OpenLayers.Util.getImageLocation("blank.gif");
}
},
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */