[OpenLayers-Users] Rotation in style causes error
Chris Foulston
chris at onebrightspace.com
Fri Apr 8 16:00:32 EDT 2011
Andreas, thanks for your response, I'm using 2.10 - I'll give trunk a whirl an see if that fixes things. I did have a look in trac for such a bug but didn't find anything recent.
Chris
Sent from my iPhone
On 8 Apr 2011, at 19:03, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> What version of OpenLayers are you using? This issue should be fixed in trunk.
>
> Regards,
> Andreas.
>
>> On Apr 8, 2011 5:16 PM, "Chris Foulston" <chris at onebrightspace.com> wrote:
>>
>> 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
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110408/e422c222/attachment.html
More information about the Users
mailing list