Re: [OpenMap Users] upgrading from 4.6.0 to 4.6.2

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 18 Feb 2005 08:16:28 -0500

Hi Peter,

It's weird that the ProjectionFactory isn't returning a set of
projection classes available, your properties look OK. The default
projection can be set in the openmap.properties file, by listing the
class of the default projection where you used to use the projection's
id name.

for instance:
openmap.Projection=com.bbn.openmap.proj.CADRG

But if the ProjectionFactory isn't being loaded properly, it'll return
a Mercator projection.

You can run with the -Ddebug.componentfactory flag to make sure the
different components are being created at startup.

-Don

On Feb 18, 2005, at 8:05 AM, Peter Wilkes wrote:

> 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.MercatorL
>>> oader
>>> projFactoryLoader.cadrgloader.class=com.bbn.openmap.proj.CADRGLoader
>>> projFactoryLoader.ortholoader.class=com.bbn.openmap.proj.Orthographic
>>> Loader
>>> projFactoryLoader.llxyloader.class=com.bbn.openmap.proj.LLXYLoader
>>> projFactoryLoader.gnomonicloader.class=com.bbn.openmap.proj.GnomonicL
>>> oader
>>>
>>> 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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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:19:17 EST

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