[OpenLayers-Users] Styling FramedCloud popups

Dheeraj Chand dheeraj at dheerajchand.com
Fri May 18 15:55:36 PDT 2012


Hello,

I've added framed cloud popups to one of my OL applications modeled from the example in my commented text:

    // Following popup example from http://openlayers.org/dev/examples/getfeatureinfo-popup.html
    
    info = new OpenLayers.Control.WMSGetFeatureInfo({
        
        url             : 'http://geos.pccc.co/geoserver/nm01/wms',
        title           : 'Geography Information',
        queryVisible    : true,
        eventListeners : {
            getfeatureinfo: function(event) {
                map.addPopup(new OpenLayers.Popup.FramedCloud(
                    "Fleem",
                    map.getLonLatFromPixel(event.xy),
                    null,
                    event.text,
                    null,
                    true
                    ));
            }
        }        
    });

    map.addControl(info);
    info.activate();

What I'd like to do now is give the ability to style the contents of that popup to my development partner, and here's where we're stuck. 

1. What is the .CSS or HTML that we'd have to edit to change the contents of what's in there?
2. How does map.addPopup() convert event.text into HTML/CSS that's put into the popup?

Thanks,

Dheeraj


More information about the Users mailing list