mapserver Redraw/Refresh problems

Robert Chavez rchavez at perseus.tufts.edu
Tue Nov 16 08:11:59 EST 1999


I have a template file that allows users to add layers to a map view, to
make the layer visible in the map view I put a simple redraw/refresh
button in the map view:

<input type="submit" value="refresh">

All the map extents, layer info, and other values that mapserver has
embedded in the template should get sent back and the map should redraw
with the same extent view, but with new layers added.

Unfortunately it doesn't work.  The layers get added, but strangely, the
map view jumps back the original state of the map when it is first
initialized (imgext=-31.265800+-38.940385+89.902700+82.059685) but the
imgext info is completely off in the CGI call.

Here's what gets sent:

http://../cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F
ancient.map&imgext=-38.446905+-19.245048+82.721595+101.755022&mode=browse&zoom=10&img.x=299&img.y=318

Here's what I get back:

http://psyche.perseus.tufts.edu/cgi-bin/mapserv2?map=%2Fhome%2Frchavez%2Fwww%2Fweb%2Fdocs%2Fmapdemo%2F
ancient.map&imgext=15.977778+31.467920+28.094628+43.567927&mode=browse&refresh=refresh&layer=BodiesOfWater&zoom=10

Here's the extent I'm actually seeing in the map view:
imgext=-31.265800+-38.940385+89.902700+82.059685

Oddly enough, if I hardcode a CGI call to refresh the map in the map
template,

../cgi-bin/mapserv2?map=[map]&mapext=[minx]+[miny]+[maxx]+[maxy]..

everything works fine, but the new layer(s) won't be displayed, of course.

I thought the problem might be related to the extents in my map file, but
they check out OK with shpdmp.  I also thought the problem might be due to
the fact that I'm my data is unprojected (Decimal Degrees) and I'm using
DD as map units, but I tried this with projected data and meters units and
got the same results.  I can't figure out what I'm overlooking.  Any
ideas?  (I'm using mapserver 3.2.21)

Thanks
Robert Chavez
Programmer
Perseus Project
rchavez at perseus.tufts.edu




More information about the mapserver-users mailing list