Beispiel #1
0
 public void WriteXML(XmlTextWriter writer)
 {
     writer.WriteStartElement(CrunchedLayer.GetXMLTag());
     writer.WriteAttributeString(Layer.GetLayerDisplayNameTag(), this.displayName);
     writer.WriteAttributeString("ReferenceName", SampleHTMLWriter.ReferenceName(this.displayName));
     this.namingScheme.WriteXML(writer);
     writer.WriteStartElement("DefaultView");
     this.defaultView.WriteXMLToAttributes(writer);
     writer.WriteEndElement();
     writer.WriteStartElement("SourceMapRecordList");
     foreach (SourceMapRecord current in this.sourceMapRecords)
     {
         current.WriteXML(writer);
     }
     writer.WriteEndElement();
     writer.WriteStartElement("RangeDescriptors");
     foreach (RangeDescriptor current2 in this.rangeDescriptors)
     {
         current2.WriteXML(writer);
     }
     writer.WriteEndElement();
     foreach (ThumbnailRecord current3 in this.thumbnailRecords)
     {
         current3.WriteXML(writer);
     }
     writer.WriteEndElement();
 }
Beispiel #2
0
        public CrunchedLayer(MashupParseContext context)
        {
            displayName = context.reader.GetAttribute(Layer.GetLayerDisplayNameTag());
            XMLTagReader xMLTagReader = context.NewTagReader(Layer.GetXMLTag());

            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs("RangeDescriptors"))
                {
                    XMLTagReader xMLTagReader2 = context.NewTagReader("RangeDescriptors");
                    xMLTagReader2.SkipAllSubTags();
                }
                else
                {
                    if (xMLTagReader.TagIs("DefaultView"))
                    {
                        XMLTagReader xMLTagReader3 = context.NewTagReader("DefaultView");
                        defaultView = LatLonZoom.ReadFromAttributes(context, MercatorCoordinateSystem.theInstance);
                        xMLTagReader3.SkipAllSubTags();
                    }
                    else
                    {
                        if (xMLTagReader.TagIs("SourceMapInfoList"))
                        {
                            XMLTagReader xMLTagReader4 = context.NewTagReader("SourceMapInfoList");
                            while (xMLTagReader4.FindNextStartTag())
                            {
                                if (xMLTagReader4.TagIs(SourceMapInfo.GetXMLTag()))
                                {
                                    sourceMapRecords.Add(
                                        new SourceMapRecord(new SourceMapInfo(context, new DirtyEvent())));
                                }
                            }
                        }
                        else
                        {
                            if (xMLTagReader.TagIs("SourceMapRecordList"))
                            {
                                XMLTagReader xMLTagReader5 = context.NewTagReader("SourceMapRecordList");
                                while (xMLTagReader5.FindNextStartTag())
                                {
                                    if (xMLTagReader5.TagIs(SourceMapRecord.GetXMLTag()))
                                    {
                                        sourceMapRecords.Add(new SourceMapRecord(context));
                                    }
                                }
                            }
                            else
                            {
                                if (xMLTagReader.TagIs(RenderedTileNamingScheme.GetXMLTag()))
                                {
                                    namingScheme = RenderedTileNamingScheme.ReadXML(context);
                                }
                            }
                        }
                    }
                }
            }
        }