[OpenLayers-Users] GetFeatureInfo Popup problem

Luciano Martin Galletti galletti77 at hotmail.com
Wed Jan 27 10:45:41 PST 2016


I've a problem with getfeatureinfo.

I cannot see popups with infos when i click on polygons or points

this is the code that i use:

    // the map panel
	
	var info;
    var map = new OpenLayers.Map("map-id");
    maxExtent: new OpenLayers.Bounds(143.834,-43.648,148.479,-39.573)
	var apiKey = "api";
   
	var mapPanel = new GeoExt.MapPanel({
        border: true,
        region: "center",
        center: [1173892.7542969, 5870273.7714844],
		zoom: 3,
        layers: [
            new OpenLayers.Layer.OSM(),

			new OpenLayers.Layer.Vector("Highlighted Features", {
            displayInLayerSwitcher: false, 
            isBaseLayer: false 
        }),

			//
			new OpenLayers.Layer.WMS("WMS Test polygon",
                "http://localhost:8080/geoserver/wms", {
                    layers: "prova:poligoni",
					transparent: true,
                }, {
					 isBaseLayer: false
                     ,displayOutsideMaxExtent: true

               }),
            new OpenLayers.Layer.WMS("WMS Test point",
                "http://localhost:8080/geoserver/wms", {
                    layers: "prova:punti",
                    transparent: true,
                    format: "image/gif"
                }, {
                	 isBaseLayer: false
                     ,displayOutsideMaxExtent: true
                })            
        ]
    });
// FEATURE POPUP
	info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost:8080/geoserver/wms', 
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });
        map.addControl(info);
        info.activate();

i use also GEOEXT i don't know if that can be a problem.
Firebug don't give me any error :(

the full page code is here:
http://pastebin.com/j4KfVEUU

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20160127/62d972b7/attachment.html>


More information about the Users mailing list