Changeset 7628
- Timestamp:
- Mar 30, 2010, 9:27:00 AM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/class/KMLFile.class.php
r7627 r7628 23 23 } 24 24 25 function addPlacemark($name, $description, $xcoordinate, $ycoordinate) { 25 function addPlacemark(KMLPlacemark $placemark) { 26 $this->KMLPlacemarks[] = $placemark; 27 } 28 29 function addPlacemark(string $name, string $description, float $xcoordinate, float $ycoordinate) { 26 30 $placemark = new KMLPlacemark(); 27 31 $placemark->setName($name); -
trunk/src/class/KMLPlacemark.class.php
r7627 r7628 37 37 } 38 38 39 function setXCoordinate( string$newXCoordinate) {39 function setXCoordinate(float $newXCoordinate) { 40 40 $this->xCoordinate = $newXCoordinate; 41 41 } 42 42 43 function setYCoordinate( string$newYCoordinate) {43 function setYCoordinate(float $newYCoordinate) { 44 44 $this->yCoordinate = $newYCoordinate; 45 45 } -
trunk/src/index.php
r7627 r7628 10 10 require_once('class/FileHandler.class.php'); 11 11 require_once('class/KMLFile.class.php'); 12 require_once('class/KMLPlacemark.class.php'); 13 14 $kmlPlacemark = new KMLPlacemark(); 15 $kmlPlacemark->setName('Test name'); 16 $kmlPlacemark->setDescription('Test description'); 17 $kmlPlacemark->setXCoordinate(52.138476); 18 $kmlPlacemark->setYCoordinate(4.463046); 12 19 13 20 $kml = new KMLFile(); 14 21 $kml->addPlacemark($kmlPlacemark); 22 echo $kml->toString(); 15 23 ?>
Note:
See TracChangeset
for help on using the changeset viewer.