[OpenLayers-Users] GetFeatureInfo request displayed in popup
Nina Helle-Mildt
helle at sdac.hannover.bgr.de
Thu Jun 19 05:27:55 EDT 2008
Hi to all,
I'm trying to get a GetFeatureInfo request displayed in an
AnchoredBubble popup. But all I can achieve at the moment is a popup
with a placeholder for my GetFeaturInfo request saying [object Object].
var createPopup = function(response) {
var lonlat = seis.map.getLonLatFromViewPortPx(this.xy);
var popup = new OpenLayers.Popup.AnchoredBubble(
" ",lonlat, null, response, null, true);
map.addPopup(popup, true /* exclusive */);
popup.setBackgroundColor("#c1cdc1");
};
map.events.register('click', map, function (e) {
OpenLayers.Util.getElement('nodeList').innerHTML =
"Einen Moment bitte ...";
var url = seis.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: seis.map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'text/html',
QUERY_LAYERS: seis.params.LAYERS,
WIDTH: seis.map.size.w,
HEIGHT: seis.map.size.h
});
OpenLayers.loadURL(url, '', e, createPopup);
OpenLayers.Event.stop(e);
});
How I can achieve that?
By the way, is it possible to use a google maps base layer as map in the
OverviewMap control?
Thanks a lot,
Nina
More information about the Users
mailing list