Open BrenBarn opened 9 years ago
Thanks for raising @BrenBarn - I'd definitely be interested in helping this happen. Did you take a look at having a go at this? Conceptually, it sounds pretty reasonable, and I'd love to see a new example in the gallery which had this capability.
The FeatureArtist does not define the matplotlib API
contains
method (or_contains
--- I'm not actually sure which one you're supposed to override in this case). This means that you can't use matplotlib pick events to interactively select a map feature, because the features have no way to tell whether a mouse event occurred inside them.This StackOverflow question is about the same issue. The answer by no less than @pelson says:
The answer there points the way towards an implementation of a containment check (although it would have to be generalized to convert to the appropriate CRS).
One way or another, this should be added. Being able to use matplotlib pick events is really import for making interactive maps with matplotlib.