[OpenLayers-Users] Another offset problem (follow-up on Bug? Zoom box offset when using large scales)

Barry Hunter barry at barryhunter.co.uk
Sun Aug 26 20:16:22 EDT 2007


Dito here. But only notice the problem on IE6. IE7, FF and Safari dont seem
affected. Basically the mouse pointer coordinates (using MousePosition) are
offset by the size of the margin. Removing the margin-left off the main
content div (which contains the map) stops the offset, (but of course breaks
the template!)

Heres the map:
http://www.geograph.org.uk/mapper/

removing

	margin:4px 10px 0px 170px;

from ".content2" in the css file fixes it.


Related:

Also having (had) a 10px border on the map div did also offset the
coordinates, but changing that to a background colour and 10px padding
sorted that. (cant remember which browsers but at least Firefox)

Do get the two pixel offset too in Safari and FF, that could be related to
the ticket. (hmm, could that be the 2px border on the content2 class? ....
Yes Confirmed removing the border removes that small offset; at least on
Firefox (as has easy CSS editing) ... so thats not going to be so easy to
fix...)

Cheers,

Barry

On 8/24/07, Tom (JDi Solutions) <tom.dean at jdi-solutions.co.uk> wrote:
>
> I too have noticed this problem and would be very interested in the
> resolution.
>
> cheers,
> Tom
>
> On 8/24/07, Barend Köbben < kobben at itc.nl> wrote:
> >
> > Hi,
> >
> > As a follow-up to my earlier report (see below), I am getting some other
> >
> > XY-coordinate problems that I suspect could be related:
> >
> > I am using X=evt.xy.x; Y = evt.xy.y for getting click-coordinates to
> > report
> > back to a GetFeautureInfo call to WMS. In IE7 on PC, Safari & Opera on
> > MacOSX this works fine. In FireFox on Mac & PC however, the X reported
> > back
> > if offset as soon as the body of the HTML is offset. In other words, if
> > the
> > map <div> is in a HTML <body> that has a margin-left=100px, evt.xy.x=101in
> > FireFox, and evt.xy.x=1 in all other browsers! Equally,  evt.xy.y is
> > affected by margin-top...
> >
> > My question is: is evt.xy.x a OpenLayers property, or a general
> > javaScript
> > one? In the latter case, I guess it's a FireFox bug. Any ideas on how to
> > get
> > around it...?
> >
> > Yours,
> > __
> > Barend Köbben
> > International Institute for Geo-information
> > Sciences and Earth Observation (ITC)
> > PO Box 6, 7500AA Enschede (The Netherlands)
> > ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
> >
> >
> > On 03-08-2007 14:50, "Christopher Schmidt" <crschmidt at metacarta.com>
> > wrote:
> >
> > > On Fri, Aug 03, 2007 at 12:26:57PM +0200, Barend K?bben wrote:
> > >> Hi ,
> > >>
> > >> I have data of a really large scale, it's almost 1:1 drawings of
> > >> archeological finds. They have been measured very precisely and
> > nicely
> > >> georef'd to a UTM projection and consist of maps of typically some
> > 15x15 to
> > >> 20x20 meters in size.
> > >> All works quite fine, but the large scale obviously gives some
> > problems,
> > >> that I consider a bug: The zoom box (SHIFT-Drag) does not appear were
> > the
> > >> actual mouse is moving. The effect varies according to the size of
> > the
> > >> screen and the browser (eg. on my 1024x768 Mac running Firefox it's
> > not as
> > >> bad as on a 1680x1050 PC using IE7, where it's really way off). I
> > have
> > >> experimented with all kinds of resolution and scale settings, but to
> > no
> > >> avail...
> > >
> > > This is almost definitely a bug in OpenLayers ... holy crap, you
> > weren't
> > > kidding. Something's totally broken there.
> > >
> > > Erik, can you file this as a blocker for 2.5?
> > >
> > > Thanks for the report, Barend. We'll look into this.
> > >
> > > -- Chris
> > >
> > >> Sciences and Earth Observation (ITC)
> > >> PO Box 6, 7500AA Enschede (The Netherlands)
> > >> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
> > >>
> > >>
> > >> _______________________________________________
> > >> Users mailing list
> > >> Users at openlayers.org
> > >> http://openlayers.org/mailman/listinfo/users
> > >>
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>


-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070827/f837802a/attachment.html


More information about the Users mailing list