Skip to content

Commit 8c05627

Browse files
committed
Initial version of an old demo...
0 parents  commit 8c05627

File tree

172 files changed

+13318
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+13318
-0
lines changed

README

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This is cleaned up version of the application/data used at the 1st MapServer User Meeting in
2+
the "Advanced Interfaces" workshop.
3+
4+
It is intended to take users from a basic MapServer web application to a full-featured
5+
DHTML-based frontend. It demonstrates topic like URL-based configuration, virtual images
6+
for panning, frames and DHTML.
7+
8+
To install:
9+
10+
- unpack workshop.zip someplace in your web tree
11+
- edit "index.html" to reflect your configuration (there are 2 sets of comments marking
12+
the sections that need to be changed)
13+
- edit "itasca.map" to reflect your configuration (the WEB section, paramters IMAGEPATH and IMAGEURL need to be changed)
14+
- point your browser at index.html and it should work
15+
16+
Requirements:
17+
18+
- MapServer version 7.0, basic build
19+
20+
Questions and/or comments should be sent to Stephen Lime, <[email protected]>.

blank.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2+
<HTML>
3+
<HEAD>
4+
<TITLE> A blank page... </TITLE>
5+
</HEAD>
6+
7+
<BODY BGCOLOR="#ffffff">
8+
9+
This is the query result frame...
10+
11+
</BODY>
12+
</HTML>

data/airports.dbf

1.75 KB
Binary file not shown.

data/airports.pl

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/usr/bin/perl
2+
3+
use XBase;
4+
use mapscript;
5+
6+
sub clean() {
7+
my ($file) = @_;
8+
9+
foreach $extension ('.shp', '.shx', '.dbf', '.qix') {
10+
unlink $file.$extension;
11+
}
12+
}
13+
14+
&clean('airports');
15+
16+
$shapefile = new shapefileObj("airports", 1) or die("Error creating shapefile airports.");
17+
$table = XBase->create("name" => "airports",
18+
"field_names" => ["NAME", "LAT", "LON", "ELEVATION", "QUADNAME"],
19+
"field_types" => ["C", "N", "N", "N", "C"],
20+
"field_lengths" => [64, 12, 12, 12, 32],
21+
"field_decimals" => [0, 4, 4, 4, 0]) or die XBase->errstr;
22+
23+
$point = new pointObj();
24+
25+
$point->{x} = 451306.0000;
26+
$point->{y} = 5291930.0000;
27+
$shapefile->addPoint($point);
28+
$table->set_record(0, 'Bigfork Municipal Airport', 47.7789, -93.6500, 1343.0000, 'Effie');
29+
30+
$point->{x} = 469137.0000;
31+
$point->{y} = 5271647.0000;
32+
$shapefile->addPoint($point);
33+
$table->set_record(1, 'Bolduc Seaplane Base', 47.5975, -93.4106, 1325.0000, 'Balsam Lake');
34+
35+
$point->{x} = 434634.0000;
36+
$point->{y} = 5267578.0000;
37+
$shapefile->addPoint($point);
38+
$table->set_record(2, 'Bowstring Municipal Airport', 47.5583, -93.8689, 1372.0000, 'Jessie Lake');
39+
40+
$point->{x} = 454146.0000;
41+
$point->{y} = 5274617.0000;
42+
$shapefile->addPoint($point);
43+
$table->set_record(3, 'Burns Lake Seaplane Base', 47.6233, -93.6103, 1357.0000, 'Clubhouse Lake');
44+
45+
$point->{x} = 495913.0000;
46+
$point->{y} = 5279532.0000;
47+
$shapefile->addPoint($point);
48+
$table->set_record(4, 'Christenson Point Seaplane Base', 47.6692, -93.0544, 1372.0000, 'Side Lake');
49+
50+
$point->{x} = 439581.0000;
51+
$point->{y} = 5244617.0000;
52+
$shapefile->addPoint($point);
53+
$table->set_record(5, 'Deer River Municipal Airport', 47.3522, -93.8000, 1311.0000, 'Deer River');
54+
55+
$point->{x} = 493040.0000;
56+
$point->{y} = 5230604.0000;
57+
$shapefile->addPoint($point);
58+
$table->set_record(6, 'Gospel Ranch Airport', 47.2289, -93.0919, 1394.0000, 'Floodwood Lake');
59+
60+
$point->{x} = 461401.0000;
61+
$point->{y} = 5228719.0000;
62+
$shapefile->addPoint($point);
63+
$table->set_record(7, 'Grand Rapids-Itasca County/Gordon Newstrom Field', 47.2108, -93.5097, 1355.0000, 'Grand Rapids');
64+
65+
$point->{x} = 455305.0000;
66+
$point->{y} = 5240463.0000;
67+
$shapefile->addPoint($point);
68+
$table->set_record(8, 'Richter Ranch Airport', 47.3161, -93.5914, 1340.0000, 'Cohasset East');
69+
70+
$point->{x} = 471043.0000;
71+
$point->{y} = 5251664.0000;
72+
$shapefile->addPoint($point);
73+
$table->set_record(9, 'Shaughnessy Seaplane Base', 47.4178, -93.3839, 1300.0000, 'Lawrence Lake West');
74+
75+
$point->{x} = 496393.0000;
76+
$point->{y} = 5280458.0000;
77+
$shapefile->addPoint($point);
78+
$table->set_record(10, 'Sixberrys Landing Seaplane Base', 47.6775, -93.0481, 1372.0000, 'Side Lake');
79+
80+
$point->{x} = 444049.0000;
81+
$point->{y} = 5277360.0000;
82+
$shapefile->addPoint($point);
83+
$table->set_record(11, 'Snells Seaplane Base', 47.6472, -93.7450, 1351.0000, 'Bigfork');
84+
85+
$table->close(); # save the files
86+
undef $shapefile;
87+
88+
exit 0;

data/airports.shp

436 Bytes
Binary file not shown.

data/airports.shx

196 Bytes
Binary file not shown.

data/createquery.pl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/perl
2+
3+
use XBase;
4+
5+
$file = 'airports';
6+
7+
$table = new XBase "$file.dbf" or die XBase->errstr;
8+
9+
@items = $table->field_names();
10+
11+
# query header
12+
open(STREAM, ">". $file ."_header.html") or die "Unable to open query header.\n";
13+
print STREAM "<font size+1><b>Layer: $file</b></font><p>\n";
14+
print STREAM "<table cellpadding=5 cellspacing=2 border=0>\n";
15+
print STREAM "<tr bgcolor=#CCCCCC>";
16+
foreach (@items) {
17+
print STREAM "<th>". $_ ."</th>";
18+
}
19+
print STREAM "</tr>\n";
20+
close(STREAM);
21+
22+
# query template
23+
open(STREAM, ">". $file .".html") or die "Unable to open query template.\n";
24+
print STREAM "<tr>";
25+
foreach (@items) {
26+
print STREAM "<td>[". $_ ."]</td>";
27+
}
28+
print STREAM "</tr>\n";
29+
close(STREAM);
30+
31+
# query footer
32+
open(STREAM, ">". $file ."_footer.html") or die "Unable to open query footer.\n";
33+
print STREAM "</table><p>\n";
34+
close(STREAM);
35+
36+
$table->close();

data/ctybdpy2.dbf

8.36 KB
Binary file not shown.

data/ctybdpy2.shp

1.04 MB
Binary file not shown.

data/ctybdpy2.shx

948 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)