[mapserver-users] setting projection based on zoom

Stephen Lime steve.lime at dnr.state.mn.us
Tue Sep 25 16:26:01 EDT 2001


Here's why. The extent is projected when it is read from the CGI data, so it is 
converted using the existing projection information it has at that time. Setting
the projection afterwords has no effect but to screw things up. This is fixable.
Hannah, would you be so kind as to add this to bugzilla?

Thanks- Steve

Stephen Lime
Data & Applications Manager

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

>>> "Jensen, Hannah ERDC-CRREL-NH" <Hannah.Jensen at erdc.usace.army.mil> 09/25/01 03:09PM >>>
 
Proof that you should leave your desk once in awhile -- someone down the
hall saw my post and walked over to give me the answer.  Thanks, Joel!

Anyway, if mapext is specified in lat/long, it works properly.  Only caveat
is that the projection must be specified FIRST in the URL.  So this works:

http://myserver/cgi-bin/mapserv34g?mode=browse&map=..%2Fhtml%2Fusamap%2Ftige 
r.map&map_projection=proj=utm,zone=19&mapext=-78.12+40.14+-63.19+49.23

but this doesn't:

http://myserver/cgi-bin/mapserv34g?mode=browse&map=..%2Fhtml%2Fusamap%2Ftige 
r.map&mapext=-78.12+40.14+63.19+49.23&map_projection=proj=utm,zone=19

Strange but true...



-----Original Message-----
From: Jensen, Hannah ERDC-CRREL-NH
To: 'mapserver-users at lists.gis.umn.edu' 
Sent: 9/25/01 3:17 PM
Subject: [mapserver-users] setting projection based on zoom

 
Hi, all.  I would like to be able to change projections based on how far
the
user is zoomed in.  For example, if they start out looking at the US in
Lambert Azimuthal Equal Area but zoom in on Alaska, the map should
display
the zoomed in area in UTM zone 6.  I'm hoping to be able to do this with
CGI
variables, but maybe that's not possible.  If I pass in the projection
parameters and the map extent (in the new projection units) like so:

http://myserver/cgi-bin/mapserv34g?map=../html/usamap/tiger.map&mode=bro 
wse&
map_projection=proj=utm,zone=6&mapext=415087+7115646+546659+7214763

it works fine.  But since I don't know the map extent in the new
projection
before conversion, what variables should I pass to properly define the
map
extent?  Can I somehow tell it to calculate the new extent based on the
old
one?  Is there a better way to do this?  Thanks in advance for any
info/advice...



Cheers,
Hannah




More information about the mapserver-users mailing list