javascript rectangle co-ordinates
Solomon Maina Thuo
solo6259 at YAHOO.COM
Sun Jan 30 22:07:40 PST 2005
hi
i am having problems getting the correct co-ordinates of the selected
rectangle. I am selecting a rectangle on the map using javascript
rubberbanding, something equivalent to the jbox rubberbanding functionality.
after the user selecting the area of interest( i.e dragging the mouse of a
given rectangle), i get the coordinates using javascript and then use them
in my php/mapscript code to call the queryByRect method. The problem arises
since the results returned differ from the the initial selected
rectangle.the rectangle is translated to a different location. i understand
javascript is using client.x and client.y coordinates of the browser but
somehow mapserver reference point( i.e 0,0) point is the top right corner
of the map image. i know someone out there has solved such a problem and i
will very happy for any help.
regards solomon
More information about the MapServer-users
mailing list