Re: [OpenMap Users] Setting minimum scale for open map (UNCLASSIFIED)

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Mon, 10 Jan 2011 16:37:58 -0500

Hi Ben,

Don't forget, you can always add that functionality yourself by making
the component you are using to set the min scale an OMComponent (or
have it implement PropertyConsumer) and have it created in the
properties file (openmap.components property), reading the properties
you set for it.

If you extend OMComponent you get to inherit all the
BeanContextMembershipListener functionality that makes it easy to find
other components in your application, via the findAndInit(Object)
method.

Cheers,

Don


On Thu, Jan 6, 2011 at 2:13 PM, Kacirek, Benjamin P Mr CIV USA OSA
<ben.kacirek_at_us.army.mil> wrote:
> Classification: UNCLASSIFIED
> Caveats: NONE
>
> Thanks for the tip. I tried setMinScale(float) and it worked. Turns out I
> was calling it in the wrong part of our code at first. This is a good
> temporary measure but I feel like it would be better if a projection's
> minimum scale could be set in the openmap.properties file. As our users'
> needs change the minimum scale may also change. It would be great if they
> could set the minimum scale in the properties file.
>
> -----Original Message-----
> From: Brightwell, William [mailto:wbrightwell_at_mtcsc.com]
> Sent: Thursday, January 06, 2011 10:58 AM
> To: Kacirek, Benjamin P Mr CIV USA OSA; openmap-users_at_bbn.com
> Subject: Re: [OpenMap Users] Setting minimum scale for open map
> (UNCLASSIFIED)
>
> Have you tried using "setMinScale(float)" on the projection?  I just
> shooting from the hip on this one.
>
> -Adam
>
> --
> W. Adam Brightwell
> Software Engineer, MTCSC
> Certified Scrum Master
>
> Email:  wbrightwell_at_mtcsc.com
> DCO:    william.brightwell_at_chat.dco.dod.mil
> Office: 843-856-1935/1985 x51632
> Cell:   843-810-8701
>
>
>
>> From: "Kacirek, Benjamin P Mr CIV USA OSA" <ben.kacirek_at_us.army.mil>
>> Date: Thu, 6 Jan 2011 10:53:02 -0600
>> To: William Brightwell <wbrightwell_at_mtcsc.com>,
>> <openmap-users_at_bbn.com>
>> Subject: RE: [OpenMap Users] Setting minimum scale for open map
>> (UNCLASSIFIED)
>>
>> Classification: UNCLASSIFIED
>> Caveats: NONE
>>
>> The first one is true actually. I am trying to restrict the map from
>> "zooming" past a particular scale. Like I said right now the map stops
>> at 1:500. I want to set that number higher like 1:30000 and have
>> "zooming" stop there.
>>
>> -----Original Message-----
>> From: Brightwell, William [mailto:wbrightwell_at_mtcsc.com]
>> Sent: Thursday, January 06, 2011 10:39 AM
>> To: Kacirek, Benjamin P CIV US USA TRADOC; openmap-users_at_bbn.com
>> Subject: Re: [OpenMap Users] Setting minimum scale for open map
>> (UNCLASSIFIED)
>>
>> Ben,
>>
>> Are you trying to restrict the map from "zooming" to a particular
>> scale?  Or are you wanting to restrict a particular layer from
>> rendering/generating at or past a particular scale?
>>
>> If the second is true, you can override the layer's "generate" method
>> and get the scale from the projection and limit there... Something like
> this...
>>
>> if (proj.getScale() > minScale) {
>>   super.generate(proj);
>> }
>>
>> The same would suffice for a custom layer as well.  Hope this helps.
>>
>> -Adam
>>
>>
>> --
>> W. Adam Brightwell
>> Software Engineer, MTCSC
>> Certified Scrum Master
>>
>> Email:  wbrightwell_at_mtcsc.com
>> DCO:    william.brightwell_at_chat.dco.dod.mil
>> Office: 843-856-1935/1985 x51632
>> Cell:   843-810-8701
>>
>>
>>
>>> From: "Kacirek, Benjamin P CIV US USA TRADOC"
>>> <ben.kacirek_at_us.army.mil>
>>> Date: Thu, 6 Jan 2011 10:13:48 -0600
>>> To: <openmap-users_at_bbn.com>
>>> Subject: [OpenMap Users] Setting minimum scale for open map
>>> (UNCLASSIFIED)
>>>
>>> Classification: UNCLASSIFIED
>>> Caveats: NONE
>>>
>>> I am trying to set the minimum scale for openmap. Right now when I
>>> scroll in using the mouse wheel the scale stops at 1:500. The minimum
>>> scale needs to be higher for my needs. I was hoping to set the
>>> minimum scale in the openmap.properties but I could not find any
>>> documentation on how to do so. Can this be done in the
>>> openmap.properties file? For example, I tried layerName.minscale =
>>> 3000 and layerName.min.scale = 3000 but neither worked in the file. Any
> info is appreciated.
>>>
>>> Thanks,
>>>
>>> Ben
>>>
>>> Classification: UNCLASSIFIED
>>> Caveats: NONE
>>>
>>>
>>> --
>>> [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"]
>>
>> Classification: UNCLASSIFIED
>> Caveats: NONE
>>
>>
>>
>
> --
> [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"]
> Classification: UNCLASSIFIED
> Caveats: NONE
>
>
>
> --
> [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"]
>

--
[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 Mon Jan 10 2011 - 16:39:20 EST

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