OpenLayers OpenLayers

Ticket #1606 (closed feature: fixed)

Opened 5 months ago

Last modified 3 months ago

Add cluster and paging strategy

Reported by: tschaub Assigned to: tschaub
Priority: blocker Milestone: 2.7 Release
Component: Layer.Vector Version: 2.7 RC1
Keywords: Cc:
State: Complete

Description (Last modified by tschaub)

Add a cluster strategy to group nearby features into clusters and a paging strategy to deliver batches of features to the layer one page at a time.

Attachments

strategy.patch (62.4 kB) - added by tschaub on 09/11/08 18:42:04.
adds paging and cluster strategy

Change History

07/28/08 12:38:13 changed by crschmidt

  • priority changed from minor to blocker.

08/26/08 04:12:14 changed by euzuro

  • state set to Needs More Work.

09/05/08 11:21:01 changed by euzuro

  • version changed from 2.6 to 2.7 RC1.

Floating to RC1... vector-behavior patches will go in on RC2.

09/09/08 16:03:31 changed by tschaub

  • description changed.
  • summary changed from bring vector behavior work into the trunk to Add cluster and paging strategy.

09/10/08 14:36:03 changed by tschaub

  • state changed from Needs More Work to Review.

Now includes tests. Please review.

09/11/08 01:55:41 changed by tschaub

  • owner changed from tschaub to elemoine.

Eric, if you get a chance to review this, that would be great. If not, please assign to Uz. Thanks. I'll hit #1699 tomorrow morning.

09/11/08 18:42:04 changed by tschaub

  • attachment strategy.patch added.

adds paging and cluster strategy

09/11/08 19:05:00 changed by tschaub

  • owner changed from elemoine to euzuro.

I have confirmed that tests* pass and the 2 new examples work in the following browsers:

  • Firefox 3
  • Safari 3
  • Opera 9
  • Internet Explorer 6**
  • Internet Explorer 7**

* I only ran relevant tests in non Firefox browsers - Layer/Vector.html, Strategy/Cluster.html, and Strategy/Paging.html.

** I cannot run the examples on my virutal IE machine because my proxy is not set up correctly, and I don't feel like dealing with this currently. I did run tests in IE and I did confirm that the live examples work in IE 6/7.

Thanks for any additional review.

09/12/08 04:37:48 changed by euzuro

  • owner changed from euzuro to tschaub.
  • state changed from Review to Commit.

i may not be the best person to review this ticket, since i know nothing about most of the work that's been done on the vector-behavior ticket.... but I think that everything here looks more or less solid.

Before putting this patch in, I would urge tschaub to evaluate which of the functions from each of the Paging.js and Clusters.js ought to be made APIMethods. pageNext() and pagePrevious() being the first two that jump out at me. Also 'distance', maybe, on the clusters.

Just for the record, I would also say that it might be a nice feature to build into the paging strategy a way such that one could begin paging from any point in the list of features (ie not necessarily on an even page boundary)... but I don't see that as a priority, by any means.

The other comment I would make is that the ND for this stuff is not 100% complete, a couple functions here and there with missing documentation. Again, nothing to freak out about -- especially since the majority of the code in here is nonAPI, not for public consumption.

FWIW, I think this code is pretty powerful. Or maybe what I should say is that the code behind it is pretty powerful. The fact that I can walk up off the street, knowing *nothing* about vector-behaviors, and in the span of 2.5 hours more or less understand everything that's going on here.... I think that is pretty impressive. Seems to me indicative of both good, clean coding, and also good design.

Also, the tests for these are nice and to the point.

Anchoring my confidence heavily on the testing report in the above comment, I'm going to say this is good to go. With the API changes, please commit.

09/12/08 04:58:23 changed by tschaub

(In [8003]) Adding paging and cluster strategies. The paging strategy intercepts a batch of features bound for the layer and caches them, giving the layer one page at a time. The cluster strategy intercepts a batch of features and groups proximate features as clusters - giving the clusters to the layer instead. Thanks for the careful review Erik. r=euzuro (see #1606).

09/12/08 05:07:17 changed by tschaub

  • state changed from Commit to Pullup.

09/12/08 13:34:58 changed by euzuro

(In [8012]) Batch merge for rc2 of 2.7. 'svn merge -r7967:HEAD from trunk

09/12/08 14:04:53 changed by euzuro

  • status changed from new to closed.
  • state changed from Pullup to Complete.
  • resolution set to fixed.