Changeset 990 for ZCO/branches/zco3
- Timestamp:
- 10/13/07 09:47:42 (3 years ago)
- Location:
- ZCO/branches/zco3/src/zco
- Files:
-
- 2 modified
-
browser/session.py (modified) (1 diff)
-
interfaces.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ZCO/branches/zco3/src/zco/browser/session.py
r849 r990 114 114 self.data['previousextent'] = self.extent.totuple() 115 115 116 # Assert that the zoom-in limit is not violated117 if self.context.zoomInLimit > 0:118 # Calculate the map scale for the requested extent119 view = View(srs=createObject('zco.srs', self.context.spatialReferenceSystem),120 bbox=extent.totuple(),121 units=self.context.mapUnits)122 scale = view.getscaledenominator(self.size)123 if scale < self.context.zoomInLimit:124 log.info('Map bound at scale 1:%s' % self.context.zoomInLimit)125 v = view.getviewforscale(self.context.zoomInLimit, self.size)126 extent = BoundingBox(v.ul.x, v.lr.y, v.lr.x, v.ul.y)127 116 128 117 # Assert that the maximum extent limit is not violated -
ZCO/branches/zco3/src/zco/interfaces.py
r967 r990 290 290 default=(-180.0, -90.0, 180.0, 90.0)) 291 291 292 zoom InLimit= Int(293 title=_("Zoom -in limit"),292 zoomLevels = Int( 293 title=_("Zoom Levels"), 294 294 description=_("Constrains the map user interface so that users " 295 "are unable to zoom-in past a given map scale. "296 " The value expected here is a map scale denominator. "297 " For example, to limit the users at the scale of"298 " 1:20000, enter the value 20000 here. Leave the"299 " field blank to disable the feature."),295 "are unable to zoom-in past this number of zoom levels. " 296 "Level 0 refers to the max extent of the map, and each. " 297 "additional level shows 4 times more detail. " 298 "The default is 16. As an example, Google Maps currently " 299 "has approx 20 zoom levels, depending on the layer."), 300 300 default=0, 301 301 required=False)
