Re: [OpenMap Users] Event Handling

From: Don Dietrick <dietrick@bbn.com>
Date: Fri Sep 26 2003 - 16:29:10 EDT

Hi Brian,

On Thursday, September 18, 2003, at 03:21 PM, Bryan Tedesco wrote:

> Hello,
>
> Is there a way to create a callout in openmap, to display every city
> within a state? A callout would be something like a line that extends
> away from the chosen state and displays every city. So it is obvious
> that the extension and display of every city belongs to that state.
> The
> problem arises because it is impossible to map every city in a state,
> unless the scale is very close. So if the scale itself showed the
> entire united states, would it be possible to mouse over a state and
> provide a list of the cities. Each city being an object. Then be able
> to have each name of the state moused over and highlighted. And also
> clickable? If this is unclear please tell me and I will try to explain
> it better

This kind of functionality is possible to do within OpenMap, but it
really depends on the data that you have. A layer can receive mouse
events and make a query against an OMGraphicList of state boundaries,
being able to tell you if the mouse is within a state. You'd have to
get the state data, but that wouldn't be that hard. Then, based on a
state, you could filter cities based on state. You'd have a lot of
options for that. I think I would organize my city data in different
quadtrees (com.bbn.openmap.util.quadtree package) based on their
population, only making queries against a quadtree if the scale was
large enough.

Once the cities are on the map, you can have them react to mouse events
pretty easily, to clicks, mouse overs, etc.

Hope this helps,

Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Fri Sep 26 16:30:27 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT