Re: [OpenMap Users] upgrading from 4.6.0 to 4.6.2

From: Peter Wilkes <pwilkes_at_cowpie.acm.vt.edu>
Date: Fri, 18 Feb 2005 08:05:29 -0500 (EST)

yes i just tried that.

it seems that in the makeProjections method the ProjectionFactory does not
have any of the default projections (or any i specified in the properties
file) when i goto create the projection. so the projection iterator is
empty and the default Mercator projection is returned.

Pete

On Fri, 18 Feb 2005, Bart Jourquin wrote:

> Hi Peter,
>
> Did you try this ? (in this cas for a LLXY projection...)
>
> Projection projection = youtMapBean.getProjection();
> LatLonPoint ctr = projection.getCenter();
> Projection newProj = ProjectionFactory.makeProjection
> (LLXY.class, ctr.getLatitude(), ctr.getLongitude(), projection.getScale
> (), projection.getWidth(), projection.getHeight());
> yourMapBean.setProjection(newProj);
>
> Bart
>
> Le jeudi 17 février 2005 à 15:58 -0500, Peter Wilkes a écrit :
>
> > Ok. i'm looking into upgrading our project from openmap 4.6.0 to 4.6.2
> >
> > i don't particularly like using deprecated methods and noticed a couple
> > appear when i recompiled our project.
> >
> > originally we were getting/setting the projection via the following.
> >
> > in openmap.properties
> > --
> > openmap.Projection=cadrg
> >
> > in code
> > --
> > int projType = ProjectionFactory.getProjType(projName);
> > mapBean.setProjectionType(projType);
> >
> >
> > however those getProjType and setProjectionType are now deprecated and i
> > want to update my calls.
> >
> > i tried the following however when the app starts i was still left with a
> > Mercator projection. stepping through the code it seems like the
> > projectionfactory did not contain any projections and returned mercator as
> > the default
> >
> > in opnmap.properties
> > --
> > openmap.Projection=com.bbn.openmap.proj.CADRG
> > openmap.components=<others> projFactoryLoader <more others>
> > projFactoryLoader.class=com.bbn.openmap.proj.ProjectionFactoryLoader
> > projFactoryLoader.projectionLoaders=mercatorloader cadrgloader ortholoader
> > llxyloader gnomonicloader
> > projFactoryLoader.mercatorloader.class=com.bbn.openmap.proj.MercatorLoader
> > projFactoryLoader.cadrgloader.class=com.bbn.openmap.proj.CADRGLoader
> > projFactoryLoader.ortholoader.class=com.bbn.openmap.proj.OrthographicLoader
> > projFactoryLoader.llxyloader.class=com.bbn.openmap.proj.LLXYLoader
> > projFactoryLoader.gnomonicloader.class=com.bbn.openmap.proj.GnomonicLoader
> >
> > in code
> > --
> > Projection proj =
> > ProjectionFactory.makeProjection(projName,mapBean.getProjection())
> >
> > so my question is... how can i load the projection i want as default?
> > thanks for any help you can provide.
> >
> > Pete
> >
> > --
> > [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"]
>
> ---
> Prof Dr Bart Jourquin
> F.U.Ca.M. - G.T.M.
> Chaussée de Binche, 151a, B7000 Mons (Belgium)
> Tel. : +32 65 323293, Fax. : +32 65 315691
> http://www.fucam.ac.be/jourquin
>

--
[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 Feb 18 2005 - 08:06:17 EST

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