Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am doing the sample example from OpenGeo WorkShop. It's about creating simple popup. I get popup but with blank no feature information? I am using geoserver with geoext.

enter image description here

controls.push(new OpenLayers.Control.WMSGetFeatureInfo({              
                autoActivate: true,
                infoFormat: "application/vnd.ogc.gml",
                maxFeatures: 3,
                eventListeners: {
                    "getfeatureinfo": function(e) {
                        alert(e.xy);
                        var items = [];
                        Ext.each(e.features, function(feature) {
                            items.push({
                                xtype: "propertygrid",
                                title: feature.fid,
                                source: feature.attributes
                            });
                        });
                        new GeoExt.Popup({
                            title: "Info",
                            width: 200,
                            height: 200,
                            layout: "accordion",
                            map: app.mapPanel,
                            location: e.xy,
                            maximizable: true,
                            collapsible: true,
                            items: items 
                        }).show();
                    }
                }
            }));
share|improve this question
    
Can you post a link to your HTML file? Maybe on pastebin or something similar? pastebin.com –  R.K. Feb 6 '12 at 14:50
    
@R.K. my code at pastebin pastebin.com/apSMeK2t –  kinkajou Feb 7 '12 at 9:45
    
A bit busy here. Btw, did the medford layer load? Because I don't see the Medford layer on your screenshot. –  R.K. Feb 7 '12 at 10:04
    
Were you able to successfully load the medford data before you tried your own? –  R.K. Feb 7 '12 at 10:08
    
@R.K. yes all layers load successfully –  kinkajou Feb 7 '12 at 10:10

2 Answers 2

up vote 0 down vote accepted

Well, The problem was due to two server running at different ports being considered as separate domains. Tomcat being deployed at one port and geoserver at other port. This link here in GIS explains more.

share|improve this answer
    
You finally got it to work then? –  R.K. Feb 7 '12 at 14:29
    
@R.K. Yes and Thank you :) for you help well simple mistake took my days of sleep –  kinkajou Feb 8 '12 at 3:45

It might be easier to start over. You could use the OpenGeo GeoExt workshop files. Should be easier than starting from scratch. Good luck. Oh and use version control next time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.