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

From: Brightwell, William <wbrightwell_at_mtcsc.com>
Date: Thu, 6 Jan 2011 16:39:17 +0000

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"]
--
[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 Thu Jan 06 2011 - 11:52:51 EST

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