(Closes #1084) Apply patch to set resolution and correctly scale width and height of SVG rectangles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5029 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -422,6 +422,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
*/
|
||||
drawRectangle: function(node, geometry) {
|
||||
// This needs to be reworked
|
||||
var resolution=this.getResolution();
|
||||
var x = (geometry.x / resolution + this.left);
|
||||
var y = (geometry.y / resolution - this.top);
|
||||
var draw = true;
|
||||
@@ -430,8 +431,8 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
if (draw) {
|
||||
node.setAttributeNS(null, "x", x);
|
||||
node.setAttributeNS(null, "y", y);
|
||||
node.setAttributeNS(null, "width", geometry.width);
|
||||
node.setAttributeNS(null, "height", geometry.height);
|
||||
node.setAttributeNS(null, "width", geometry.width / resolution);
|
||||
node.setAttributeNS(null, "height", geometry.height / resolution);
|
||||
} else {
|
||||
node.setAttributeNS(null, "x", "");
|
||||
node.setAttributeNS(null, "y", "");
|
||||
|
||||
Reference in New Issue
Block a user