[OpenLayers-Users] GetFeatureInfo in a FrameCloud popup
Obe, Regina
robe.dnd at cityofboston.gov
Mon Jun 9 08:12:54 EDT 2008
I'm sure there is probably one around but don't seem to find it. The
Popup Matrix and Popup Mayhem examples provide sample use of FrameCloud
among other popup types.
Anyrate for FrameCloud() its pretty much like using any popup.
Below is a snippet from one of my apps (this goes into your event
handler function). Unfortunately can't give away more than this.
Basically you declare a global variable popup at the top of your page.
Where I have the innerhtmlgoeshere is where you would stuff the html you
normally stuff in the div.innerHTML (I think the rest of the code in
the FeatureInfo stays pretty much the same)
var tolerance = new OpenLayers.Pixel(6, 6);
var min_px = new OpenLayers.Pixel(
e.xy.x - tolerance.x, e.xy.y +
tolerance.y);
var max_px = new OpenLayers.Pixel(
e.xy.x + tolerance.x, e.xy.y -
tolerance.y);
var min_ll = map.getLonLatFromPixel(min_px);
var max_ll = map.getLonLatFromPixel(max_px);
if (popup){
popup.destroy();
popup = null;
}
popup = new OpenLayers.Popup.FramedCloud("property",
new
OpenLayers.LonLat(min_ll.lon,min_ll.lat),
new OpenLayers.Size(400,500),
innerhtmlgoeshere, null, true);
map.addPopup(popup);
Hope that helps,
Regina
-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of Alessio Di Lorenzo
Sent: Sunday, June 08, 2008 8:03 AM
To: OpenLayers ML
Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup
Hi list,
I'd like to obtain the WMS GetFeatureInfo response in a framecloud popup
instead in a separate frame/div (as displayed in the example at
http://openlayers.org/dev/examples/example-list.html ).
Is it possible? Are there any working examples that I can view?
thaks in advance, alessio
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
More information about the Users
mailing list