No subject
Mon Oct 7 05:54:23 PDT 2024
extentFromScale(x, y, scale, width, height) {
cellsize =3D (scale/PixelsPerInch)/InchesPerMapUnit;
minx =3D x - cellsize*width/2.0;
miny =3D y - cellsize*height/2.0;
maxx =3D x + cellsize*width/2.0;
maxy =3D y + cellsize*height/2.0;
}
Now just plug the extent values into the main map extent (note scale is a =
value of, say, 50000).
For the CGI just initialize the application using mapxy and scale =
parameters and be done with it.
Steve
>>> Peter Kingsbury <peter.kingsbury at GMAIL.COM> 11/29/05 7:36 PM >>>
In my mapping application, I'd like to have a default scale to be used=20
when the page first loads.
I've attempted to set this in the map file (e.g. SCALE value in the =
root=20
object) as well as MAXSCALE, however it seems to default to a certain=20
aggravating value.
I've also tried twiddling with the map extents, however this just =
causes=20
the scale to bump up away from my target scale. :)
Any help is appreciated!
- P
More information about the MapServer-users
mailing list