[OpenMap Users] Re: DayNightLayer blinking during refresh after updating to OpenMap4.6.2

From: Joey Heinrich <joey.heinrich_at_gmail.com>
Date: Fri, 20 May 2005 15:06:05 -0700

Didn't quite get my DayNightLayer flashing problem resolved yet, but I
found another thing the upgrade from 4.5.3 to 4.6.2 caused and I
figure this might be a good place to start. Unfortunately, I'm a
little lost with how to fix this as well.

After upgrading to 4.6.2, the methods in which our app was going about
selecting which view to use had become deprecated. We had a default
Mercator view, with options to load a LLXY and Orthographic view as
well. The code we were using to load these that I needed to fix was
the following. The switch statement and the method to set the
projection follow:

{
.....
.....

       switch( projectionType )
        {
            case LINEAR :
                setOpenMapProjection( getMapBean(), "LLXY" );
                break;
            case MERCATOR :
                // the default, so do nothing
                break;
            case PERSPECTIVE :
                setOpenMapProjection( getMapBean(), "Orthographic" );
                break;
            default :
                throw new IllegalArgumentException( "Unrecognized
projection type: " + projectionType )
....
....

}

private void setOpenMapProjection( MapBean mapBean, String projectionName )
{
    Projection projection = mapBean.getProjection();
    int projectionType = ProjectionFactory.getProjType( projectionName );
    Projection newProjection = ProjectionFactory.makeProjection(
projectionType, projection );
    mapBean.setProjection( newProjection );
}

The getProjType(String) and makeProjection(int, Projection) are no
longer valid. I was working on replacing them with the following

static java.lang.Class getProjClassForName(java.lang.String name)
 
and..

static Projection makeProjection(java.lang.String projClassName, Projection p)

I also think I found somewhere that stated I needed to be using the
prettyname attributes from the properties file when refering to these
classes in order to accomplish this? If so, how would I find the
prettyname values for the LLXY and Orthographic classes? Is it just
LLXY.LLXYName as listed in the class file or are they set elsewhere in
the properties file? Do I need to change the LLXY to the full path
name of com.bbn.openmap.proj.LLXY? After fiddling around with the
deprecated methods and changing it to the full path name, I was
finally able to get it to bring up maps even when choosing LLXY or
Orthographic in the app, but the map always displayed as Mercator
regardless of what you chose.

-Joey

--
[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 Fri May 20 2005 - 18:08:55 EDT

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