[OpenLayers-Users] Layer Query with Mapserver: How to do?

Arnd Wippermann arnd.wippermann at web.de
Thu Nov 20 15:58:18 EST 2008


You have to use other parameters to request MapServer directly

This is a sample request for mode=nquery (returns all matching results)

http://.../mapserv.exe?map=test.map
&mode=nquery
&map_imagetype=png
&map_projection=init=EPSG:31466
&mapext=2567281.013792286+5671394.760157772+2592808.0000077137+5690127.25004
2227
&map_size=804+590
&program=/mapserver/scripts/mapserv.exe
&map_web_imagepath=/temp/
&map_web_imgtmp=/temp/
&imgext=2567281.013792286+5671394.760157772+2592808.0000077137+5690127.25004
2227
&imgxy=398+296
&img.x=398
&img.y=296
&layers=LAYER1+LAYER2

Look here to get a list of the possible MapServer CGI parameters:

http://mapserver.gis.umn.edu/docs/reference/cgi/controls

Arnd Wippermann
 

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von mpettis
Gesendet: Donnerstag, 20. November 2008 16:51
An: users at openlayers.org
Betreff: Re: [OpenLayers-Users] Layer Query with Mapserver: How to do?


I'm going to rephrase this question with a simpler example, as I think it
will be more apparent.

I have a .shp of all 50 states, and the .dbf file contains the names.  I'm
serving this up through a Mapserver Layer in OpenLayers (where I have a
single tile and I can pan and zoom, and have a projection of epsg:26915 --
my particular projection, I know I wouldn't use this for a map of the whole
US).  What I want to do is, when I single click on a state, I want to
populate a div tag with the name of the state in which I clicked (or better
yet, a pop-up with the name of the state from the .dbf data).  I saw an
example of how to do this with WMS, but I can't seem to translate this into
a mapserver layer-type request.

Any help is appreciated.

Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Layer-Query-with-Mapserver%3A-How-to-do--tp20594503p20
604237.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list