(MapCanvas.__init__): New instance variable
current_map_proj to remember the current map projection so that
when the projection changes we know what the previous projection
was.
(MapCanvas.SetMap): Unsubscribe and subscribe to
LAYER_PROJECTION_CHANGED events.
(MapCanvas.projection_changed): Split into two methods that respond
to map and layer projection changes.
(MapCanvas.map_projection_changed): New. Takes the current view and
projects it using the new projection. This does not cause the
map to be redrawn at full extent.
(MapCanvas.layer_projection_changed): New. Cause a redraw which
will draw each layer in its new projection.
|