truncatting in zoomsize/zoomdir

Stephen Lime steve.lime at dnr.state.mn.us
Wed Feb 7 13:19:25 PST 2001


Floating point numbers are impossible to deal with in the template setting. 
Integers are much more useful in that case. There's nothing stopping you
from not using the _check/_select replacement strings and using a little
bit of javascript to maintain state. You can also use a text box to enter
zoom values, works fine.

The +/- is easier to understand for most folks and is certainly more ammenable
to substitution. Internally the math is handled basically like you outline. The
zoomfactor is used for division so 2 halves and -2 => ½ multiplies.

Steve

Stephen Lime
Internet Applications Analyst

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

>>> Nicolau Werneck <nwerneck at yahoo.com.br> 02/07/01 03:03PM >>>
  Hello

  It seems to me that, while zooming with the zoom CGI
variable works allright, with a zoomsize/zoomdir pair
the value is being truncated to a non-floating point
type.

  Also, it seems to me that the
[zoomsize_<val>_to_<val>_{check|select}] template
atribute is not working properly, at least with
floating-point types...

  Have anybody else here tried to work with real zoom
values????


--Nicolau




PS: Hey! I would like to say something else too! :) 
To me, this idea of zoom=2 means duplicatting the
scale, while zoom=-2 means divide by two is higly
unmathematical! Couldn't we create something like a
macho-coeficient-zoom=0.5 for dividing the zoom by
two? To make negative values mean zooming back, we
could also implement an exponential zoom! exp2zoom=0
would mantain the aspect ratio, while 1 would
duplicate and -1 would divide by two...


________________________________________________________________________
O YAHOO! GEOCITIES CHEGOU AO BRASIL!
Crie sua home page com tudo em português - http://br.geocities.com




More information about the MapServer-users mailing list