Ecotrust / wc-marine-debris

West Coast Governor's Alliance marine debris database
2 stars 1 forks source link

Determine appropriate zoom behavior on clicking an event list item #111

Open rhodges opened 11 years ago

rhodges commented 11 years ago

Currently clicking on an event in the left panel zooms the map in two levels and centers on the point/cluster.

We need to zoom in more (a default level? Shallowest level that event is unclustered?). Even more importantly, we need to HIGHLIGHT the point/cluster.

eknuth commented 11 years ago

Yup. Getting the feature out of a cluster is tough. Here is a pull request for a getFeatureBy method that searches clusters. https://github.com/openlayers/openlayers/pull/360

It'd be hard to know when the point is unclustered. And, which point would you zoom to in a cluster?

Also, we have a flag set that always clusters, even if the cluster size is 1.

rhodges commented 11 years ago

I assumed that determining cluster status would be hard/impossible. Also we have several events at the same locations so that you could zoom in to infinity and they'd still be clustered.

I propose we set a default "zoom to" level to be very zoomed in (maybe 2-4 levels above our max zoom). The 'two zoom levels on every click' is confusing.

If we can get the highlighting to work, then then everything else is less important.