Hi all,

I'm using GeoServer 2.1 b1 and OpenLayers 2.10.
My map can properly run FramedCloud popup on IE 8 but Google Chrome and
FireFox are unable.

Can anyone suggest me what should I do?

Here is my code.

function init() {
 var bounds = new OpenLayers.Bounds(
                    746303, 1678971,
                    746547, 1679581
                );

                var options = {
                    //controls: [],
                    maxExtent: bounds,
                    maxResolution: 2.3828125,
                    projection: "EPSG:24047",
                    units: 'm'
                };
                var map = new OpenLayers.Map('map', options);
            
                // setup tiled layer
                var tiled = new OpenLayers.Layer.WMS(
                    "KhaoSomphot:herb - Tiled",
"http://localhost:8080/geoserver/wms";,
                    {
                        layers: 'KhaoSomphot:herb',
                        styles: '',
                        format: 'image/gif',
                        //tiled: !pureCoverage,
                        tilesOrigin : map.maxExtent.left + ',' +
map.maxExtent.bottom
                    },
                    {
                        buffer: 0,
                        displayOutsideMaxExtent: true
                    } 
                );
                                
                                                // setup single tiled layer
                var untiled = new OpenLayers.Layer.WMS(
                    "KhaoSomphot:herb - Untiled",
"http://localhost:8080/geoserver/wms";,
                    {
                        layers: 'KhaoSomphot:herb',
                        styles: '',
                        format: 'image/gif'
                    },
                    {singleTile: true, ratio: 1} 
                );
                map.addLayers([tiled,untiled]); 
 
        info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost:8080/geoserver/wms', 
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                        event.text,
                        null,
                        true
                    ));
                }
            }
        });
        map.addControl(info);
        info.activate();                        
 
        map.addControl(new OpenLayers.Control.LayerSwitcher());
        map.zoomToMaxExtent();
    }

Thanks.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Help-the-FramedCloud-can-not-run-on-Google-Chrome-and-Firefox-tp5967198p5967198.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to