[Mapserver-users] Problem with inline features/persistence from a URL....?

AMC Story s9646183 at sms.ed.ac.uk
Mon Jun 9 11:06:06 EDT 2003


Hi everyone,

I've recently been experimenting with inline features as a way to draw 
additional point symbols on my maps.  What I would like to do is to have a text-
based front page, where users can click on a hyperlink and be taken to a map 
showing the feature and the area around it.  As the locations of these features 
will change dynamically, I want to be able to write a script that provides the 
initial URL's for all the links based on the current data.  What I really want 
to avoid is hardcoding these new features each in their own version of the 
template file.

An example URL would be:

<p align="left">The <a href="http://tsunami.geo.ed.ac.uk/local-bin/mapserver?
map=%2Fusr%2Flocal%2Fapache%2Flocal-bin%2Fs9646183%2Finterface%
2Fdemo_interactive.map&layer=labels&zoomsize=2&imgext=-4.000000+55.000000+-
2.000000+57.000000&map_extras_feature=new&map_extras_feature_points=-
3.000000+56.000000&program=%2Flocal-bin%2Fmapserver&map_web_imagepath=%2Fusr%
2Flocal%2Fapache%2Fhtdocs%2Ftmp%2F&map_web_imageurl=%2Ftmp%2F">Map</a></p>

However, the problem here is that as soon as the user interacts with the map 
(i.e. zooms in or out), the template file is called and this seems to delete 
the inline features specified in the original url.  Is there anyway to make 
this part of the url persistent?  For example, can a variable be set in the 
template file that is then somehow obtained from the original url?

Eg: in the template file:

<input type="hidden" name="map_extras_feature" value="new">
<input type="hidden" name="map_extras_feature_points" value="???">

Sorry if this is a daft question, but any suggestions would be gratefully 
received.

Many thanks again for your help.  Your previous suggestions have been real life-
savers :)

Ali




More information about the mapserver-users mailing list