multiple query templates

Stephen Lime steve.lime at dnr.state.mn.us
Mon Jul 24 11:06:58 EDT 2000


It's not possible at the map file layer. However (there's always an however) you can
deal with it using Javascript in the template(s). Consider this javascript code:

var mode = '[mode]';

if(mode == 'query') {

  ...do something for a single result...

} else {

  ...do something for multiple results...

}

The url below contains templates that change their behavior depending on the number
of results found which is probably what you really want.

http://terrasip.gis.umn.edu/cgi-bin/mapserv?map=/terrasipProjects/tutorial/example5.map&layer=state_parks&layer=counties&layer=lakes

Steve

Stephen Lime
Internet Applications Analyst

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

>>> <Robin.Ellis at dnr.qld.gov.au> 07/20/00 09:24PM >>>
I want to be able to specify different query templates for a single layer
based on query type (eg 'query' vs 'nquery'). Has anybody thought of a way
to do this?

Thanks

Rob


Robin Ellis
Land Resources Officer
Department of Natural Resources
Burnett District
ph: 07 4153 7843
fax: 07 4153 7823
Robin.Ellis at dnr.qld.gov.au 



************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.

Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  

If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
************************************************************************




More information about the mapserver-users mailing list