Projection proj = null; try { proj = ProjectionFactory.makeProjection( Environment.get(Environment.Projection, "com.bbn.openmap.proj.Mercator"), Environment.getFloat(Environment.Latitude, 0f), Environment.getFloat(Environment.Longitude, 0f), Environment.getFloat(Environment.Scale, Float.POSITIVE_INFINITY), envWidth, envHeight); } catch (com.bbn.openmap.proj.ProjectionException pe) { Debug.error("Can't use (" + Environment.Projection + " = " + Environment.get(Environment.Projection) + ") property as a projection class, need a class name instead.  Using default of com.bbn.openmap.proj.Mercator."); proj = ProjectionFactory.makeProjection( com.bbn.openmap.proj.Mercator.class, Environment.getFloat(Environment.Latitude, 0f), Environment.getFloat(Environment.Longitude, 0f), Environment.getFloat(Environment.Scale, Float.POSITIVE_INFINITY), envWidth, envHeight); }
Projection proj = ProjectionFactory.getDefaultProjectionFromEnvironment();
    public static MapBean createMapBean() {        int envWidth = Environment.getInteger(Environment.Width,                                               MapBean.DEFAULT_WIDTH);        int envHeight = Environment.getInteger(Environment.Height,                                               MapBean.DEFAULT_HEIGHT);        if (envWidth <= 0 || envHeight <= 0) {            Dimension d = Toolkit.getDefaultToolkit().getScreenSize();            if (envWidth <= 0) {                envWidth = (int)d.getWidth();            }            if (envHeight <= 0) {                envHeight = (int)d.getHeight();            }        }        // Initialize the map projection, scale, center        // with user prefs or defaults        Projection proj = null;            try {                proj = ProjectionFactory.makeProjection(                   Environment.get(Environment.Projection, "com.bbn.openmap.proj.Mercator"),                   Environment.getFloat(Environment.Latitude, 0f),                   Environment.getFloat(Environment.Longitude, 0f),                   Environment.getFloat(Environment.Scale, Float.POSITIVE_INFINITY),                   envWidth, envHeight);        } catch (com.bbn.openmap.proj.ProjectionException pe) {            Debug.error("Can't use (" + Environment.Projection + " = " + Environment.get(Environment.Projection) + ") property as a projection class, need a class name instead.  Using default of com.bbn.openmap.proj.Mercator.");            proj = ProjectionFactory.makeProjection(                   com.bbn.openmap.proj.Mercator.class,                   Environment.getFloat(Environment.Latitude, 0f),                   Environment.getFloat(Environment.Longitude, 0f),                   Environment.getFloat(Environment.Scale, Float.POSITIVE_INFINITY),                   envWidth, envHeight);        }        if (Debug.debugging("mappanel")) {            Debug.output("MapPanel: creating MapBean with initial projection " + proj);        }                return createMapBean(proj, new BevelBorder(BevelBorder.LOWERED));    }