[Mapserver-users] Problem setting up direct URLs when using MapScript

Lowell Filak lfilak at medinaco.org
Tue Jul 22 10:44:39 EDT 2003


What does the "<img src=..." part of the returned page look like?
Lowell

The following message was sent by AMC Story <s9646183 at sms.ed.ac.uk> on
Tue, 22 Jul 2003 15:03:48 +0100 (BST).

> Hi there,
> 
> My problem is that I've set up a user interface to my application
using perl 
> MapScript.  The script utilises a form that passes back variables such
as the 
> current map extents, previous map extents, mouse click locations,
modes (ie. 
> pan north, zoomin, previous extent etc), active layers and so on.  I
then use 
> MapScript to manipulate these variables, set the new extents and
active layers 
> accordingly and then redraw the map.  
> 
> So, the user is first presented with a screen that lists all the
features of 
> interest (i.e. all the point objects in my shapefile).  The user can
then click 
> on the url of each feature to go to the map interface page and see a
map that 
> is zoomed in to that point.  The user can also click on an image on
the opening 
> page which submits a form with the hidden variable "mode" set to
"full_extent", 
> so that they see the whole world map with all the features displayed.
> 
> The problem is, that when you click on the url (which looks like this...
> <a
href="http://file_path/script?lon=123.64&lat=-0.51&mode=each_feature">)
the 
> variables are passed and the script runs.  The script then works out
the extent 
> of the new map based on these variables and a new map should be
created with 
> this extent (ie the extents for $current_map are set to their zoomed
in values, 
> and then the $current_map->draw method draws the map).  However, to
see the 
> zoomed in map, you have to manually refresh the browser, or put in a
line to 
> the script which does this automatically for you.  Otherwise, the map
is drawn 
> as if the extent values haven't actually been changed from those in
the map 
> file.  Can anyone see why this might be the case?  I've printed out
the extents 
> of the map object just before it gets drawn, and they definately have
been 
> updated, but the map object that is drawn doesn't seem to reflect this..??
> 
> Sorry if this is a really long-winded e-mail ;)
> 
> Many thanks for any thoughts,
> Ali
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list