[mapserver-users] setting projection based on zoom

Jensen, Hannah ERDC-CRREL-NH Hannah.Jensen at erdc.usace.army.mil
Tue Sep 25 16:09:53 EDT 2001


 
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