[OpenLayers-Users] WMSGetFeatureInfo

Francesco D'Amore francesco.damore at gmail.com
Tue Mar 23 13:51:33 EDT 2010


Hi All!!!!

I'm so Sorry if the my question will be trivial but a tried to find
some thing in the mail list archive but it doesn't work!!!!!

I'm very new bie in OpenLayers and I have a problem with WMSGetFeatureInfo.

With GeoExt I try to use the control in order to get some information
about WMS Services and display it in a Cloud:

var popup;
	//Feture info....
	info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://160.97.133.1:8080/geoserver/wms',
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(evento) {
                    mymap.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken",
                        mymap.getLonLatFromPixel(evento.xy),
                        null,
                        evento.text,
                        null,
                        true
                    ));
                }
            }
        });
	mymap.addControl(info);
	info.activate();

Where a click in the map, the call crash because no "default" Style is
defined in the Service called!!!! I use Geoserver and all style are
defined for each services deployed.
With firebug I cached the GetFeatureInfo request:

http://160.97.133.1:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetFeatureInfo&layers=IIA%3Ait_province,IIA%3Ait_comuni&query_layers=IIA%3Ait_province,IIA%3Ait_comuni&styles=undefined,undefined&bbox=-1167350.587686%2C4784467.947295%2C3827350.587686%2C5415532.052705&srs=EPSG%3A900913&feature_count=10&x=482&y=84&height=129&width=1021&info_format=text%2Fhtml


and the response is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1" >   <ServiceException
code="StyleNotDefined">
      No default style has been defined for IIA:it_province
</ServiceException></ServiceExceptionReport>

In the request the style is "undefined"...... this is very strange
because I thing that that style must setted to null.....  some think
like Stile=&....... and not "undefined". In the OpenLayer examples
coming in the downloaded package, the reguest is without any style and
the systems works.

Any suggestions???? How can I get the request string without Style
"undefined"?????






-- 
Ing. Francesco D'Amore
blog: www.marinajonica.org
linkedin: http://www.linkedin.com/in/francescodamore
Consiglio Nazionale delle Ricerche - Istituto di Inquinamento Atmosferico (IIA)
Ph. D. Student at University of Calabria - DEIS



More information about the Users mailing list