Re: [OpenMap Users] Time Zone Data

From: Gordon Shankman <gshankman@ngc.com>
Date: Tue Aug 12 2003 - 15:11:56 EDT

I'm using that timezone data with the properties file and I get the
outlines of the zones, but the colors for each area don't appear. All I
get is the black outlines. I'm also trying to set up a mouse mode that
will display the current time (via fireRequestInfoLine()) in the time
zone under the mouse cursor. I can get the graphic under the mouse
cursor, but when I call areas.getName() with the App Object from the
graphic, it returns an empty string. Any ideas on how to fix this?

Thanks,
Gordon

Here's the code from my mouseMoved method in the TimeZoneLayer (extends
AreaShapeLayer):
    /**

     * Display the time in the time zone the user is currently over.

     */

    public boolean mouseMoved(MouseEvent e) {

        System.out.println("Mouse Moved");

        OMGraphicList omgraphics = (OMGraphicList)getList();

        if (omgraphics == null)

            return false;

        OMGraphic newGraphic = omgraphics.selectClosest(e.getX(),
e.getY(), 2.0f);

        

        if (newGraphic != currentGraphic) {

            currentGraphic = newGraphic;

            if (currentGraphic != null) {

                String zoneName;

                Object obj = currentGraphic.getAppObject();

                if (obj instanceof String) {

                    zoneName = (String)obj;

                }

                else if (obj instanceof Vector) {

                    zoneName = areas.getName((Vector)obj);

                }

                else if (obj instanceof Integer) {

                    zoneName = areas.getName((Integer)obj);

                }

                else {

                    zoneName = null;

                }

                if (zoneName != null && zoneName.length() > 0) {

                    GregorianCalendar gc = new
GregorianCalendar(TimeZone.getTimeZone("GMT" + zoneName));

 
fireRequestInfoLine(dateFormatter.format(gc.getTime()));

                }

                else

                    fireRequestInfoLine("");

            }

        }

        

        return true;

    }
On Thu, 2003-07-31 at 16:07, Don Dietrick wrote:

Hi Gordon,

Check out:

 <http://openmap.bbn.com/data/shape/timezone/>
http://openmap.bbn.com/data/shape/timezone/

It has a properties file that contains properties you can use to set up

the layer.

- Don

On Thursday, July 31, 2003, at 10:08 AM, Gordon Shankman wrote:

> Does anyone have data for or an already defined layer that displays

> world time zones? All I've been able to find so far is points for the

> well-known cities in each zone. What I would like to do is have a

> layer that shades the areas of each time zone overlaid on a world map.

>

> Thanks,

> Gordon

>

<image.tiff>

>

>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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"]
  _____  
Gordon Shankman
Software Engineer
Northrop Grumman Information Technology - TASC
4801 Stonecroft Boulevard
Chantilly, Virginia  20151
703-633-8300 x8670
gshankman@ngc.com <mailto:gshankman@ngc.com> 
--
[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 Tue Aug 12 15:25:40 2003

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