maphub / maphub-portal

An online application for exploring and annotating digitized, high-resolution historic maps.
maphub.github.com
Apache License 2.0
39 stars 11 forks source link

Overlapping annotations readability issue #52

Open keithnewman14 opened 12 years ago

keithnewman14 commented 12 years ago

If an annotation is created that surrounds an existing annotation, the first one becomes inaccessible.

For example, if you create an annotation to point out a particular area of interest in Massachusetts, and then later create an annotation that surrounds the original 13 colonies, there is no way to read the first annotation (other than scrolling down to the bottom of the page where they are all listed).

If you do it in reverse though (make an annotation around the colonies and then one around Massachusetts), you will be able to read both.

slhck commented 12 years ago

I've googled a while for that and it seems there's no real solution. Further reading:

slhck commented 12 years ago

So here's a couple of ideas I got from the question – I'll have to think about what really makes sense. Maybe hiding features temporarily wouldn't be too hard.

  1. Turn on feature clustering strategy
  2. Implement your own clustering algorithm, so when a new item is added or modified, your algorithm re-runs and does a nested for-loop check and n*n(-1) checks to see what overlaps with what - then modify the feature property to setup a list of overlapping features, and when the user Clicks on the feature, display a list of features that overlap and have user select what they really wanted to click on. Makes sense?
  3. Instead of implementing feature on-click, just implement a whole map click handler. And when user clicks, check through your layer for any intersecting features - and if there is one - display that guy's pop-up, and if there are multiple, display a prompt list like in #2 above. If none intersect, just ignore.
  4. Implement a right-click option to temporarily "hide" a feature to let you get access to the hidden feature. As soon as next one is clicked, re-display all the hidden features
  5. Similar to #4, inside the top feature's pop-up, add a menu/link item to "hide" the feature. And proceed like in #4.
  6. Similar-ish to #4/5 implement a right-click "temporary move" and click drag the feature out of the way [remember it's old spot]. Then user clicks lower feature and the top one springs back to it's original position.