[Users] geoext.popup position wrong
Robert Buckley
robertdbuckley at yahoo.com
Tue Mar 6 14:06:35 CET 2012
Hi,
it´s not the first time I have had this problem, but I have looked into my own work and cannot find a solution.
When the popup appears, it is not positioned on the point I clicked..
I have included the geoext css and the popup css files in the html doc.
my code is here...if some could give me a clue as to where I should look for a solution I´d be most grateful,
cheers,
Rob
var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
infoFormat: "application/vnd.ogc.gml",
queryVisible: true,
highlightOnly: false,
maxFeatures: 20,
eventListeners: {
"getfeatureinfo": function(e) {
var items = [];
Ext.each(e.features, function(feature) {
items.push({
xtype: "propertygrid",
title: feature.fid,
source: feature.attributes
});
});
new GeoExt.Popup({
url: "/geoserver/ows",
title: "Info",
layout: "border",
region:"east",
//x: 330,
//y: 20,
width: 200,
height: 300,
layout: "accordion",
bodyStyle: 'background-color:#FFF;,font-size:14px;',
autoScroll: true,
map: mapPanel.map,
location: map.getLonLatFromPixel(e.xy),
//location: e.xy,
//lonlat: mapPanel.map.getLonLatFromPixel(e.xy),
// html: e.text,
maximizable: false,
resizable: false,
collapsible: false,
items: items
}).show();
}
}
});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120306/bf25e6cf/attachment.htm
More information about the Users
mailing list