[OpenLayers-Users] Rotation in style causes error
Chris Foulston
chris at onebrightspace.com
Fri Apr 8 11:08:34 EDT 2011
Hi all,
I'm using a style with a rotation as my hover effect for features on my map but am having some problems with IE7.
If I do not declare a rotation in my default style IE errors when the hover ends after rotating the pin. Therefore I put a "rotation: 0" in the default style which fixes this issue. Now unfortunately my other geometries (lines, polygons) error with any mention of rotation. I thought rotation was only meant to affect points but this does not seem to be the case with IE7. Any ideas to get round this and still use rotation.
To get around this I was going to write a style rule based on the features geometry type but after looking at various tickets I'm not sure this is possible?
Here's my offending code - any suggestions much appreciated.
new OpenLayers.StyleMap({
"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
externalGraphic: "/resources/images/icons/${icon}.png",
graphicWidth: 26,
graphicHeight: 32,
graphicOpacity: 1,
graphicXOffset: -13,
graphicYOffset: -32,
fillColor: "#6CD0C7",
strokeColor: "#264396",
strokeWidth: 3,
rotation: 0
}, OpenLayers.Feature.Vector.style["default"])),
"select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
rotation: 10
}, OpenLayers.Feature.Vector.style["select"]))
});
Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110408/bbbdeae5/attachment.html
More information about the Users
mailing list