[OpenLayers-Users] Strategy.Cluster problem

Wayne Dyck wayne at platoscave.net
Wed Apr 1 17:55:45 EDT 2009


When I enable the "OpenLayers.Strategy.Cluster()" as below and call a
"OpenLayers.Popup.FramedCloud" popup on each of the features it all
works great until I zoom into the map with one of the popups open. If I
attempt to close the popup at that point I get a "layer is null" error
message and the popup stays open. I can click on other features and the
popups behave as they should. It is only on a zoom event.

If I remove the "OpenLayers.Strategy.Cluster()" strategy setting then
the popups will close if left open and the map is zoomed.

Is this a bug in the Cluster strategy code?


            var projects = new OpenLayers.Layer.GML("Test Layer",
"georss.xml", {
                strategies: [
                    new OpenLayers.Strategy.Cluster()
                ],
                format: OpenLayers.Format.GeoRSS,
                projection: new OpenLayers.Projection("EPSG:4326"),
                styleMap: new OpenLayers.StyleMap({
                    "default": new OpenLayers.Style({
                        externalGraphic: "marker-gray.png",
                        backgroundGraphic: "marker-shadow.png",
                        graphicHeight: 19,
                        graphicWidth: 18,
                        backgroundXOffset: -5,
                        backgroundYOffset: -9,
                        graphicZIndex: 11,
                        backgroundGraphicZIndex: 10,
                        graphicXOffset: -9,
                        graphicYOffset: -9
                    }, OpenLayers.Feature.Vector.style["default"]),
                    "select": new OpenLayers.Style({
                        externalGraphic: "marker-blue.png"
                    })
                }),
                rendererOptions: {yOrdering: true}
            });


Thanks for any help.

Wayne



More information about the Users mailing list