src/AircraftTrajectories/Models/Visualisation/KML/AnimationSections/FitnessGroundPlotKMLAnimator.cs
/// <summary>
///  Return a string in KML format containing all pre animation definitions 
///  that are required for the plotted ground path
/// </summary>
/// <returns></returns>
Return a string in KML format containing all pre animation definitions
that are required for the plotted ground path
Return a string in KML format containing all pre animation definitions that are required for the plotted ground path
public string KMLSetup()
        {
            Color bestColor = Color.FromArgb(220, 255, 255, 255);
            Color c1 = Color.FromArgb(220, 20, 240, 0);
            Color c2 = Color.FromArgb(220, 20, 0, 255);
            Color[] colors = interpolateColors(c1, c2, max-min+1);
            string contourSetup = @"
<Folder>
    <open>0</open>
    <name>Groundpaths</name>
            ";
            for (int i = 0; i < _trajectories.Count; i++)
            {
                var c = colors[(int) _trajectories[i].Fitness - min];
                int width = 80;
                if (_trajectories[i].Fitness == TrajectoryFitness.Best)
                {
                    c = bestColor;
                    width = 200;
                }
                contourSetup += @"
<Style id='multipleplotground_style" + i + @"'>
	<LineStyle>
		<color>30F0BE14</color>
		<gx:physicalWidth>" + width + @"</gx:physicalWidth>
		<gx:outerColor>" + string.Format("{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B) + @"</gx:outerColor>
		<gx:outerWidth>0.95</gx:outerWidth>
	</LineStyle>
</Style>
<Placemark id='multipleplotground_placemark'>
    <name>Plotground</name>
    <styleUrl>#multipleplotground_style" + i + @"</styleUrl>
    <LineString id='multipleplotground" + i + @"'>
        <extrude>0</extrude>
        <tesselate>0</tesselate>
        <altitudeMode>absolute</altitudeMode>
        <coordinates>
4.75251913070679,52.3099670410156,0
4.75250101089478,52.3100242614746,0
4.75250101089478,52.3099365234375,0
4.75250101089478,52.3098793029785,0
4.75248289108276,52.3098487854004,0
4.75248289108276,52.3098220825195,0
4.75246524810791,52.3097610473633,0
4.7524471282959,52.3097343444824,0
        </coordinates>
    </LineString>
</Placemark>
                ";
            }
            contourSetup += "</Folder>";
            return contourSetup;
        }
public string KMLSetup ( ) { Color bestColor = Color . FromArgb ( 220 , 255 , 255 , 255 ) ; Color c1 = Color . FromArgb ( 220 , 20 , 240 , 0 ) ; Color c2 = Color . FromArgb ( 220 , 20 , 0 , 255 ) ; Color [ ] colors = interpolateColors ( c1 , c2 , max - min + 1 ) ; string contourSetup = @"
<Folder>
    <open>0</open>
    <name>Groundpaths</name>
            " ; for ( int i = 0 ; i < _trajectories . Count ; i ++ ) { var c = colors [ ( int ) _trajectories [ i ] . Fitness - min ] ; int width = 80 ; if ( _trajectories [ i ] . Fitness == TrajectoryFitness . Best ) { c = bestColor ; width = 200 ; } contourSetup += @"
<Style id='multipleplotground_style" + i + @"'>
	<LineStyle>
		<color>30F0BE14</color>
		<gx:physicalWidth>" + width + @"</gx:physicalWidth>
		<gx:outerColor>" + string . Format ( " " , c . A , c . R , c . G , c . B ) + @"</gx:outerColor>
		<gx:outerWidth>0.95</gx:outerWidth>
	</LineStyle>
</Style>
<Placemark id='multipleplotground_placemark'>
    <name>Plotground</name>
    <styleUrl>#multipleplotground_style" + i + @"</styleUrl>
    <LineString id='multipleplotground" + i + @"'>
        <extrude>0</extrude>
        <tesselate>0</tesselate>
        <altitudeMode>absolute</altitudeMode>
        <coordinates>
4.75251913070679,52.3099670410156,0
4.75250101089478,52.3100242614746,0
4.75250101089478,52.3099365234375,0
4.75250101089478,52.3098793029785,0
4.75248289108276,52.3098487854004,0
4.75248289108276,52.3098220825195,0
4.75246524810791,52.3097610473633,0
4.7524471282959,52.3097343444824,0
        </coordinates>
    </LineString>
</Placemark>
                " ; } contourSetup += " " ; return contourSetup ; }
Return a string in KML format containing all pre animation definitions
that are required for the plotted ground path
Return a string in KML format containing all pre animation definitions that are required for the plotted ground path
None