/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/map.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/map.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 559 by jonathan, Wed Mar 26 11:05:33 2003 UTC revision 931 by jonathan, Tue May 20 15:23:18 2003 UTC
# Line 7  Line 7 
7    
8  __version__ = "$Revision$"  __version__ = "$Revision$"
9    
10  #from messages import MAP_LAYERS_CHANGED, MAP_PROJECTION_CHANGED, \  from messages import MAP_LAYERS_CHANGED, MAP_PROJECTION_CHANGED, \
11       #CHANGED, LAYER_PROJECTION_CHANGED, LAYER_LEGEND_CHANGED, \       CHANGED, LAYER_PROJECTION_CHANGED, LAYER_LEGEND_CHANGED, \
12       #LAYER_VISIBILITY_CHANGED       LAYER_VISIBILITY_CHANGED, LAYER_CHANGED, MAP_STACKING_CHANGED, \
13         MAP_LAYERS_ADDED, MAP_LAYERS_REMOVED
 from messages import *  
14    
15  from Thuban import _  from Thuban import _
16    
# Line 20  from base import TitledObject, Modifiabl Line 19  from base import TitledObject, Modifiabl
19  from label import LabelLayer  from label import LabelLayer
20    
21    
   
22  class Map(TitledObject, Modifiable):  class Map(TitledObject, Modifiable):
23    
24      """Represent a map. A map is simply a list of layers.      """Represent a map. A map is simply a list of layers.
# Line 159  class Map(TitledObject, Modifiable): Line 157  class Map(TitledObject, Modifiable):
157          for layer in self.layers:          for layer in self.layers:
158              if layer is self.label_layer:              if layer is self.label_layer:
159                  continue                  continue
160              # the layer's bbox may be None if it doesn't have any layers              # the layer's bbox may be None if it doesn't have any shapes
161              bbox = layer.LatLongBoundingBox()              bbox = layer.LatLongBoundingBox()
162              if bbox is not None:              if bbox is not None:
163                  left, bottom, right, top = bbox                  left, bottom, right, top = bbox
# Line 186  class Map(TitledObject, Modifiable): Line 184  class Map(TitledObject, Modifiable):
184              bbox = self.projection.ForwardBBox(bbox)              bbox = self.projection.ForwardBBox(bbox)
185          return bbox          return bbox
186    
187        def GetProjection(self):
188            return self.projection
189    
190      def SetProjection(self, projection):      def SetProjection(self, projection):
191          """Set the projection of the map.          """Set the projection of the map.
192    

Legend:
Removed from v.559  
changed lines
  Added in v.931

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26