Hi Sven,

The error message you see come from UMN mapserver moaning about the 
missing URL parameter MAP, not the OpenLayers Map.

Have you tried to pass over an URL to the Constructor of the control 
(this isn't documented in the API, but maybe should be)?

featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
   url : 'http://example.com/mapserver?map=/path/to/mapfile.map'
});


If the above fails, you could use the non-API-property "vendorParams" (I 
cannot see a reason why this is a hidden option):

featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
   vendorParams: {
     map: '/path/to/mapfile.map'
   }
});

If both work, I'd go with the vendorParams, because that is what UMN Mapservers 
MAP url parameter is.

Untested, hope it helps,

Marc



On 24.08.2010 11:00, Sven Burbeck wrote:
> Hi list,
> I'm struggling to show GetFeatureInfo results in a GeoExtPopup.
> I used the sample code for openLayers / GeoExt.popup.
> That's the code:
> ...
>      var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo();
>              featureInfo.events.on({
>                  getfeatureinfo: function(e) {
>                      new GeoExt.Popup({
>                          title: "Info",
>                          width: 200,
>                          height: 150,
>                          autoScroll: true,
>                          maximizable: true,
>                          map: map,
>                          lonlat: map.getLonLatFromPixel(e.xy),
>                          html: e.text
>                      }).show();
>                  }
>              });
>
>      map.addControl(featureInfo);
>      featureInfo.activate();
> ...
> My WMS comes from MapServer (and FeatureInfo apparently works on the
> selected layers).
> When checking the request (copied from firebug) directly in the browser
> I get the following error message:
> 'loadMap(): Web application error. CGI variable "map" is not set.'
>
> And that's actually true. When adding the "map" parameter manually
> everything works well.
> However, I thought the requests "map" and "layers" parameter were given
> by "map:map".
>
> Maybe I simply missed something but currently I don't know what.
>
>
> cheerrs,
> Sven
>
>    


-- 

   .................................................................
    Karten im (Inter|Intra)net?

    OpenLayers - Webentwicklung mit dynamischen Karten und Geodaten
    von M. Jansen und T. Adams, OpenSourcePress, München.

    ISBN: 978-3-937514-92-5
    URL:  http://openlayers-buch.de
   .................................................................


   Dipl.-Geogr. Marc Jansen
   - Anwendungsentwickler -

   terrestris GmbH&  Co. KG
   Irmintrudisstraße 17
   53111 Bonn

   Tel:    ++49 (0)228 / 96 28 99 -53
   Fax:    ++49 (0)228 / 96 28 99 -57

   Email:  jan...@terrestris.de
   Web:    http://www.terrestris.de

   Amtsgericht Bonn, HRA 6835
   Komplementärin:  terrestris Verwaltungsgesellschaft mbH
   vertreten durch: Hinrich Paulsen, Till Adams


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

Reply via email to