[OpenLayers-Users] WMSGetFeatureInfo eventListener resolving
dependencies
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Aug 25 00:55:00 EDT 2010
On Wednesday, August 25, 2010, Sige <sigenz at yahoo.co.nz> wrote:
>
> Hi All,
>
> I have a WMS layer with a popup control for feature info:
> var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo(
> { url: "http://localhost/geoserver/wms",
> hover:false,
> maxFeatures:5,
> layers: [wmsLayer],
> queryVisible: true,
> eventListeners: {
> getfeatureinfo: function(event) {
> if(event.text){
> //add openlayers popup window
> map.addPopup(new OpenLayers.Popup.FramedCloud(
> "geoserver_info",
> map.getLonLatFromPixel(event.xy),
> null,
> event.text,
> null,
> true
> )
> );
> }
> }
> }
> },
> { radius: 50}
> );
> map.addControl(featureInfo);
> featureInfo.activate();
>
> Which works fine with the full build of Openlayers.js. However, it stops
> working when using a custom lite build of Openlayers, the response from
> feature info request is there but the popup window dosn't show up.
> Obviously I have missed some classes in building Openlayers.js but I could
> not figure out whats needed as there is no error message on firebug. My
> build config is as follows:
>
> [first]
> OpenLayers/SingleFile.js
> OpenLayers.js
> OpenLayers/BaseTypes.js
> OpenLayers/BaseTypes/Class.js
> OpenLayers/Util.js
> Rico/Corner.js
> OpenLayers/Console.js
>
> [last]
>
> [include]
> OpenLayers/Bounds.js
> OpenLayers/Map.js
> OpenLayers/Layer/WMS.js
> OpenLayers/Ajax.js
> OpenLayers/Events.js
> OpenLayers/Layer.js
> OpenLayers/Layer/Grid.js
> OpenLayers/Layer/HTTPRequest.js
> OpenLayers/Layer/WMS.js
> OpenLayers/Layer/WMS/Untiled.js
> OpenLayers/Tile.js
> OpenLayers/Tile/Image.js
> OpenLayers/Popup.js
> OpenLayers/Popup/Anchored.js
> OpenLayers/Popup/Framed.js
> OpenLayers/Popup/FramedCloud.js
> OpenLayers/Control.js
> OpenLayers/Control/Navigation.js
> OpenLayers/Control/MousePosition.js
> OpenLayers/Control/LayerSwitcher.js
> OpenLayers/Control/PanZoom.js
> OpenLayers/Control/ArgParser.js
> OpenLayers/Control/Attribution.js
> OpenLayers/Control/Scale.js
> OpenLayers/Control/WMSGetFeatureInfo.js
> OpenLayers/Format.js
> OpenLayers/Format/XML.js
> OpenLayers/Format/WMSGetFeatureInfo.js
> OpenLayers/Request.js
> OpenLayers/Request/XMLHttpRequest.js
> OpenLayers/Events.js
> OpenLayers/Handler.js
> OpenLayers/Handler/Click.js
> OpenLayers/Handler/Hover.js
>
> Anybody knows the dependencies for the WMSGetFeatureInfo popup and the class
> of the eventListeners ?
you probably need to include OpenLayers/Format/GML.js, but I'm not
sure this is your problem since you aren't seeing errors in the FB
console.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list