Last change
on this file since 7631 was 7631, checked in by Pieter Naber, 15 years ago |
Fixed a lot of bugs, introduced KMLFile::parseFile for parsing the node status file
|
File size:
729 bytes
|
Rev | Line | |
---|
[7622] | 1 | <?
|
---|
| 2 | /*
|
---|
| 3 | * Project: NodeMap2.0
|
---|
| 4 | * File: index.php
|
---|
| 5 | * Purpose: Main index file of application
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[7629] | 8 | require_once('config.php');
|
---|
| 9 | require_once($config['file_init']);
|
---|
[7622] | 10 |
|
---|
[7629] | 11 | // Creating a placemark using our class
|
---|
[7628] | 12 | $kmlPlacemark = new KMLPlacemark();
|
---|
| 13 | $kmlPlacemark->setName('Test name');
|
---|
| 14 | $kmlPlacemark->setDescription('Test description');
|
---|
| 15 | $kmlPlacemark->setXCoordinate(52.138476);
|
---|
| 16 | $kmlPlacemark->setYCoordinate(4.463046);
|
---|
| 17 |
|
---|
[7629] | 18 | // Creating a KMLFile using our class, add our placemark and echo
|
---|
[7627] | 19 | $kml = new KMLFile();
|
---|
[7628] | 20 | $kml->addPlacemark($kmlPlacemark);
|
---|
| 21 | echo $kml->toString();
|
---|
[7629] | 22 |
|
---|
| 23 | // Let's try to read the node status file
|
---|
| 24 | $nodeStatus = new FileHandler($config['node_status_file']);
|
---|
[7631] | 25 | $kmlFile = KMLFile::parseFile($nodeStatus);
|
---|
[7622] | 26 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.