RE: [OpenMap Users] AreaShapeLayer question

From: Chris Hopkins <>
Date: Tue, 23 Jan 2007 13:21:35 -0500

Thanks Don. I now get back an array of OMGraphicList objects, one list
for each defined area. Now, I have two questions:

1. How do I relate a particular OMGraphicList with one of the
PoliticalArea objects that I can access via id (e.g. "IRQ-AAN")?

2. Once I'm able to determine the mapping from id to OMGraphicList,
what's the best way to combine the shapes together to form a new shape
and then only draw the outline of that new shape?


p.s. Yes, this is the same issue that Karen Harper emailed the openmap
list about. Didn't realize she had done that. :)

-----Original Message-----
From: Don Dietrick []
Sent: Tuesday, January 23, 2007 12:23 PM
To: Chris Hopkins
Subject: Re: [OpenMap Users] AreaShapeLayer question

Hi Chris,

You're probably trying to get the geometries before they are loaded.
You can call getAreas().getGraphics() on the layer to get the
AreaHandler to load the geometries. That's usually done when the
layer is added to the map for the first time.

- Don

On Jan 23, 2007, at 7:14 AM, Chris Hopkins wrote:

> Hi all -
> We are using an AreaShapeLayer to display provinces in Iraq. We
> generated a shapefile using ArcView and, using the generated .dbf
> file, we can get mouseover information about the name of the
> province, etc by setting up the appropriate properties to drive the
> AreaShapeLayer.
> Now, we are trying to do some computation about those areas.
> Specifically, we want to be able to create a new region based on
> the aggregation of several provinces. Using the United States as an
> example, we'd like to be able to outline New England by combining
> the shapes of Maine, New Hampshire, Vermont, Massachusetts and
> Connecticut. Once we have a combined shape, we want to draw that as
> an outlined polygon.
> We are trying to access the OMGeometryList objects that are part of
> the PoliticalArea objects but the lists are empty when we try to do
> that. Perhaps we are trying to access them too early in the
> pipeline? What we have tried to do is extend the AreaShapeLayer
> class and override something like paint() and access the
> PoliticalArea objects using findPoliticalArea of the AreaHandler
> class.
> Is there an easier way to do this (or rather a way that works)? :)
> Thanks
> Chris

Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jan 23 2007 - 13:25:50 EST

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