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

Steve Lime steve.lime at dnr.state.mn.us
Mon Jun 9 12:15:01 EDT 2003


If you're really only using a single feature then try setting ??? to
[map_extras_feature_points]. Remember, anything passed in can be gotten
out. If you have multiple features then it's a bigger deal and you'd
probably need to use a bit of javascript and a submit form handler to
make it work.

Steve

Stephen Lime
Data & Applications Manager

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

>>> AMC Story <s9646183 at sms.ed.ac.uk> 06/09/03 10:06AM >>>
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

_______________________________________________
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