Last change
on this file since 6285 was
6285,
checked in by ldelgass, 9 years ago
|
Fix examples for running with tclsh
|
File size:
818 bytes
|
Line | |
---|
1 | package require Tk |
---|
2 | package require Rappture |
---|
3 | package require RapptureGUI |
---|
4 | |
---|
5 | Rappture::resources::load |
---|
6 | |
---|
7 | set commondir [file join [file dirname [info script]] .. common] |
---|
8 | source [file join $commondir geovis_settings.tcl] |
---|
9 | |
---|
10 | set width 400 |
---|
11 | set height 300 |
---|
12 | wm geometry . ${width}x${height} |
---|
13 | update |
---|
14 | |
---|
15 | set mapviewer [Rappture::MapViewer .g] |
---|
16 | |
---|
17 | pack .g -expand yes -fill both |
---|
18 | |
---|
19 | # create an TMS layer |
---|
20 | array set tmsParams { |
---|
21 | url {http://readymap.org/readymap/tiles/1.0.0/7/} |
---|
22 | } |
---|
23 | array set layerParams { |
---|
24 | label "ReadyMap Aerial" |
---|
25 | description "ReadyMap Satellite/Aerial Imagery" |
---|
26 | } |
---|
27 | |
---|
28 | # create a map object |
---|
29 | set map [Rappture::Map #auto] |
---|
30 | |
---|
31 | # add all layers to the map object |
---|
32 | $map addLayer image \ |
---|
33 | readymap [array get layerParams] \ |
---|
34 | tms [array get tmsParams] |
---|
35 | |
---|
36 | # add a map to the vis client |
---|
37 | $mapviewer scale $map |
---|
38 | $mapviewer add $map |
---|
Note: See
TracBrowser
for help on using the repository browser.