tklib (0.5-3) osm.diff

Summary

 examples/canvas/osm.tcl |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

    
download this patch

Patch contents

Patch fixes the openstreetmap demo.

--- tklib-0.5.orig/examples/canvas/osm.tcl
+++ tklib-0.5/examples/canvas/osm.tcl
@@ -38,17 +38,12 @@
 ##       separate packages, etc.
 
 # ### ### ### ######### ######### #########
-## Use canvas package relative to example location.
+## Use canvas package
 
 set selfdir  [file dirname [file normalize [info script]]]
-set modules  [file join [file dirname [file dirname $selfdir]] modules]
-set lmodule  [file join [file dirname [file dirname [file dirname [file dirname $selfdir]]]] Tcllib Head modules]
 
-set dir $lmodule/map
-source $lmodule/map/pkgIndex.tcl
-unset dir
-source $modules/canvas/canvas_sqmap.tcl ; # The main map support
-source $modules/canvas/canvas_zoom.tcl  ; # Zoom control
+package require canvas::sqmap
+package require canvas::zoom
 
 ## Ideas:
 ## == DONE ==
@@ -288,6 +283,8 @@
 
     #puts ".z = $level"
 
+    if {$level<0} { set level 0 }
+
     set rlength [map::slippy length $level]
     set region  [list 0 0 $rlength $rlength]