コード例 #1
0
        /// <summary>
        ///  Return a string in KML format containing all pre animation definitions
        ///  that are required for the aircraft
        /// </summary>
        /// <returns></returns>
        public string KMLSetup()
        {
            GeoPoint3D startingPoint = _trajectory.GeoPoint(0);

            return(@"
<Style id=""pushpin"">
    <IconStyle>
        <scale>0</scale>
    </IconStyle>
    <LabelStyle>
        <color>FFFFFFFF</color>
        <scale>0.45</scale>
    </LabelStyle>
</Style >

<Placemark>
	<name>Aircraft model</name>
	<Model id='model'>
	    <visibility>0</visibility>
		<altitudeMode>absolute</altitudeMode>
		<Location id='model_location'>
			<latitude>"             + startingPoint.Latitude + @"</latitude>
			<longitude>"             + startingPoint.Longitude + @"</longitude>
			<altitude>"             + startingPoint.Z + @"</altitude>
		</Location>
		<Orientation id='model_orientation'>
                <heading>" + _trajectory.Heading(0) + @"</heading>
                <tilt>" + _trajectory.Tilt(0) + @"</tilt>
                <roll>" + _trajectory.BankAngle(0) + @"</roll>
		</Orientation>
		<Scale id='model_scale'>
			<x>3.5</x>
			<y>3.5</y>
			<z>3.5</z>
		</Scale>
		<Link>
			<href>"             + _aircraft.Model + @"</href>
		</Link>
	</Model>
</Placemark>

<Placemark id='pin'>
	<name>"     + _aircraft.Model.ToString().Remove(_aircraft.Model.ToString().Length - 4) + @"</name>
    <styleUrl>#pushpin</styleUrl>
    <altitudeMode>absolute</altitudeMode>
	<MultiGeometry>
		<Point id='aircraftpin'>
            <altitudeMode>absolute</altitudeMode>
			<coordinates>4.73729753494263,52.2891273498535,10.668</coordinates>
		</Point>		
		<Polygon>
		</Polygon>
	</MultiGeometry>
</Placemark>
                    ");
        }