[OpenLayers-Users] SelectFeature when using IE<9 or IE9 Compatibility View

Peter Peterse peter at peterse-uithuizen.com
Mon Feb 6 06:36:52 EST 2012


Hello Andreas,


> *Background*
>
> We have an implementation where the user is able to add features to a
> vector
> layer using the DrawFeature control. Basically all feature types are
> allowed
> but mainly the Point-feature is drawn. We have abstracted a new feature
> that
> we call /Flag/ which basically is a Point but we style it using StyleMap
> and
> unique value rules. For a flag we typically change the following
> attributes
> to display a flag-like feature (which also is movable through the
> ModifyFeature-control):
>
>
> externalGraphic: '${c_externalGraphic}'
>
> graphicWidth: '${c_graphicWidth}',
>
> graphicHeight: '${c_graphicHeight}',
>
> graphicOpacity: '${c_graphicOpacity}',
>
> graphicXOffset: '${c_graphicXOffset}',
>
> graphicYOffset: '${c_graphicYOffset}'
>
>
> *Problem*
>
> We use the SelectFeature-control to "onSelect" display a popup containing
> various information. Everything works great in IE9, FireFox and Chrome.
> However, /In IE9 Compatibility View/ or older versions, the 'Flag'-feature
> (i.e. styled Point) can't be selected properly. It looks like the
> image-element is "on top" of the selectable area. If lucky, there's maybe
> one or two pixels outside of the image, i.e. externalGraphic that is
> "selectable" but i guess this depends on the size of the externalGraphic.
>
> Any ideas on how to solve this annoying problem?

Last week I found (I guess) the same problem. I couldn't drag my images in
IE7 and IE8. It looks like that the problem was create by the Snapping
control. After I disabled the Snapping function I can drag my images
again.

Regards,
Peter Peterse



More information about the Users mailing list