Geoscience Reference
In-Depth Information
1 #
2 # actmap example -- (c) Claus-Peter R\"uckemann, 2008, 2009
3 #
4
5 #
6 # Active map of Mexico
7 #
8
9 erasePict
10 $w configure -background turquoise
11
12 pack forget .scale .drawmode .tagborderwidth \
13 .poly .line .rect .oval .setcolor
14 pack
forget
.popupmode .optmen_zoom
15
16 openSource
mexico.gas
17 removeGrid
18
19 ##EOF:
Listing 2. Example InfoPoint Binding Data.
This dynamical application can be created by loading the Active Source data with the actmap
framework (Listing 3).
1 /home/cpr/gisig/actmap_sb.sfc mexico.bnd
Listing 3. Example creating the dynamical application.
9.4 InfoPoints Active Source
The following Active Source code (Listing 4) shows a tiny excerpt of the Active Source for the
interactive Map of México containing some main functional parts for the InfoPoint Yucatán
(as shown in Figure
??
).
1 #BCMT-------------------------------------------------
2 ###EN \gisigsnip{Object Data: Country Mexico}
3 ###EN Minimal Active Source example with InfoPoint:
4 ###EN Yucatan (Cancun, Chichen Itza, Tulum).
5 #ECMT-------------------------------------------------
6
proc
create_country_mexico {} {
global w
8 # Yucatan
9 $w create polygon 9.691339i 4.547244i 9.667717i \
10 4.541732i 9.644094i 4.535433i 9.620472i 4.523622i \
11 9.596850i 4.511811i 9.573228i 4.506299i 9.531496i \
12 ...
13 -outline #000000 -width 2 -fill green -tags {itemshape province_yucatan}
14 }
15
16
7
proc
create_country_mexico_bind {} {
global w
18 $w bind province_yucatan <Button-1> {showName "Province Yucatan"}
19 $w bind province_quintana_roo <Button-1> \
20
17
{showName "Province Quintana Roo"}
 
Search WWH ::




Custom Search