HI David,<br> <br>>> http://openlayers.org/dev/examples/getfeatureinfo.html<br><br> I saw that example, thanx. For the last few days, however, I always get pink images on that page (are the pink images due to what I´ll report below??). <br><br>I checked that the GetFeatureInfo url works in my browser, so MapServer is working fine. I can´t get the info displayed due to an AJAX error :<br><br><span class="objectBox objectBox-errorMessage hasBreakSwitch">Access to restricted URI denied" code: "1012<br><br>Going as deep as I can with Firebug I noticed that error too :<br><br></span><span class="objectBox objectBox-errorMessage opened">Permission refusée d'appeler la méthode Location.toString (Permission to call Location.toString denied)<br><br>Googling around, I saw this bug report : http://code.google.com/p/fbug/issues/detail?id=692<br><br>I´m on a windows virtual box with FF3. <br><br>IE7 gives a sequence of 2 errors :<br><br>Invalid
character<br>Access is denied<br><br>Thanx for your pointers. I guess I´m in JS quicksand :-)<br><br>Yves<br></span><br><br><b><i>percy <percyd@pdx.edu></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> here's an example from your openlayers download, modify your version to <br>point to your server, etc<br><br><br><br><br>there's a nice "cookbook" for serving WMS data on the OneGeology website:<br>http://www.onegeology.org/misc/downloads.html<br><br>and here's a relevant section from one of my mapfiles below. It should <br>work just fine with a postgis connection instead of shapefile, as I am using<br>HTH,<br>Percy<br><br>------------mapfile stuff-------------<br>LAYER<br> NAME "Geologic_Map_Of_North_America"<br> TYPE polygon<br> STATUS On<br> data GMNA_South_Union_wgs84<br> TOLERANCE 0<br> TOLERANCEUNITS pixels<br> TRANSFORM TRUE<br> DUMP TRUE<br><br>
HEADER "templates/GMNA_query_header.html"<br> TEMPLATE "templates/GMNA_query_body.html"<br> FOOTER "templates/GMNA_query_footer.html"<br><br>Metadata<br>"WMS_TITLE" "Geologic Map Of North America"<br>"WMS_SRS" "epsg:4326"<br> GML_INCLUDE_ITEMS <br>"DisplayNam,OneGeology,Lithologic,GeologicAg,AgeMin,AgeMax,AgeMetadat"<br> WMS_INCLUDE_ITEMS <br>"DisplayNam,OneGeology,Lithologic,GeologicAg,AgeMin,AgeMax,AgeMetadat"<br><br>END # metadata<br>END #layer<br>-------------------end of mapfile stuff-----------<br><br>Yves Moisan wrote:<br>> Hi All,<br>> <br>> Audience of this message : users of MapServer (WMS).<br>> <br>> I'm trying to find examples of how to retrieve attributes from a postgis<br>> table served via MapServer WMS. I have my points in OL, now I want and<br>> "info" on them. I understand I have to enable the layer to be queryable<br>> in my mapfile. So I googled and found a top level directive (QUERY \n<br>> STATUS ON),
but that was found to be an offending command. I also found<br>> a bunch of other directives, so my mapfile now looks like this : <br>> <br>> METADATA<br>> # OGC:WMS specific tags<br>> "ows_title" "Resettlement Sites" <br>> "ows_abstract" "RAP Resettlement Sites"<br>> "ows_keywordlist" "Resettlement, TFM" <br>> "ows_srs" "EPSG:32735"<br>> "wms_opaque" "0"<br>> "wms_group_title" "Data"<br>> "wms_group_abstract" Data"<br>> "wms_dataurl_href" "http://someserver:8081/data/"<br>> "wms_dataurl_format" "text/html"<br>> "ows_metadataurl_type" "FGDC"<br>> "ows_metadataurl_href"<br>> "http://someserver:8081/ms_ogc_workshop/index.html"<br>> "ows_metadataurl_format" "text/html"<br>> "ows_extent" "389443 8816705 442791 8858984"<br>> <br>> # OGC:WFS specific tags<br>> <br>> # /WFS_Capabilities/FeatureTypeList/FeatureType[*]/MetadataURL/@format<br>>
"wfs_metadataurl_format" "TXT"<br>> # specify which fields to include when returning queries<br>> "gml_include_items" "all" <br>> <br>> The mapfile top level projection is set to 900913 and that gets<br>> translated fine overtop of a Google base layer. <br>> <br>> On the OL side, I found some InfoButton code which I think I have<br>> adapted correctly for my layer. I don't see anything when I click on my<br>> map. I'm obviously missing something and I won't go into the details,<br>> but rather I will just ask for pointers to example MapServer served WMS<br>> layers that are queryable through OL (that is, one clicks and some div<br>> gets populated with attribute content or better some popup appears)<br>> showing all settings. I am a bit flabergasted by the number of moving<br>> parts. <br>> <br>> Just for the sake of it, I extracted my data and turned it into a<br>> textfile which I then used in
OpenLayers.Layer.Text (as per<br>> http://wiki.openstreetmap.org/index.php/Openlayers_POI_layer_example).<br>> OOTB, one gets a nice popup, default icon and default html formatting.<br>> I wonder if one could get as easy a popup solution for a WMS served<br>> queryable layer ? I wouldn't be so crazy as to generate a textfile on<br>> the fly to duplicate my layer so that it becomes easily queryable ...<br>> <br>> Thanx for pointers,<br>> <br>> Yves Moisan<br>> <br>> _______________________________________________<br>> Users mailing list<br>> Users@openlayers.org<br>> http://openlayers.org/mailman/listinfo/users<br>> <br><br>-- <br>David Percy<br>Geospatial Data Manager<br>Geology Department<br>Portland State University<br>http://gisgeek.pdx.edu<br>503-725-3373<br></blockquote><br>