1

I'm trying to put popups on my map to show the feature's info. I have done that, however after the first click the mouse pointer starts loading and never stops.

var control = new OpenLayers.Control.WMSGetFeatureInfo({
              url: "/geoserver/prod/wms",
              layers: [restaurantes,ruas,linhas_agua]
});


control.events.on({
        getfeatureinfo: function(event) {
        if (popup)  { popup.destroy(); }
        popup = new GeoExt.Popup({
        title: "Informação",
        map: mapPanel,
        layers: [restaurantes,ruas,linhas_agua],
        width: 250,
        autoScroll: true,
        collapsible: true,
        bodyStyle: {padding: 5},
        html: event.text,
        });
        popup.show();
        }

});

mapPanel.map.addControl(control);   
control.activate();
  • Do you get a valid response of your GeoServer instance? Can you check this (and maybe share the response) by your browser's developer tools? – user59046 Sep 11 '15 at 9:55
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Evil Genius Sep 11 '15 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.