Zoom help

Stephen Lime steve.lime at dnr.state.mn.us
Wed Mar 15 12:04:12 PST 2000


The error message is a tad deceiving in that the word "Reference" should
not be there. It should read "Image map coordinate...".

Any way MapServer defines MAXCLICK and MINCLICK vars to detect 
potentially bogus input. These values are set to 1000 and -1000 right now.
With very large images or simulated pans using imgxy you could find them
too small. They can be bumped by editing mapserv.h. Your error means 
the values for imgxy your sending exceed those limits. Either your using large
images or some code is wrong.

(Note that were talking about image coordinates, and not map coordinates.
They represent a raw mouse click but can be set by an application to achieve
pan effects.)

As for zooms, let's see:

 using a user "click" (imgxy/img.x/img.y) you can use
   - zoom 
   - zoomdir and zoomsize
   
or you can use a user "box"

of you can use a user reference map click (ref.x/ref.y), but this is pan only

(if you've got map coordinates you can create maps with an extent, a point and
a distance, or a point and a scale factor)

In terms of precedence: imgbox, then img.x/img.y and finally imgxy. If the imgbox
resolves to a point it is not used and another method is found. Note that img.x and
img.y are set ONLY if the user clicks in a form <input type="image"...> element.

As for zoom controls pick one and stick with it. There is no precedence so mixing
them will yield unpredictable results.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "An Tay Nguy" <anguy at geoanalytic.com> 03/15/00 11:02AM >>>
Hi everyone,

I am a newbie to the world of MapServer.

My system is:
NT 4.0 using IIS.
MapServer 3.3006

In my html code, I have a java applet that set the variable
imgxy(mouseclick), imgbox(the area of zoom in pixel) and submit the map
request.
The applet also set the zoom variable( 3-zoom in| 0-query/pan| -3-for zoom
out ).
The result of the zoom sometimes works and sometimes I get this error
message:

"loadForm(): Web application error. Reference map coordinate out of range."

Does anyone know what this message means?


Furthermore, There seems to be 3 ways to perform zooming:

1) zoomdir/zoomsize
2) zoom ( x > 0 - zoom in | 0 > x - zoom out | x = 0 - pan/query )
3) imgbox( x1 y1 x2 y2 )

a) Are there more than these three methods?
b) If these three methods were being used in the same HTML,
   which of these have more priority over the other?

Thanks in advance for your help.

Cheers!





More information about the MapServer-users mailing list