Ignore:
Timestamp:
Apr 16, 2010, 12:27:16 AM (15 years ago)
Author:
Pieter Naber
Message:

Something's still wrong with the colors of nodes... Green nodes are placed in the middle of the ocean... However it's bedtime, so bye bye :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/inc/KMLNode.class.php

    r7765 r7775  
    66 */
    77
    8 define('NODE_GREEN', 'greenArrowIcon');
    9 define('NODE_ORANGE', 'orangeArrowIcon');
    10 define('NODE_RED', 'redArrowIcon');
     8define('NODE_GREEN', '#greenArrowIcon');
     9define('NODE_ORANGE', '#orangeArrowIcon');
     10define('NODE_RED', '#redArrowIcon');
    1111
    1212class KMLNode {
     
    1414                <Placemark id="%ID%">
    1515                        <name>%NAME%</name>
    16                         <description>
    17                                 <![CDATA[
    18                                         <img src="http://www.wirelessleiden.nl/sites/wirelessleiden.nl/files/garland-wl_logo.png" alt="Wireless Leiden" title="Wireless Leiden" style="float: right;"/>
    19                                         %DESCRIPTION%
    20                                 ]]>
    21                         </description>
     16                        <description>%NAME%</description>
    2217                        <LookAt>
    2318                                <longitude>%LONGITUDE%</longitude>
    2419                                <latitude>%LATITUDE%</latitude>
    25                                 <altitude>0</altitude>
    26                                 <heading>0</heading>
    27                                 <tilt>0</tilt>
    28                                 <range>500</range>
     20                                <altitude>%OVERALL_ALTITUDE%</altitude>
     21                                <heading>%OVERALL_HEADING%</heading>
     22                                <tilt>%OVERALL_TILT%</tilt>
     23                                <range>%OVERALL_RANGE%</range>
    2924                        </LookAt>
     25                        <ExtendedData>                       
     26                                %EXTENDEDDATA%
     27                        </ExtendedData>
    3028                        <styleUrl>%STYLE%</styleUrl>
    3129                        <Point>
     
    3533                </Placemark>';
    3634
    37         private $id;                                    // ID of the node
    38         private $name;                                  // Name of the node
    39         private $descriptionLocation;   // Location information of the node
    40         private $descriptionStatus;             // Status information of the node
    41         private $longitude;                             // Longitude of the node
    42         private $latitude;                              // Latitude of the node
    43         private $style;                                 // Style of the node
     35        private $id;                            // ID of the node
     36        private $name;                          // Name of the node
     37        private $dataLocation;          // Location information of the node
     38        private $dataStatus;            // Status information of the node
     39        private $longitude;                     // Longitude of the node
     40        private $latitude;                      // Latitude of the node
     41        private $style;                         // Style of the node
    4442
    4543        /*
     
    5250                $this->id = '';
    5351                $this->name = '';
    54                 $this->descriptionLocation = '';
    55                 $this->descriptionStatus = '';
     52                $this->dataLocation = '';
     53                $this->dataStatus = '';
    5654                $this->longitude = 0;
    5755                $this->latitude = 0;
    58                 $this->style = 'orangeArrowIcon';
     56                $this->style = NODE_RED;
    5957        }
    6058
     
    9593         * Returns: -
    9694         */
    97         function setDescriptionLocation($newDescriptionLocation) {
    98                 $this->descriptionLocation = (string) $newDescriptionLocation;
     95        function setDataLocation($newDataLocation) {
     96                $this->dataLocation = (string) $newDataLocation;
    9997        }
    10098
     
    105103         * Returns: -
    106104         */
    107         function setDescriptionStatus($newDescriptionStatus) {
    108                 $this->descriptionStatus = (string) $newDescriptionStatus;
     105        function setDataStatus($newDataStatus) {
     106                $this->dataStatus = (string) $newDataStatus;
    109107        }
    110108
     
    150148                $toString = str_replace('%ID%', $this->id, $toString);
    151149                $toString = str_replace('%NAME%', $this->name, $toString);
    152                 $toString = str_replace('%DESCRIPTION%', $this->descriptionLocation . $this->descriptionStatus, $toString);
     150                $toString = str_replace('%EXTENDEDDATA%', $this->dataLocation . $this->dataStatus, $toString);
    153151                $toString = str_replace('%LONGITUDE%', $this->longitude, $toString);
    154152                $toString = str_replace('%LATITUDE%', $this->latitude, $toString);
Note: See TracChangeset for help on using the changeset viewer.