[OpenLayers-Users] Framed popup update contentHTML after creation

Alessandro Ferrucci alessandroferrucci at gmail.com
Thu Oct 29 09:04:53 EDT 2009


Hello,
I have a hover control that shows an OpenLayers.Popup.SmallPopup with the
HTML "<i>Loading data... please wait...</i>", then I make a WMS request, and
when that comes back  I set SmallPopup.contentHTML to the HTML that came
back from the GetFeatureinfo request.

My code looks like this:

 if( map.getZoom() >= 12)
{
   pinPopup(evt,"<i>Loading data... please wait...</i>");

                        var url = wmsurl
                            + "?REQUEST=GetFeatureInfo"
                            + "&EXCEPTIONS=application/vnd.ogc.se_xml"
                            + "&BBOX=" + map.getExtent().toBBOX()
                            + "&X=" + evt.xy.x
                            + "&Y=" + evt.xy.y
                            + "&INFO_FORMAT=text/html"
                            + "&QUERY_LAYERS=cira:addresses"
                            + "&LAYERS=cira:addresses"
                            + "&FEATURE_COUNT=50"
                            + "&SRS=EPSG:900913"
                            + "&STYLES="
                            + "&WIDTH=" + map.size.w
                            + "&HEIGHT=" + map.size.h;

                        OpenLayers.loadURL(
                        url,
                        '',
                        this,
                        function(response,evt)
                        {
                            map.popups[0].contentHTML =
response.responseText;
                        },
                        receiveGetFeatureInfoFailure);
                    }

however the new HTML doesn't get updated in the popup.  I was hoping I did
not have to destroy the popup and pin it back up to the map with the new
HTML.

Thank you very much,

-- 
Signed,
Alessandro Ferrucci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091029/ee4be555/attachment.html


More information about the Users mailing list