Changeset 7637 for trunk/src/index.php


Ignore:
Timestamp:
Mar 31, 2010, 1:32:46 PM (15 years ago)
Author:
Pieter Naber
Message:

Updated ErrorHandler to use our LogHandler. Updated LogHandler with an adjustable error level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/index.php

    r7631 r7637  
    1010
    1111// 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);
     12$kmlPlacemark1 = new KMLPlacemark();
     13$kmlPlacemark1->setName('Test name');
     14$kmlPlacemark1->setDescription('Test description');
     15$kmlPlacemark1->setLatitude(52.138476);
     16$kmlPlacemark1->setLongitude(4.463046);
     17$kmlPlacemark1->setStyle(PLACEMARK_GREEN);
    1718
    18 // Creating a KMLFile using our class, add our placemark and echo
     19// Creating a second placemark using our class
     20$kmlPlacemark2 = new KMLPlacemark();
     21$kmlPlacemark2->setName('Placemark 2 name');
     22$kmlPlacemark2->setDescription('This is the second placemark description');
     23$kmlPlacemark2->setLatitude(52.638476);
     24$kmlPlacemark2->setLongitude(4.063046);
     25$kmlPlacemark2->setStyle(PLACEMARK_ORANGE);
     26
     27// Creating a KMLFile using our class, add our placemarks and echo
    1928$kml = new KMLFile();
    20 $kml->addPlacemark($kmlPlacemark);
     29$kml->addPlacemark($kmlPlacemark1);
     30$kml->addPlacemark($kmlPlacemark2);
    2131echo $kml->toString();
    2232
    2333// Let's try to read the node status file
    2434$nodeStatus = new FileHandler($config['node_status_file']);
    25 $kmlFile = KMLFile::parseFile($nodeStatus);
     35$kmlFile = KMLFile::parseFile($nodeStatus->getFile());
    2636?>
Note: See TracChangeset for help on using the changeset viewer.