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