Exemplo n.º 1
0
        public void GenerationTest()
        {
            // var generator = new SingleLinkViewKmlGenerator(TestDataProvider.TestSiteZero1, TestDataProvider.TestSiteZero2);
            // var generator = new SingleLinkViewKmlGenerator(TestDataProvider.TestSiteDl0rus, TestDataProvider.TestSiteDb0dba);
            var generator = new SingleLinkViewKmlGenerator(TestDataProvider.TestSiteDl0rus, TestDataProvider.TestSite2);
            // var generator = new SingleLinkViewKmlGenerator(TestDataProvider.TestSite1, TestDataProvider.TestSite2);

            var text = generator.GenerateString();

            Assert.NotNull(text, "text is null");

            Console.WriteLine("Generated KML text:");
            Console.WriteLine(text);

            File.WriteAllText(Path.Combine(Path.GetTempPath(), "hamnetData.kml"), text);
        }
Exemplo n.º 2
0
        private string ExecuteInternal()
        {
            IHamnetDbSite fromSite = string.IsNullOrWhiteSpace(this.fromCall)
                ? new RawSiteFromFromQuery(this.fromLocation)
                : this.GetSiteForCall(this.fromCall);

            IHamnetDbSite toSite = string.IsNullOrWhiteSpace(this.toCall)
                ? new RawSiteFromToQuery(this.toLocation)
                : this.GetSiteForCall(this.toCall);

            var kmlGenerator = new SingleLinkViewKmlGenerator(fromSite, toSite);

            var kmlString = kmlGenerator.GenerateString();

            return(kmlString);
        }