[OpenLayers-Users] Unable to set size of popup window
Håvard Wahl Kongsgård
haavard.kongsgaard at gmail.com
Tue Nov 29 03:21:57 EST 2011
Hi, with the code below I am unable to set the size of the popup
window, the result is just the same the same as null (auto). There
might also be a bug in openlayers, as setting the size directly with
new OpenLayers.Size in OpenLayers.Control.WMSGetFeatureInfo results in
a error.
popup_size = new OpenLayers.Size(200,200);
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://something.com:8080/geoserver/wms',
title: 'Identify features by clicking',
layers: [tiled],
//hover:true,
queryVisible: true,
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new OpenLayers.Popup.FramedCloud(
"chicken",
map.getLonLatFromPixel(event.xy),
popup_size,
event.text,
null,
true
));
//alert(event.text);
}
}
});
-Håvard
More information about the Users
mailing list