public void WriteXML(XmlTextWriter writer) { writer.WriteStartElement(SourceMapRecord.GetXMLTag()); writer.WriteAttributeString("DisplayName", this.displayName); writer.WriteAttributeString("ReferenceName", SampleHTMLWriter.ReferenceName(this.displayName)); writer.WriteAttributeString("MaxZoom", this.maxZoom.ToString()); this.sourceMapLegendFrame.WriteXML(writer); this.sourceMapInfo.WriteXML(writer); if (this.userBoundingRect != null) { this.userBoundingRect.WriteXML(writer); } foreach (LegendRecord current in this.legendRecords) { current.WriteXML(writer); } if (this.imageTransformer != null) { this.imageTransformer.writeToXml(writer); } foreach (ThumbnailRecord current2 in this.thumbnailRecords) { current2.WriteXML(writer); } writer.WriteEndElement(); }
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); } } } } } } }