Hi,
I try to put the map page in an IFRAME. But there is always some offset between the rectangle and mouse click position.Of course there is no such error in JSP page.
What cause the problem? How can I make it be correct? Thanks in advance.
Alex.
The JSP page with IFRAME.
Map Show
Alex Chew ha scritto:
Hi,
I try to put the map page in an IFRAME. But there is always some offset between the rectangle and mouse click position.Of course there is no such error in JSP page.
By looking at the description at the page I don't even understand what
the page is supposed to do. Can you elaborate a bit more?
Cheers
Andrea
Hi,
There is always some offset between mouse click position and the rectangle.
I just followed the examples and make it embeded in a JSP page.
Does this caused by CSS with something like “position:relative;left:10px”?
The green rectangle is right one that should be drawn on screen.
But it failed in my application.
The red one has been drawn,which always take some x-direct offset.
How to make it work right?
Alex

Alex Chew ha scritto:
Hi,
There is always some offset between mouse click position and the rectangle.
I just followed the examples and make it embeded in a JSP page.
Does this caused by CSS with something like "position:relative;left:10px"?
The green rectangle is right one that should be drawn on screen.
But it failed in my application.
The red one has been drawn,which always take some x-direct offset.
How to make it work right?
I have no idea frankly... this is a javascript question, better suited for MapBuilder or OL mailing lists. Geoserver provides only the server
side, we have not much expertise on the client side.
Cheers
Andrea
Hi,
I also experienced this with OpenLayers, and RichFaces (run from within JBoss). The problem was that the map was being attached to the incorrect div that had a small unselectable area around the outside (roughly 10 pixels), to fix it i had to create a specific div and attach the map to that.
I am not to sure how to do this with MapBuilder, have you viewed the source of the page to see if everything is ok ?
Cheers,
Andy
On 17/07/07, Andrea Aime <aaime@anonymised.com> wrote:
Alex Chew ha scritto:
Hi,
There is always some offset between mouse click position and the rectangle.
I just followed the examples and make it embeded in a JSP page.
Does this caused by CSS with something like “position:relative;left:10px”?
The green rectangle is right one that should be drawn on screen.
But it failed in my application.
The red one has been drawn,which always take some x-direct offset.
How to make it work right?
I have no idea frankly… this is a javascript question, better suited
for MapBuilder or OL mailing lists. Geoserver provides only the server
side, we have not much expertise on the client side.
Cheers
Andrea
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Thanks,Andy
I got the bug.
It seems that the div with map attachs can not use style render like “position:relative;align:center”.
It worked well when I remove the style attribute.
May be relative postion make some faults to mapbuilder.
Sincerely,
Alex