Re: [OpenMap Users] Identify Operation

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 29 Jun 2005 23:12:48 -0400

Hi Luigi,

The easiest way to capture mouse events and have something happen to
them is to extend the OMGraphicHandlerLayer and override the
GestureResponsePolicy methods for that layer. See this FAQ entry for
details on what methods are available for different actions:

http://openmap.bbn.com/cgi-bin/faqw.py?req=show&file=faq08.010.htp

OMGraphics (the map objects) have an attribute hashtable in them that
you can use to store more information about each feature, or a
pointer to an object that can let you find more information. Tom is
right, there is no unified way to get to this information, although
it should be standardized in a future version of OpenMap for shape
layers where dbf information gets loaded into the OMGraphics created
from the .shp file.

You can also use the com.bbn.openmap.dataAccess.shape.DbfTableModel
to read and manage information from a dbf file.

- Don

On Jun 29, 2005, at 6:08 PM, Lepkowski, Thomas M., CTR, OSD-PA&E wrote:

> Classification: UNCLASSIFIED
>
> Good question. OpenMap does not seem to have a unified way to
> display meta data for a point.
> You may need to alter or extend an OpenMap layer and bake your own
> "Identify" window.
>
> The com.bbn.openmap.layer.location.LocationLayer (takes csv file)
> will display a window containing info when you click a point and
> select "Show Details" from the menu.
>
> The com.bbn.openmap.plugin.PlugInLayer displayes a tooltip when you
> mouse over a point.
> The com.bbn.openmap.layer.shape.areas.AreaShapeLayer shows the
> point name in the lower right corner of the window.
>
> I have extended the AreaShapeLayer to display meta info in a
> window, with field_name - field_value displayed in two columns.
>
> It goes something like this:
>
> <code>
>
> // 1) capture mouseClicked event in the extended AreaShapeLayer
> // ( method mouseClicked(MouseEvent me) { ... }
> // 2) Get OMGraphic clicked-on
> // 3) Get AppObject ( An Integer for AreaShapeLayer )
> // ( Integer aligns attribute in .dbf file )
> // 4) Use DbfInputStream to grab dbf file content ( see OpenMap
> JavaDocs )e
> // ( Use the Integer to address the meta data )
> // 5) Put content in someJPanelWithMyContent
>
> // then ...
>
> WindowSupport ws = new WindowSupport( someJPanelWithMyContent,
> "Attributes" );
>
> // window pops up.
> ws.displayInWindow( x_offset, y_offset, width, height );
>
> </code>
>
> See attached screenshot showing some public points in the extended
> AreaShapeLayer.
> The window is the WindowSupport window containing
> someJPanelWithMyContent.
>
> Have fun.
>
> -Tom
>
> -----Original Message-----
> From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-
> users_at_bbn.com]On
> Behalf Of LT
> Sent: Wednesday, June 29, 2005 1:35 PM
> To: openmap-users_at_bbn.com
> Subject: [OpenMap Users] Identify Operation
>
>
> Hi,
> I'm really new with OpenMap so forgive me if I say something stupid :)
>
> I'm implementing a Gis application that have to manage several layers;
> the functionality that I have now to develop is that of
> identifying the
> single components in a layer;
> in others words, I need a command by which clicking on a particular
> element on the layer, its alpha-numerical informations are displayed.
>
> That's like the "Identify" in ESRI - ArcView
>
> Thanks,
> Luigi
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>
> <screenshot.jpg>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jun 29 2005 - 23:14:07 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT