?? google earth kml file creator class.htm
字號:
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.cs-clrtype, li.cs-clrtype, div.cs-clrtype
{mso-style-name:cs-clrtype;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.vb-keyword, li.vb-keyword, div.vb-keyword
{mso-style-name:vb-keyword;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.vb-statement, li.vb-statement, div.vb-statement
{mso-style-name:vb-statement;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.clsbutton, li.clsbutton, div.clsbutton
{mso-style-name:clsbutton;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
background:#FF9900;
border:none;
mso-border-alt:solid #FF9900 .75pt;
padding:0cm;
mso-padding-alt:0cm 0cm 0cm 0cm;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.clsbuttonlnk, li.clsbuttonlnk, div.clsbuttonlnk
{mso-style-name:clsbuttonlnk;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.headline, li.headline, div.headline
{mso-style-name:headline;
mso-margin-top-alt:auto;
margin-right:0cm;
margin-bottom:3.75pt;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.sidebar, li.sidebar, div.sidebar
{mso-style-name:sidebar;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:9.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.navbar, li.navbar, div.navbar
{mso-style-name:navbar;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.adlink, li.adlink, div.adlink
{mso-style-name:adlink;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.infobar, li.infobar, div.infobar
{mso-style-name:infobar;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.infobarlist, li.infobarlist, div.infobarlist
{mso-style-name:infobarlist;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:18.0pt;
text-indent:-18.0pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.infobarheader, li.infobarheader, div.infobarheader
{mso-style-name:infobarheader;
mso-margin-top-alt:auto;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:9.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.hoverlink, li.hoverlink, div.hoverlink
{mso-style-name:hoverlink;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
background:#FBEDBB;
border:none;
mso-border-alt:solid #FBEDBB .75pt;
padding:0cm;
mso-padding-alt:1.0pt 2.0pt 1.0pt 2.0pt;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.links, li.links, div.links
{mso-style-name:links;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.messagetitle, li.messagetitle, div.messagetitle
{mso-style-name:messagetitle;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.sitenewsheading, li.sitenewsheading, div.sitenewsheading
{mso-style-name:sitenewsheading;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.featurebox, li.featurebox, div.featurebox
{mso-style-name:featurebox;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
background:#A5C9EF;
border:none;
mso-border-alt:solid #6699CC .75pt;
padding:0cm;
mso-padding-alt:2.0pt 2.0pt 2.0pt 2.0pt;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.featureboxheader, li.featureboxheader, div.featureboxheader
{mso-style-name:featureboxheader;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:13.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";
font-weight:bold;}
p.featureboxheaderarrow, li.featureboxheaderarrow, div.featureboxheaderarrow
{mso-style-name:featureboxheaderarrow;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
background:#6699CC;
font-size:10.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
p.adlink1, li.adlink1, div.adlink1
{mso-style-name:adlink1;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:8.0pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes}
span.GramE
{mso-style-name:"";
mso-gram-e:yes}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1442645390;
mso-list-template-ids:1993620532;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:36.0pt'
color="#000000">
<div class=Section1><pre><b><span style='color:black'><o:p><font size="4"> </font></o:p></span></b><span
style='color:black'><b><font size="4"><span
class=SpellE>Google</span> Earth KML File Creator Class</font></b><o:p></o:p></span></pre><pre><span
style='color:black'>Title:<span style='mso-spacerun:yes'> </span><span
class=SpellE>Google</span> Earth KML File Creator Class<o:p></o:p></span></pre><pre><span
style='color:black'>Author:<span style='mso-spacerun:yes'> </span>Ian John Grech<o:p></o:p></span></pre><pre><span
style='color:black'>Email:<span style='mso-spacerun:yes'> </span><span
class=SpellE>iangrech@nextgen.net.mt</span><o:p></o:p></span></pre><pre><span
style='color:black'>Member ID:<span style='mso-spacerun:yes'> </span>12345<o:p></o:p></span></pre><pre><span
style='color:black'>Language:<span style='mso-spacerun:yes'> </span>C# 2.0<o:p></o:p></span></pre><pre><span
style='color:black'>Platform:<span style='mso-spacerun:yes'> </span>.NET 2.0<o:p></o:p></span></pre><pre><span
style='color:black'>Technology:<span style='mso-spacerun:yes'> </span><o:p></o:p></span></pre><pre><span
style='color:black'>Level:<span style='mso-spacerun:yes'> </span>Beginner<o:p></o:p></span></pre><pre><span
style='color:black'>Description: Provides an introductory class to create <span
class=SpellE>Google</span> Earth KML files<o:p></o:p></span></pre><pre><span
style='color:black'>Section<span style='mso-spacerun:yes'> General </span>C# <o:p></o:p></span></pre><pre><span
class=SpellE><span style='color:black'>SubSection</span></span><span
style='color:black'><span style='mso-spacerun:yes'> C# Samples \ General</span></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:9.0pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:9.0pt;font-family:Verdana;
color:black'><a href="Article_demo.zip"><!------------------------------- STEP 2 ---------------------------><!-- Include download and sample image information. -->Download
demo project - XXX Kb </a><o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:9.0pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:9.0pt;font-family:Verdana;
color:black'><a href="Article_src.zip">Download source - XXX Kb</a><o:p></o:p></span></p>
<p><o:p> </o:p></p>
<h2><!------------------------------- STEP 3 ---------------------------><!-- Add the article text. Please use simple formatting (<h2>, <p> etc) -->Introduction</h2>
<p><span style="font-family: Verdana"><font size="2">This projects provides a
very simple class that can be used to create Google Earth KML Files. Only two
formats are shown in the code, namely Point and LineString, but these should
provide enough background to allow anyone to continue coding their own KML files
based on the KML Object Model.</font></span></p>
<h2>Reference</h2>
<p>The KML Reference is available <a
href="http://earth.google.com/kml/kml_tags_21.html">here</a>. </p>
<h2>Using the code</h2>
<p>The core of the project is the KMLCreator.cs. This has three classes,
KMLCoordinates, KMLPoint and KMLLine</p>
<p>KMLCoordinates is used by both KMLPoint and KMLLine. It contains the
Longitude, Latitude and Altitude of a specific coordinate in space.</p>
<p>KMLPoint will create a Pin with location specified by the KMLCoordinates. </p>
<p>KMLLine will create a Line with locations specified by a Generic List of
KMLCoordinates. </p>
<p>The classes have some hard coded attributes which a developer can amend if,
and as required. Coding is very basic and should be easy to understand. the
'hardest' part is the use of the XMLTextWriter class.</p>
<p>Note: In writing I used curly braces to help segregate and ident the code in the
same manner as it should appear in XML. This is for no particular reason other
than to help visualize the output during coding.</p>
<p>Typical usage is as follows: </p>
<pre><code>
//Generic List of KML Coords
List<KMLCoordinates> l = new List<KMLCoordinates>();
//Sample KML Coords for a Line
l.Add(new KMLCoordinates(0.0, 51.0));
l.Add(new KMLCoordinates(0.2, 51.01));
l.Add(new KMLCoordinates(-0.1, 51.03));
l.Add(new KMLCoordinates(0.03, 51.01));
l.Add(new KMLCoordinates(-0.5, 51.05));
l.Add(new KMLCoordinates(0.5, 51.05));
l.Add(new KMLCoordinates(0.6, 51.06));
//Creates a Line file as C:\Line.kml
KMLLine kl = new KMLLine(l, "LineSample", "This is a Line Sample");
kl.Save();
//Sample KML Coord for a Point
KMLCoordinates p = new KMLCoordinates(0.25, 51.25);
//Creates a Point file as C:\Point.kml
KMLPoint kp = new KMLPoint(p, "PointSample", "This is a Point Sample");
kp.Save();
</code></pre>
<h2>History</h2>
<p>Revision 1.0 - Dated: 20<st1:date ls="trans" Month="07" Day="04" Year="22"
w:st="on">07/04/22</st1:date> <!------------------------------- That's it! --------------------------->–
First Draft of Project</p>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -