[mapserver-users] Query feature using openlayers and mapserver
Aypes
apestgas at yahoo.com.hk
Mon Nov 2 17:49:35 PST 2009
I have solved the problem. There is the function code in my html:
map.events.register('click', map, function (e) {
var url = "http://localhost/cgi-bin/mapserv.exe"
+ "?map=map/file/directory.map"
+ "&REQUEST=GetFeatureInfo"
+ "&VERSION=1.1.1"
+ "&EXCEPTIONS=application/vnd.ogc.se_xml"
+ "&BBOX="
+ map.getExtent().toBBOX()
+ "&X=" + e.xy.x
+ "&Y=" + e.xy.y
+ "&INFO_FORMAT=text/html"
+ "&QUERY_LAYERS=querylayer"
+ "&LAYERS=querylayer"
+ "&FEATURE_COUNT=1"
+ "&SRS=EPSG:4269"
+ "&STYLES="
+ "&WIDTH=" + map.size.w
+ "&HEIGHT=" + map.size.h;
window.open(url,
"getfeatureinfo",
"location=0,status=0,scrollbars=1,width=600,height=400"
);
But if I turn off the layer, I click on the map, a new window still come
out. That is not the problem. The problem is the turned off layer can still
be queried. I want that the turned off layer is not queryable.
New window can still come out without any information. Please give me a
hand.
Thanks,
Aypes
--
View this message in context: http://n2.nabble.com/Query-feature-using-openlayers-and-mapserver-tp3910093p3936077.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list