Esempio n. 1
0
        private void CreateKmz(Document document, Stream stream, KmlProperties kmlProperties, WaypointAttribute colorCodingAttribute, WaypointAttribute? secondaryColorCodingAttribute, ColorRangeProperties colorRangeProperties)
        {
            var imageExporterProperties = new ImageExporterProperties()
              {
            ColorCodingAttribute = colorCodingAttribute,
            SecondaryColorCodingAttribute = secondaryColorCodingAttribute,
            ColorRangeProperties = colorRangeProperties
              };

              var imageExporter = new ImageExporter(document)
              {
            Properties = imageExporterProperties
              };

              var kmlExporter = new KmlExporter(document, imageExporter, stream)
              {
            KmlProperties = kmlProperties
              };
              kmlExporter.ExportKmz(CommonUtil.GetTempFileName() + @"\");
        }
Esempio n. 2
0
        private void CreateKmz(IEnumerable<string> documentFileNames, Stream stream, KmlProperties kmlProperties)
        {
            var imageExporterProperties = new ImageExporterProperties()
              {
            ColorCodingAttribute = SelectedColorCodingAttribute,
            SecondaryColorCodingAttribute = SelectedSecondaryColorCodingAttribute,
            ColorRangeProperties = GetCurrentColorRangeProperties(),
            SessionSettings = new SessionSettings()
              };

              var kmlExporter = new KmlExporter(
            documentFileNames,
            imageExporterProperties,
            stream)
              {
            KmlProperties = kmlProperties
              };
              kmlExporter.ExportKmz(CommonUtil.GetTempFileName() + @"\");
        }
        public void Export(Stream stream)
        {
            // crrete kml exporter object
              var imageExporter = new ImageExporter(Document)
                            {
                              Properties = new ImageExporterProperties()
                            };

              var kmlExporter = new KmlExporter(Document, imageExporter, Sessions, stream)
                          {
                            KmlProperties = KmlProperties
                          };

              // set individual colors for the sessions
              var count = 0;
              foreach (var s in Sessions)
              {
            // create custom route line style for this session
            kmlExporter.RouteLineStyleForSessions[s] = new KmlLineStyle()
                                                     {
                                                       Color = MultipleFileExporterProperties.Colors[count % MultipleFileExporterProperties.Colors.Count],
                                                       Width = KmlProperties.RouteLineStyle.Width
                                                     };
            if (MultipleFileExporterProperties.IncludeReplay)
            {
              // create custom replay marker style for this session
              kmlExporter.ReplayMarkerStyleForSessions[s] = new KmlMarkerStyle()
              {
            Color = MultipleFileExporterProperties.Colors[count % MultipleFileExporterProperties.Colors.Count],
            Size = KmlProperties.ReplayMarkerStyle.Size
              };
            }
            count++;
              }

              // export
              kmlExporter.ExportKmz(CommonUtil.GetTempFileName() + @"\");
        }