Hi Nelson, put this 'wms_include_items' 'all' in the METADATA block for your layer. Mit freundlichen GrĂ¼ssen
Arnd Wippermann http://gis.ibbeck.de/ginfo/ _____ Von: UMN MapServer Users List [mailto:[EMAIL PROTECTED] Im Auftrag von nelson guda Gesendet: Freitag, 4. Januar 2008 22:59 An: MAPSERVER-USERS@LISTS.UMN.EDU Betreff: Re: [UMN_MAPSERVER-USERS] WFS request options Thanks Josh, I looked over the WMS GetFeatureInfo request, and this is exactly what I need. For some reason, though the only data I am getting back looks like this: GetFeatureInfo results: Layer 'ira_fill2' Feature 689: The feature number appears to correspond to the correct place in the dbf file, but none of the rest of the feature data is being returned. I don't understand. Does anyone have any ideas? thanks, nelson Here is the mapfile and request that I made: Request: http://thewildwoodstudios.com/cgi-bin/mapserv?map=../roadlessland/maps/ira.m ap <http://thewildwoodstudios.com/cgi-bin/mapserv?map=../roadlessland/maps/ira. map&REQUEST=GetFeatureInfo&SERVICE=WMS&reaspect=false&VERSION=1.1.1&LAYERS=i ra_fill2&STYLES=default&FORMAT=image/gif&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&S RS=EPSG:4326&WIDTH=256&HEIGHT=256&QUERY_LAYERS=ira_fill2&x=254&y=165&BBOX=-1 22.16796875,46.37725420510028,-122.080078125,46.4378568950242> &REQUEST=GetFeatureInfo&SERVICE=WMS&reaspect=false&VERSION=1.1.1&LAYERS=ira_ fill2&STYLES=default&FORMAT=image/gif&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS= EPSG:4326&WIDTH=256&HEIGHT=256&QUERY_LAYERS=ira_fill2&x=254&y=165&BBOX=-122. 16796875,46.37725420510028,-122.080078125,46.4378568950242 Mapfile: MAP NAME "Roadless" STATUS ON SIZE 800 600 STATUS ON EXTENT -124.40950012207 18.2457218170166 -65.7071533203125 49.0011405944824 IMAGETYPE PNG SHAPEPATH "../shapefiles" FONTSET ../fonts/fonts.txt PROJECTION "init=epsg:54004" END WEB IMAGEPATH "/tmp/" IMAGEURL "/tmp/" METADATA "wms_title" "ira_wms" "wms_onlineresource" "http://thewildwoodstudios.com/cgi-bin/mapserv?map=../roadlessland/maps/ira. map <http://thewildwoodstudios.com/cgi-bin/mapserv?map=../roadlessland/maps/ira. map&> &" "wms_srs" "EPSG:4326 EPSG:54004 EPSG:4269" END END LAYER NAME "ira_fill2" TYPE POLYGON METADATA "wms_title" "ira_fill2" "wms_srs" "EPSG:4326 EPSG:54004" END PROJECTION "init=epsg:4269" END DATA ira_by_name_nad83 STATUS ON TRANSPARENCY 75 LABELITEM "NAME" LABELMAXSCALE 1000000 TEMPLATE "query.html" TOLERANCE 3 TOLERANCEUNITS PIXELS DUMP TRUE CLASSITEM "ID" CLASS STYLE COLOR 0 255 0 END LABEL COLOR 0 0 0 OUTLINECOLOR 255 255 255 MINFEATURESIZE 40 TYPE TRUETYPE FONT arial-narrow-italic SIZE 8 ANTIALIAS TRUE POSITION cc PARTIALS FALSE MINDISTANCE 300 WRAP '/' END END END END On Jan 4, 2008, at 10:48 AM, Josh Livni wrote: Nelson, Using this method, you don't want to make a WFS request - you want to make a WMS request. The mapserver site has documentation on how to set up your mapfile to respond to WMS requests (http://mapserver.gis.umn.edu/docs/howto/wms_server) as well as the template (which can be very simple for your use case). There's a thread on the google groups list about using getFeatureInfo, but since the guy's WMS is down it's probably not the best example (though you could still look at his code). http://openlayers.org/dev/examples/getfeatureinfo.html is another example that you could probably start with for assistance on the client side -- you'd need to modify it to work with Google Maps (eg using Google's methods to get at their bbox and other criteria while creating the queryUrl, and to parse the result) but the concept is the same, so this should get you started. Also - glad to hear my old comments helped on the roadlessland site - it looks nice. Cheers, -Josh PS - Please be sure to CC the mapserver list if this doesn't make sense - others here may well have better ideas on how to help than me, and chances are if you want to know something, others may be in the same boat, and thus find the thread helpful. nelson guda wrote: Hi again, Josh, I just tried "DescribeFeatureType", which works but the response only give the names of the variables. Any idea on how to get the actual data about those variables? many thanks, nelson DescribeFeatureType response: <element name="ira" type="ms:iraType" substitutionGroup="gml:_Feature" /> <complexType name="iraType"> <complexContent> <extension base="gml:AbstractFeatureType"> <sequence> <element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0" maxOccurs="1"/> <element name="NAME" type="string"/> <element name="ID" type="string"/> </sequence> </extension> </complexContent> </complexType> On Jan 4, 2008, at 8:53 AM, Josh Livni wrote: This doesn't answer you question exactly, but have you considered using a WMS getFeatureInfo request instead? Then you can use a simple template.html to decide which attributes you want to return for later parsing. I've done this a few times myself with Google Maps. -Josh nelson guda wrote: Hi all, I have an odd request regarding WFS capabilities. Is it possible to have a WFS mapserver request return gml results without the geometry data? I know that this seems odd, but it makes sense for what I am doing. I am using a WMS overlay to serve tiles for a large dataset to an overlay on google maps. In order to query specific polygons from that dataset (a shapefile), I am using a WFS GetFeature request. All I need is the id and other parameters of the feature, but not the geometry data (because it is already there from the WMS. Right now I am just parsing out the info I need from the gml at the server level, but it would be much faster if I could get the WFS to return only the feature info minus the geometry data. Is this possible? Thanks, and thanks for your previous help. nelson