[Mapserver-users] Changing inline features with CGI parameters

J. Delfos delfos18 at yahoo.com
Mon Feb 2 16:14:35 PST 2004


This may be a very simple (read: dumb) solution, but instead of using
map-server to display your error message of "no data to display", perhaps
you should use a DHTML solution, e.g.:

- a transparent DIV, on top of your map. You can change the text in a div
dynamically (using innerhtml), and turn off the div if not needed.
- when there's no layer, replace the DHTML image with your own image (and
do not resubmit your form).

This may not be what you're looking for, but it seems more straightforward
and flexible to do it this way.


regards,

Jacob


--- "Wim Blanken (PI)" <wim.blanken at planet.nl> wrote:
> Hello Jan,
> 
> Possible solutions......
> 
> -Did you specify the TYPE of the Layer?
> -I use TRANSFORM OFF (and not False).
> 
> So......
> 
> TYPE  annotation
> TRANSFORM OFF
> 
> If this is no solution, could you specify a more complete mapfile?
> 
> Regards,
> 
> Wim Blanken
> Geon bv
> The Netherlands
> 
> ----- Original Message -----
> From: "Jan Hartmann" <jhart at frw.uva.nl>
> To: "'mapserver list'" <mapserver-users at lists.gis.umn.edu>
> Sent: Monday, February 02, 2004 2:57 PM
> Subject: [Mapserver-users] Changing inline features with CGI parameters
> 
> 
> > Hi Steve and list,
> >
> > I'm trying to use a feature object for error messages. My mapfile
> looks
> > like this:
> >
> > map
> >
> > layer
> >    ..
> > end
> >
> > layer
> >    ..
> > end
> >
> > layer
> >    transform false
> >    feature
> >      text "No data for this map
> >      points 10 10 end
> >    end
> >    class
> >       color  255 0 0
> >       ...
> >     end
> > end
> >
> > Layers ar selected with expressions from the URL, and if no data are
> > found, every layer but the last is turned off and the error message is
> > displayed. Works fine. However, I want to be able to change the
> > feature's text and position from the URL. The CGI Reference shows how
> to
> > do this by creating a new feature from the URL:
> >
> >
>
...&map_webuser_feature=new&map_webuser_feature_points=12345.6789+12345.6789
> &map_webuser_feature_text=My+House!&..
> >
> > This only works when *no* feature is defined in the MapFile, else
> > nothing is shown. When omitting "feature=new" MapServer segfaults.
> >
> > AFAICS existing features are not accessible from the URL. Is this by
> > design, or can something be done about it? I am thinking of an
> > application with lots of default error messages that can be toggled on
> > and off individually in different positions. It would be easier to do
> > this with predefined (and named) feature objects. I can live with the
> > present situation though.
> >
> > Jan
> >
> >
> >
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/



More information about the MapServer-users mailing list