Last change
on this file since 7827 was 7799, checked in by Pieter Naber, 15 years ago |
Small bug fixing + formating code
|
-
Property svn:eol-style
set to
native
|
File size:
869 bytes
|
Line | |
---|
1 | <?php
|
---|
2 | /*
|
---|
3 | * Project: NodeMap2.0
|
---|
4 | * File: kml-echo.php
|
---|
5 | * Purpose: Echo our KML file directly (great for testing)
|
---|
6 | */
|
---|
7 |
|
---|
8 | require_once('config.php');
|
---|
9 | require_once($config['file_init']);
|
---|
10 |
|
---|
11 | // Make it parse properly within Firefox so that it will display a DOM tree
|
---|
12 | header('Content-Type: text/xml');
|
---|
13 | echo '<?xml version="1.0" encoding="UTF-8"?>';
|
---|
14 |
|
---|
15 | // Let's try reading from files and parsing the data in the files.
|
---|
16 | // First off, we create a new KMLFile object
|
---|
17 | $kmlFile = new KMLFile();
|
---|
18 |
|
---|
19 | // Let's try to read the node location file
|
---|
20 | $nodeLocation = new FileHandler($config['node_location_file'], 'r');
|
---|
21 | $kmlFile->parseLocationFile($nodeLocation->read());
|
---|
22 |
|
---|
23 | // Let's try to read the node status file
|
---|
24 | $nodeStatus = new FileHandler($config['node_status_file'], 'r');
|
---|
25 | $kmlFile->parseStatusFile($nodeStatus->read());
|
---|
26 |
|
---|
27 | // And echo the result to the screen
|
---|
28 | echo $kmlFile->toString();
|
---|
29 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.