For some reason, the feature.cluster property is not defined when the cluster "threshold" option is used. This makes the zoom to cluster code error out with the following error as the right checks aren't made:

Uncaught TypeError: Cannot read property 'length' of undefined

Reproducible steps:

1) Create a map with the latest --dev version of openlayers
2) Enable the Cluster features behaviour and set a Distance and threshold
3) Enable Popup for features behaviour, tick Zoom to cluster (Not zoom to point).
4) Attempt to click a point for the popup.

Patch attached.

Files: 
CommentFileSizeAuthor
#3 openlayers-cluster-threshold-fix-3.patch1.32 KBacbramley
PASSED: [[SimpleTest]]: [MySQL] 225 pass(es).
[ View ]
#1 openlayers-cluster-threshold-fix-2.patch1.47 KBacbramley
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch openlayers-cluster-threshold-fix-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
openlayers-cluster-threshold-fix-1.patch846 bytesacbramley
PASSED: [[SimpleTest]]: [MySQL] 225 pass(es).
[ View ]

Comments

StatusFileSize
new1.47 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch openlayers-cluster-threshold-fix-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Much better patch. There's also bigger issues with this functionality that I have discovered, I will raise this as a separate issue though.

Status:Needs review» Needs work

The last submitted patch, openlayers-cluster-threshold-fix-2.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new1.32 KB
PASSED: [[SimpleTest]]: [MySQL] 225 pass(es).
[ View ]

Woops

Issue summary:View changes
Status:Needs review» Reviewed & tested by the community

I confirm the issue and I confirm that the fix works.

Status:Reviewed & tested by the community» Fixed

Committed & pushed ! Thanks for your patch and testing all !

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.