> Now for the REALLY tricky part :) I have a Layer which is basically a
> view to a data model. On my map, I have 3 instances of this layer, all
> looking at different types of the same data.
>
> Somehow, I want to compile the results from these clicks into a single
> selection dialog, which will cover hits from all three layers. At the
> moment, I'm not sure this is even possible. I've got some workaround ideas,
> but most of them aren't reliable and the ones that are aren't good interface
> design.
>
> Anyone ever worked with pulling click results from multiple layers into a
> single action? Any ideas on how this might go? At the moment my best
> option is a static list as part of the class, which gets populated as the
> event passes through each layer, until the last one actually displays the
> results. Worry with this is layer visibility - events don't get passed to
> invisible layers, correct?
I don't think so, events get passed to all layers. Just be sure the event has not been consumed
by previous layer
public boolean mouseMoved(MouseEvent e) {
int x = e.getX();
int y = e.getY();
LatLonPoint ll = projection.inverse(x, y);
return true; // to consume the event or false otherwise
}
So, you can collect information under mouse from all layers. It works well.
Regards
Alexander
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Wed Jan 16 10:53:37 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT