Ticket #817 (closed bug: duplicate)
IE "box model" - MousePosition with Border
| Reported by: | euzuro | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.6 Release |
| Component: | Control.MousePosition | Version: | 2.4 |
| Keywords: | Cc: | ||
| State: |
Description
As reported on the users list by cr5 and Gerd D.:
>
> Problem with "var pointLayer = new OpenLayers.Layer.Vector("Point
> Layer");" and similar (Line and Polygon): All draw controls seem to draw
> points and vertices south-east of where the mouse-click occurred by about
> 1/2 of the diameter of the drawn Point-Circle. That means all drawn features
> are miss-placed. Is this a bug or is it just that I do use the draw feature
> wrongly? Source attached below. The website is at this stage not public for
> administrative reasons; sorry.
Internet Explorer has problems with its 'box model': the 3px border
you're putting on your map is causing the browser to incorrectly report
your mouse position relative to the map. If you remove that border, this
will be fixed: you can instead create a slightly more complicated map
setup, with the map div inside another div which does have a border,
rather than putting it directly on a map.
The function to look into is OpenLayers.Events.getMousePosition().
Change History
Note: See
TracTickets for help on using
tickets.
