public MapPosition(MashupParseContext context, PositionUpdateIfc updateIfc, CoordinateSystemIfc coordSys) { this.updateIfc = updateIfc; if (context.version == MonolithicMapPositionsSchema.schema) { XMLTagReader xMLTagReader = context.NewTagReader("MapPosition"); this._llz = new LatLonZoom(Convert.ToDouble(context.reader.GetAttribute("lat"), CultureInfo.InvariantCulture), Convert.ToDouble(context.reader.GetAttribute("lon"), CultureInfo.InvariantCulture), Convert.ToInt32(context.reader.GetAttribute("zoom"), CultureInfo.InvariantCulture)); if (context.reader.GetAttribute("style") != null) { this.setStyle(context.reader.GetAttribute("style")); } this.valid = true; while (xMLTagReader.FindNextStartTag()) { } return; } XMLTagReader xMLTagReader2 = context.NewTagReader("MapPosition"); if (context.reader.GetAttribute("style") != null) { this.setStyle(context.reader.GetAttribute("style")); } while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag())) { this._llz = new LatLonZoom(context, coordSys); this.valid = true; } } while (xMLTagReader2.FindNextStartTag()) { } }
public void ReadXML(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("S3Credentials"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("AccessKeyId")) { context.AssertUnique(_accessKeyId); XMLTagReader xMLTagReader2 = context.NewTagReader("AccessKeyId"); _accessKeyId = context.reader.GetAttribute("Value"); xMLTagReader2.SkipAllSubTags(); } else { if (xMLTagReader.TagIs("SecretAccessKeyTag")) { context.AssertUnique(_secretAccessKey); XMLTagReader xMLTagReader3 = context.NewTagReader("SecretAccessKeyTag"); _secretAccessKey = context.reader.GetAttribute("Value"); xMLTagReader3.SkipAllSubTags(); } } } context.AssertPresent(_accessKeyId, "AccessKeyId"); context.AssertPresent(_secretAccessKey, "SecretAccessKeyTag"); }
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); } } } } } } }
public CrunchedLayer(MashupParseContext context) { this.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"); this.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())) { this.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())) { this.sourceMapRecords.Add(new SourceMapRecord(context)); } } } else { if (xMLTagReader.TagIs(RenderedTileNamingScheme.GetXMLTag())) { this.namingScheme = RenderedTileNamingScheme.ReadXML(context); } } } } } } }
public PositionAssociation(MashupParseContext context, DirtyEvent dirtyEvent) { this.dirtyEvent = dirtyEvent; XMLTagReader xMLTagReader = context.NewTagReader(PositionAssociationTag); _pinId = -1; context.GetAttributeInt(pinIdAttr, ref _pinId); if ((associationName = context.reader.GetAttribute(associationNameAttr)) == null) { associationName = ""; } while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourcePositionTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(SourcePositionTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(DisplayablePosition.GetXMLTag(context.version))) { _sourcePosition = new DisplayablePosition(context, ContinuousCoordinateSystem.theInstance); _imagePosition = new DisplayablePosition(_sourcePosition.pinPosition); } } } else { if (xMLTagReader.TagIs(GlobalPositionTag)) { XMLTagReader xMLTagReader3 = context.NewTagReader(GlobalPositionTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(DisplayablePosition.GetXMLTag(context.version))) { _globalPosition = new DisplayablePosition(context, MercatorCoordinateSystem.theInstance); } } } } } if (_sourcePosition == null || _globalPosition == null) { throw new Exception(string.Format("Pin {0} does not have a source and/or global position defined", associationName)); } }
public SourceMapRegistrationView(SourceMap sourceMap, MashupParseContext context) { this.sourceMap = sourceMap; XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); locked = context.GetRequiredAttributeBoolean(lockedAttribute); bool flag = false; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(sourceMapViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(sourceMapViewTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag())) { sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance); flag = true; } } } else { if (xMLTagReader.TagIs(referenceMapViewTag)) { XMLTagReader xMLTagReader3 = context.NewTagReader(referenceMapViewTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } } } if (referenceMapView == null) { throw new InvalidMashupFile(context, "No " + referenceMapViewTag + " tag in LayerView."); } if (flag == locked) { throw new InvalidMashupFile(context, "locked flag disagrees with " + sourceMapViewTag + " element."); } }
public Legend(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent, DirtyEvent parentBoundsChangedEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this._latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, parentBoundsChangedEvent); this._displayName = context.GetRequiredAttribute("DisplayName"); string attribute = context.reader.GetAttribute("RenderedSize"); if (attribute != null) { Legend.renderedSizeRange.Parse(context, "RenderedSize", attribute); } XMLTagReader xMLTagReader = context.NewTagReader(Legend.GetXMLTag()); context.ExpectIdentity(this); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(RenderRegion.GetXMLTag())) { context.AssertUnique(this._latentRegionHolder.renderRegion); this._latentRegionHolder.renderRegion = new RenderRegion(context, this.dirtyEvent, ContinuousCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(LegendView.GetXMLTag())) { this._lastView = new LegendView(this, context); } } } }
public SourceMapRecord(MashupParseContext context) { this.displayName = context.GetRequiredAttribute("DisplayName"); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRecord"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMapInfo.GetXMLTag())) { this.sourceMapInfo = new SourceMapInfo(context, new DirtyEvent()); } else { if (xMLTagReader.TagIs(MapRectangle.GetXMLTag())) { this.userBoundingRect = new MapRectangle(context, MercatorCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(LegendRecord.GetXMLTag())) { this.legendRecords.Add(new LegendRecord(context)); } else { if (xMLTagReader.TagIs(SourceMapLegendFrame.GetXMLTag())) { context.AssertUnique(this.sourceMapLegendFrame); this.sourceMapLegendFrame = new SourceMapLegendFrame(context); } } } } } }
public SourceMapRecord(MashupParseContext context) { this.displayName = context.GetRequiredAttribute("DisplayName"); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRecord"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMapInfo.GetXMLTag())) { this.sourceMapInfo = new SourceMapInfo(context, new DirtyEvent()); } else { if (xMLTagReader.TagIs(MapRectangle.GetXMLTag())) { this.userBoundingRect = new MapRectangle(context, MercatorCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(LegendRecord.GetXMLTag())) { this.legendRecords.Add(new LegendRecord(context)); } else { if (xMLTagReader.TagIs(SourceMapLegendFrame.GetXMLTag())) { context.AssertUnique(this.sourceMapLegendFrame); this.sourceMapLegendFrame = new SourceMapLegendFrame(context); } } } } } }
public SourceMapRenderOptions(MashupParseContext context, DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRenderOptions"); new MercatorCoordinateSystem(); string attribute = context.reader.GetAttribute("MinZoom"); if (attribute != null) { _minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange() .Parse(context, "MinZoom", attribute); } else { _minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().min; } _maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange() .ParseAllowUndefinedZoom(context, "MaxZoom", context.reader.GetAttribute("MaxZoom")); if (_minZoom > _maxZoom) { throw new InvalidMashupFile(context, string.Format("MinZoom {0} > MaxZoom {1}", _minZoom, _maxZoom)); } xMLTagReader.SkipAllSubTags(); }
public static string ReadStringXml(MashupParseContext context, string TagName) { XMLTagReader xMLTagReader = context.NewTagReader(TagName); xMLTagReader.SkipAllSubTags(); return(xMLTagReader.GetContent()); }
public static Size ReadSize(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("Size"); Size result = new Size(context.GetRequiredAttributeInt("Width"), context.GetRequiredAttributeInt("Height")); xMLTagReader.SkipAllSubTags(); return result; }
public RenderToFileOptions(MashupParseContext context, DirtyEvent parentDirtyEvent, string byTagName) { XMLTagReader xMLTagReader = context.NewTagReader(byTagName); this._outputFolder = new DirtyString(parentDirtyEvent); this.outputFolder = context.GetRequiredAttribute(RenderToFileOptions.OutputFolderAttr); xMLTagReader.SkipAllSubTags(); }
public static Size ReadSize(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("Size"); Size result = new Size(context.GetRequiredAttributeInt("Width"), context.GetRequiredAttributeInt("Height")); xMLTagReader.SkipAllSubTags(); return(result); }
public LocalDocumentDescriptor(MashupParseContext context, string pathBase) { XMLTagReader xMLTagReader = context.NewTagReader(LocalDocumentDescriptor.GetXMLTag()); string requiredAttribute = context.GetRequiredAttribute(LocalDocumentDescriptor.LocalDocumentFilenameAttr); this._filename = Path.Combine(pathBase, requiredAttribute); this._pageNumber = context.GetRequiredAttributeInt(LocalDocumentDescriptor.LocalDocumentPageNumberAttr); xMLTagReader.SkipAllSubTags(); }
public RenderToFileOptions(MashupParseContext context, DirtyEvent parentDirtyEvent, string byTagName) { XMLTagReader xMLTagReader = context.NewTagReader(byTagName); this._outputFolder = new DirtyString(parentDirtyEvent); this.outputFolder = context.GetRequiredAttribute(RenderToFileOptions.OutputFolderAttr); xMLTagReader.SkipAllSubTags(); }
public SourceMapInfo(MashupParseContext context, DirtyEvent parentDirty) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("MapFileURL")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { _mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { XMLTagReader xMLTagReader2 = context.NewTagReader("MapFileURL"); _mapFileURL = context.GetRequiredAttribute("url"); xMLTagReader2.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapHomePage")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { _mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { XMLTagReader xMLTagReader3 = context.NewTagReader("MapHomePage"); _mapHomePage = context.GetRequiredAttribute("url"); xMLTagReader3.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapDescription")) { _mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } }
public ManifestSuperBlock(MashupParseContext context, TellManifestDirty tellDirty) { this.tellDirty = tellDirty; XMLTagReader xMLTagReader = context.NewTagReader(GetXmlTag()); _nextUnassignedBlockId = context.GetRequiredAttributeInt("NextUnassignedBlockId"); _splitThreshold = context.GetRequiredAttributeInt("SplitThreshold"); xMLTagReader.SkipAllSubTags(); }
public LocalDocumentDescriptor(MashupParseContext context, string pathBase) { XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); string requiredAttribute = context.GetRequiredAttribute(LocalDocumentFilenameAttr); _filename = Path.Combine(pathBase, requiredAttribute); _pageNumber = context.GetRequiredAttributeInt(LocalDocumentPageNumberAttr); xMLTagReader.SkipAllSubTags(); }
public CrunchedFile(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(CrunchedFile.crunchedFileTag); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LayerList.GetXMLTag())) { XMLTagReader xMLTagReader2 = context.NewTagReader(LayerList.GetXMLTag()); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(CrunchedLayer.GetXMLTag())) { this.crunchedLayers.Add(new CrunchedLayer(context)); } } } } }
public SourceMapLegendFrame(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(SourceMapLegendFrame.GetXMLTag()); this.filename = context.GetRequiredAttribute("Filename"); this.loadedSize.Width = context.GetRequiredAttributeInt("Width"); this.loadedSize.Height = context.GetRequiredAttributeInt("Height"); this.useLoadedSize = true; xMLTagReader.SkipAllSubTags(); }
public SourceMapInfo(MashupParseContext context, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader(SourceMapInfo.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("MapFileURL")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { this._mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { XMLTagReader xMLTagReader2 = context.NewTagReader("MapFileURL"); this._mapFileURL = context.GetRequiredAttribute("url"); xMLTagReader2.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapHomePage")) { if (context.version == SourceMapInfoAsCharDataSchema.schema) { this._mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { XMLTagReader xMLTagReader3 = context.NewTagReader("MapHomePage"); this._mapHomePage = context.GetRequiredAttribute("url"); xMLTagReader3.SkipAllSubTags(); } } else { if (xMLTagReader.TagIs("MapDescription")) { this._mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } }
public SourceMapRegistrationView(SourceMap sourceMap, MashupParseContext context) { this._sourceMap = sourceMap; XMLTagReader xMLTagReader = context.NewTagReader(SourceMapRegistrationView.GetXMLTag()); this._locked = context.GetRequiredAttributeBoolean(SourceMapRegistrationView.lockedAttribute); bool flag = false; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMapRegistrationView.sourceMapViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(SourceMapRegistrationView.sourceMapViewTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag())) { this.sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance); flag = true; } } } else { if (xMLTagReader.TagIs(SourceMapRegistrationView.referenceMapViewTag)) { XMLTagReader xMLTagReader3 = context.NewTagReader(SourceMapRegistrationView.referenceMapViewTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { this.referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } } } if (this.referenceMapView == null) { throw new InvalidMashupFile(context, "No " + SourceMapRegistrationView.referenceMapViewTag + " tag in LayerView."); } if (flag == this._locked) { throw new InvalidMashupFile(context, "locked flag disagrees with " + SourceMapRegistrationView.sourceMapViewTag + " element."); } }
public LegendView(Legend legend, MashupParseContext context) { this.legend = legend; object obj = null; XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); showingPreview = context.GetRequiredAttributeBoolean(previewAttr); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(sourceMapViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(sourceMapViewTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag())) { sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance); context.AssertUnique(obj); obj = new object(); } } } else { if (xMLTagReader.TagIs(referenceMapViewTag)) { context.AssertUnique(referenceMapView); XMLTagReader xMLTagReader3 = context.NewTagReader(referenceMapViewTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } } } context.AssertPresent(obj, sourceMapViewTag); context.AssertPresent(referenceMapView, referenceMapViewTag); }
public LatLon(MashupParseContext context, CoordinateSystemIfc coordSys) { XMLTagReader xMLTagReader = context.NewTagReader("LatLon"); lat = coordSys.GetLatRange().Parse(context, "lat"); lon = coordSys.GetLonRange().Parse(context, "lon"); while (xMLTagReader.FindNextStartTag()) { } }
public SourceMapLegendFrame(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); filename = context.GetRequiredAttribute("Filename"); loadedSize.Width = context.GetRequiredAttributeInt("Width"); loadedSize.Height = context.GetRequiredAttributeInt("Height"); useLoadedSize = true; xMLTagReader.SkipAllSubTags(); }
public CrunchedFile(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(CrunchedFile.crunchedFileTag); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LayerList.GetXMLTag())) { XMLTagReader xMLTagReader2 = context.NewTagReader(LayerList.GetXMLTag()); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(CrunchedLayer.GetXMLTag())) { this.crunchedLayers.Add(new CrunchedLayer(context)); } } } } }
public ManifestRecord(MashupParseContext context, ManifestBlock block) { this.block = block; XMLTagReader xMLTagReader = context.NewTagReader("ManifestRecord"); path = context.GetRequiredAttribute("Path"); _fileExists = context.GetRequiredAttributeBoolean("FileExists"); _fileLength = context.GetRequiredAttributeLong("FileLength"); indirectManifestBlockId = context.GetRequiredAttributeInt("IndirectManifestBlockId"); xMLTagReader.SkipAllSubTags(); }
public RenderToS3Options(MashupParseContext context, DirtyEvent parentDirtyEvent) { XMLTagReader xMLTagReader = context.NewTagReader(RenderToS3Options.xmlTag); this._s3credentialsFilename = new DirtyString(parentDirtyEvent); this.s3credentialsFilename = context.GetRequiredAttribute(RenderToS3Options.attr_s3credentialsFilename); this._s3bucket = new DirtyString(parentDirtyEvent); this.s3bucket = context.GetRequiredAttribute(RenderToS3Options.attr_s3bucket); this._s3pathPrefix = new DirtyString(parentDirtyEvent); this.s3pathPrefix = context.GetRequiredAttribute(RenderToS3Options.attr_s3pathPrefix); xMLTagReader.SkipAllSubTags(); }
public LayerList(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = parentDirty; XMLTagReader xMLTagReader = context.NewTagReader("LayerList"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Layer.GetXMLTag())) { this.Add(new Layer(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } } }
public RenderToS3Options(MashupParseContext context, DirtyEvent parentDirtyEvent) { XMLTagReader xMLTagReader = context.NewTagReader(RenderToS3Options.xmlTag); this._s3credentialsFilename = new DirtyString(parentDirtyEvent); this.s3credentialsFilename = context.GetRequiredAttribute(RenderToS3Options.attr_s3credentialsFilename); this._s3bucket = new DirtyString(parentDirtyEvent); this.s3bucket = context.GetRequiredAttribute(RenderToS3Options.attr_s3bucket); this._s3pathPrefix = new DirtyString(parentDirtyEvent); this.s3pathPrefix = context.GetRequiredAttribute(RenderToS3Options.attr_s3pathPrefix); xMLTagReader.SkipAllSubTags(); }
public RenderClip(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(RenderClip.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(MapRectangle.GetXMLTag())) { context.AssertUnique(this._rect); this._rect = new MapRectangle(context, MercatorCoordinateSystem.theInstance); } } }
public FadeOptions(MashupParseContext context, DirtyEvent dirty) { this.dirty = dirty; XMLTagReader xMLTagReader = context.NewTagReader("FadeOptions"); this._fadeBase = FadeOptions.FadeRange.Parse(context, "DefaultValue"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("FadeAtZoom")) { XMLTagReader xMLTagReader2 = context.NewTagReader("FadeAtZoom"); int requiredAttributeInt = context.GetRequiredAttributeInt("ZoomLevel"); double value = FadeOptions.FadeRange.Parse(context, "FadeValue"); if (this._zoomToFadeMap.ContainsKey(requiredAttributeInt)) { throw new InvalidMashupFile(context, string.Format("Fade specified twice for zoom level {0}", requiredAttributeInt)); } this._zoomToFadeMap[requiredAttributeInt] = value; xMLTagReader2.SkipAllSubTags(); } } }
public LegendView(Legend legend, MashupParseContext context) { this._legend = legend; object obj = null; XMLTagReader xMLTagReader = context.NewTagReader(LegendView.GetXMLTag()); this._showingPreview = context.GetRequiredAttributeBoolean(LegendView.previewAttr); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LegendView.sourceMapViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(LegendView.sourceMapViewTag); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag())) { this.sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance); context.AssertUnique(obj); obj = new object(); } } } else { if (xMLTagReader.TagIs(LegendView.referenceMapViewTag)) { context.AssertUnique(this.referenceMapView); XMLTagReader xMLTagReader3 = context.NewTagReader(LegendView.referenceMapViewTag); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { this.referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } } } context.AssertPresent(obj, LegendView.sourceMapViewTag); context.AssertPresent(this.referenceMapView, LegendView.referenceMapViewTag); }
public FadeOptions(MashupParseContext context, DirtyEvent dirty) { this.dirty = dirty; XMLTagReader xMLTagReader = context.NewTagReader("FadeOptions"); this._fadeBase = FadeOptions.FadeRange.Parse(context, "DefaultValue"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("FadeAtZoom")) { XMLTagReader xMLTagReader2 = context.NewTagReader("FadeAtZoom"); int requiredAttributeInt = context.GetRequiredAttributeInt("ZoomLevel"); double value = FadeOptions.FadeRange.Parse(context, "FadeValue"); if (this._zoomToFadeMap.ContainsKey(requiredAttributeInt)) { throw new InvalidMashupFile(context, string.Format("Fade specified twice for zoom level {0}", requiredAttributeInt)); } this._zoomToFadeMap[requiredAttributeInt] = value; xMLTagReader2.SkipAllSubTags(); } } }
public RenderRegion(MashupParseContext context, DirtyEvent parentDirty, CoordinateSystemIfc coordSys) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("RenderRegion"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LatLon.GetXMLTag())) { vertexList.Add(new LatLon(context, coordSys)); } } }
public RenderClip(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(MapRectangle.GetXMLTag())) { context.AssertUnique(rect); rect = new MapRectangle(context, MercatorCoordinateSystem.theInstance); } } }
public LayerList(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = parentDirty; XMLTagReader xMLTagReader = context.NewTagReader("LayerList"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Layer.GetXMLTag())) { this.Add(new Layer(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } } }
public ManifestBlock(TellManifestDirty tellManifestDirty, RenderOutputMethod outputMethod, int blockId) { this.tellManifestDirty = tellManifestDirty; this.blockId = blockId; try { Stream input = outputMethod.MakeChildMethod("manifests").ReadFile(manifestFilename(blockId)); XmlTextReader xmlTextReader = new XmlTextReader(input); using (xmlTextReader) { MashupParseContext mashupParseContext = new MashupParseContext(xmlTextReader); while (mashupParseContext.reader.Read()) { if (mashupParseContext.reader.NodeType == XmlNodeType.Element && mashupParseContext.reader.Name == "ManifestBlock") { XMLTagReader xMLTagReader = mashupParseContext.NewTagReader("ManifestBlock"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(ManifestRecord.GetXmlTag())) { recordList.Add(new ManifestRecord(mashupParseContext, this)); } else { if (xMLTagReader.TagIs(ManifestSuperBlock.GetXmlTag())) { superBlock = new ManifestSuperBlock(mashupParseContext, new TellManifestDirty(SetDirty)); } } } return; } } throw new InvalidMashupFile(mashupParseContext, "No ManifestBlock tag"); } } catch (Exception) { } finally { if (blockId == 0 && superBlock == null) { superBlock = new ManifestSuperBlock(1, new TellManifestDirty(SetDirty)); } } }
public Pixel(MashupParseContext context) { this.p.r = 0; this.p.g = 0; this.p.b = 0; this.p.a = 0; XMLTagReader xMLTagReader = context.NewTagReader("PixelValues"); this.p.r = (byte)Pixel.byteRange.Parse(context, "r"); this.p.g = (byte)Pixel.byteRange.Parse(context, "g"); this.p.b = (byte)Pixel.byteRange.Parse(context, "b"); this.p.a = (byte)Pixel.byteRange.Parse(context, "a"); xMLTagReader.SkipAllSubTags(); }
public RegistrationDefinition(MashupParseContext context, DirtyEvent dirtyEvent) { this.dirtyEvent = new DirtyEvent(dirtyEvent); XMLTagReader xMLTagReader = context.NewTagReader(RegistrationDefinition.RegistrationDefinitionTag); this.warpStyle = TransformationStyleFactory.ReadFromXMLAttribute(context); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(PositionAssociation.XMLTag())) { this.AddAssociation(new PositionAssociation(context, dirtyEvent)); } } }
public LegendList(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this.parentBoundsChangedEvent = parentEvent; XMLTagReader xMLTagReader = context.NewTagReader(LegendList.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Legend.GetXMLTag())) { this.list.Add(new Legend(this._sourceMap, context, this.dirtyEvent, this.parentBoundsChangedEvent)); } } }
private LayerMetadataFile(RenderOutputMethod renderOutputMethod, MashupParseContext context) { this.renderOutputMethod = renderOutputMethod; XMLTagReader xMLTagReader = context.NewTagReader(LayerMetadataFile.LayerMetadataTag); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("StrongHash")) { context.AssertUnique(this._encodableHash); this._encodableHash = new EncodableHash(context); } } context.AssertPresent(this._encodableHash, "StrongHash"); }
public LegendList(SourceMap sourceMap, MashupParseContext context, DirtyEvent parentEvent) { this._sourceMap = sourceMap; this.dirtyEvent = new DirtyEvent(parentEvent); this.parentBoundsChangedEvent = parentEvent; XMLTagReader xMLTagReader = context.NewTagReader(LegendList.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Legend.GetXMLTag())) { this.list.Add(new Legend(this._sourceMap, context, this.dirtyEvent, this.parentBoundsChangedEvent)); } } }
private LayerMetadataFile(RenderOutputMethod renderOutputMethod, MashupParseContext context) { this.renderOutputMethod = renderOutputMethod; XMLTagReader xMLTagReader = context.NewTagReader(LayerMetadataFile.LayerMetadataTag); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("StrongHash")) { context.AssertUnique(this._encodableHash); this._encodableHash = new EncodableHash(context); } } context.AssertPresent(this._encodableHash, "StrongHash"); }
public LegendRecord(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("Legend"); this.url = context.GetRequiredAttribute("URL"); this.displayName = context.GetRequiredAttribute("DisplayName"); object obj = null; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("Size")) { context.AssertUnique(obj); obj = new object(); this.imageDimensions = XMLUtils.ReadSize(context); } } context.AssertPresent(obj, "Size"); }
public static RenderedTileNamingScheme ReadXML(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("TileNamingScheme"); string attribute = context.reader.GetAttribute("Type"); string attribute2 = context.reader.GetAttribute("FilePrefix"); string attribute3 = context.reader.GetAttribute("FileSuffix"); xMLTagReader.SkipAllSubTags(); if (attribute == null || attribute2 == null || attribute3 == null) { throw new InvalidMashupFile(context, string.Format("Invalid contents in {0} tag.", "TileNamingScheme")); } if (attribute == VENamingScheme.SchemeName) { return new VENamingScheme(attribute2, attribute3); } throw new InvalidMashupFile(context, "Unknown type: " + attribute); }
private void TryOneFetchFormatString() { try { HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(BuildConfig.theConfig.veFormatUpdateURL); httpWebRequest.Timeout = 5000; HttpWebResponse httpWebResponse; try { httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse(); } catch (WebException) { return; } if (httpWebResponse.StatusCode == HttpStatusCode.OK) { Stream responseStream = httpWebResponse.GetResponseStream(); XmlTextReader reader = new XmlTextReader(responseStream); MashupParseContext mashupParseContext = new MashupParseContext(reader); using (mashupParseContext) { while (mashupParseContext.reader.Read()) { if (mashupParseContext.reader.NodeType == XmlNodeType.Element && mashupParseContext.reader.Name == "VEUrlFormat") { XMLTagReader xMLTagReader = mashupParseContext.NewTagReader("VEUrlFormat"); formatString = mashupParseContext.GetRequiredAttribute("FormatString"); generationNumber = mashupParseContext.GetRequiredAttributeInt("GenerationNumber"); xMLTagReader.SkipAllSubTags(); break; } } mashupParseContext.Dispose(); } } } catch (Exception ex) { D.Sayf(0, "VEUrlFormat fetch failed with unexpected {0}", new object[] { ex }); } }
private void TryOneFetchFormatString() { try { HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(BuildConfig.theConfig.veFormatUpdateURL); httpWebRequest.Timeout = 5000; HttpWebResponse httpWebResponse; try { httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse(); } catch (WebException) { return; } if (httpWebResponse.StatusCode == HttpStatusCode.OK) { Stream responseStream = httpWebResponse.GetResponseStream(); XmlTextReader reader = new XmlTextReader(responseStream); MashupParseContext mashupParseContext = new MashupParseContext(reader); using (mashupParseContext) { while (mashupParseContext.reader.Read()) { if (mashupParseContext.reader.NodeType == XmlNodeType.Element && mashupParseContext.reader.Name == "VEUrlFormat") { XMLTagReader xMLTagReader = mashupParseContext.NewTagReader("VEUrlFormat"); this.formatString = mashupParseContext.GetRequiredAttribute("FormatString"); this.generationNumber = mashupParseContext.GetRequiredAttributeInt("GenerationNumber"); xMLTagReader.SkipAllSubTags(); break; } } mashupParseContext.Dispose(); } } } catch (Exception ex) { D.Sayf(0, "VEUrlFormat fetch failed with unexpected {0}", new object[] { ex }); } }
public LayerView(Layer layer, MashupParseContext context) { this._layer = layer; bool flag = false; XMLTagReader xMLTagReader = context.NewTagReader(LayerView.GetXMLTag()); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(MapPosition.GetXMLTag(context.version))) { this.lockedView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); flag = true; } } if (!flag) { throw new InvalidMashupFile(context, "No LatLonZoom tag in LayerView."); } }
public TransparencyColor(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("TransparencyColor"); this._fuzz = TransparencyOptions.FuzzRange.Parse(context, "Fuzz"); this._halo = TransparencyOptions.HaloSizeRange.Parse(context, "HaloSize"); bool flag = false; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(Pixel.GetXMLTag())) { Pixel pixel = new Pixel(context); this._color = new Pixel(pixel.r, pixel.g, pixel.b, 255); flag = true; } } if (!flag) { throw new InvalidMashupFile(context, string.Format("TransparencyColor has no %1 tag", Pixel.GetXMLTag())); } }
public MapRectangle(MashupParseContext context, CoordinateSystemIfc coordSys) { XMLTagReader reader = context.NewTagReader("MapRectangle"); List<LatLon> list = new List<LatLon>(); while (reader.FindNextStartTag()) { if (reader.TagIs(LatLon.GetXMLTag())) { list.Add(new LatLon(context, coordSys)); } } reader.SkipAllSubTags(); if (list.Count != 2) { throw new InvalidMashupFile(context, string.Format("{0} should contain exactly 2 {1} subtags", "MapRectangle", LatLon.GetXMLTag())); } this.ll0 = list[0]; this.ll1 = list[1]; this.AssertOrder(); }
public SourceMapRenderOptions(MashupParseContext context, DirtyEvent parentDirty) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("SourceMapRenderOptions"); new MercatorCoordinateSystem(); string attribute = context.reader.GetAttribute("MinZoom"); if (attribute != null) { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, "MinZoom", attribute); } else { this._minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().min; } this._maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().ParseAllowUndefinedZoom(context, "MaxZoom", context.reader.GetAttribute("MaxZoom")); if (this._minZoom > this._maxZoom) { throw new InvalidMashupFile(context, string.Format("MinZoom {0} > MaxZoom {1}", this._minZoom, this._maxZoom)); } xMLTagReader.SkipAllSubTags(); }
public TransparencyOptions(MashupParseContext context, DirtyEvent dirty) { this.Initialize(dirty); XMLTagReader xMLTagReader = context.NewTagReader("TransparencyOptions"); this._useDocumentTransparency = true; context.GetAttributeBoolean("UseDocumentTransparency", ref this._useDocumentTransparency); this._enabled = context.GetRequiredAttributeBoolean("Enabled"); this._inverted = context.GetRequiredAttributeBoolean("Inverted"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(TransparencyColor.GetXMLTag())) { this._colorList.Add(new TransparencyColor(context)); } else { if (xMLTagReader.TagIs(FadeOptions.GetXMLTag())) { this._fadeOptions = new FadeOptions(context, dirty); } } } }
public LatLon(MashupParseContext context, CoordinateSystemIfc coordSys) { XMLTagReader xMLTagReader = context.NewTagReader("LatLon"); this._lat = coordSys.GetLatRange().Parse(context, "lat"); this._lon = coordSys.GetLonRange().Parse(context, "lon"); while (xMLTagReader.FindNextStartTag()) { } }
public SourceMap(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = new DirtyEvent(parentDirty); this.readyToLockChangedEvent = new DirtyEvent(parentReadyToLockEvent); this.filenameContextDelegate = filenameContextDelegate; this.latentRegionHolder = new LatentRegionHolder(this.dirtyEvent, this.readyToLockChangedEvent); XMLTagReader xMLTagReader = context.NewTagReader("SourceMap"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("SourceMapFilename"); if (attribute != null) { string path = Path.Combine(filenameContextDelegate(), attribute); int pageNumber = 0; context.GetAttributeInt("PageNumber", ref pageNumber); this._documentFuture = new GeneralDocumentFuture(new FutureDocumentFromFilesystem(path, pageNumber)); } context.GetAttributeBoolean("Expanded", ref this._expanded); string attribute2 = context.reader.GetAttribute("DisplayName"); MapPosition mapPosition = null; MapPosition mapPosition2 = null; while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(RegistrationDefinition.GetXMLTag())) { context.AssertUnique(this.registration); this.registration = new RegistrationDefinition(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(GeneralDocumentFuture.GetXMLTag())) { context.AssertUnique(this._documentFuture); this._documentFuture = new GeneralDocumentFuture(context, filenameContextDelegate()); } else { if (xMLTagReader.TagIs(LocalDocumentDescriptor.GetXMLTag())) { context.AssertUnique(this._documentFuture); LocalDocumentDescriptor localDocumentDescriptor = new LocalDocumentDescriptor(context, filenameContextDelegate()); this._documentFuture = new GeneralDocumentFuture(new FutureDocumentFromFilesystem(localDocumentDescriptor.GetFilesystemAbsolutePath(), localDocumentDescriptor.GetPageNumber())); } else { if (xMLTagReader.TagIs("LastSourceMapPosition")) { XMLTagReader xMLTagReader2 = context.NewTagReader("LastSourceMapPosition"); while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, ContinuousCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs("LastVEPosition")) { XMLTagReader xMLTagReader3 = context.NewTagReader("LastVEPosition"); while (xMLTagReader3.FindNextStartTag()) { if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition2 = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } } else { if (xMLTagReader.TagIs(RenderRegion.GetXMLTag())) { context.AssertUnique(this.renderRegion); this.renderRegion = new RenderRegion(context, this.dirtyEvent, ContinuousCoordinateSystem.theInstance); } else { if (xMLTagReader.TagIs(SourceMapInfo.GetXMLTag())) { context.AssertUnique(this._sourceMapInfo); this._sourceMapInfo = new SourceMapInfo(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRenderOptions.GetXMLTag())) { context.AssertUnique(this._sourceMapRenderOptions); this._sourceMapRenderOptions = new SourceMapRenderOptions(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(TransparencyOptions.GetXMLTag())) { this._transparencyOptions = new TransparencyOptions(context, this.dirtyEvent); } else { if (xMLTagReader.TagIs(SourceMapRegistrationView.GetXMLTag())) { context.AssertUnique(this._lastView); this._lastView = new SourceMapRegistrationView(this, context); } else { if (xMLTagReader.TagIs(LegendList.GetXMLTag())) { context.AssertUnique(this.legendList); this.legendList = new LegendList(this, context, this.dirtyEvent); } else { if (xMLTagReader.TagIs("SnapView")) { XMLTagReader xMLTagReader4 = context.NewTagReader("SnapView"); string requiredAttribute = context.GetRequiredAttribute("Context"); LatLonZoom latLonZoom = default(LatLonZoom); bool flag = false; bool flag2 = true; CoordinateSystemIfc coordSys = null; if (requiredAttribute == "Source") { coordSys = ContinuousCoordinateSystem.theInstance; } else { if (!(requiredAttribute == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute)); } coordSys = MercatorCoordinateSystem.theInstance; } while (xMLTagReader4.FindNextStartTag()) { if (xMLTagReader4.TagIs(LatLonZoom.GetXMLTag())) { if (flag) { context.ThrowUnique(); } try { latLonZoom = new LatLonZoom(context, coordSys); } catch (InvalidLLZ) { flag2 = false; } flag = true; } } if (flag2) { if (!flag) { context.AssertPresent(null, LatLonZoom.GetXMLTag()); } if (requiredAttribute == "Source") { this.sourceSnap = latLonZoom; } else { if (requiredAttribute == "Reference") { this.referenceSnap = latLonZoom; } else { D.Assert(false, "handled above."); } } } } else { if (xMLTagReader.TagIs("SnapZoom")) { context.NewTagReader("SnapZoom"); string requiredAttribute2 = context.GetRequiredAttribute("Context"); bool flag3 = false; CoordinateSystemIfc theInstance; if (requiredAttribute2 == "Source") { theInstance = ContinuousCoordinateSystem.theInstance; } else { if (!(requiredAttribute2 == "Reference")) { throw new InvalidMashupFile(context, string.Format("Invalid {0} value {1}", "Context", requiredAttribute2)); } theInstance = MercatorCoordinateSystem.theInstance; } int num = 0; try { theInstance.GetZoomRange().Parse(context, "Zoom"); flag3 = true; } catch (InvalidMashupFile) { } if (flag3) { if (requiredAttribute2 == "Source") { this.sourceSnapZoom = num; } else { if (requiredAttribute2 == "Reference") { this.referenceSnapZoom = num; } } } } } } } } } } } } } } } } if (context.version == InlineSourceMapInfoSchema.schema) { if (xMLTagReader.TagIs("MapFileURL")) { this._sourceMapInfo.mapFileURL = XMLUtils.ReadStringXml(context, "MapFileURL"); } else { if (xMLTagReader.TagIs("MapHomePage")) { this._sourceMapInfo.mapHomePage = XMLUtils.ReadStringXml(context, "MapHomePage"); } else { if (xMLTagReader.TagIs("MapDescription")) { this._sourceMapInfo.mapDescription = XMLUtils.ReadStringXml(context, "MapDescription"); } } } } } if (attribute2 != null) { this._displayName = attribute2; } else { this._displayName = this._documentFuture.documentFuture.GetDefaultDisplayName(); } if (this._lastView == null && mapPosition != null && mapPosition2 != null) { this._lastView = new SourceMapRegistrationView(this, mapPosition.llz, mapPosition2); } if (this._documentFuture == null) { throw new Exception("Source Map element missing document descriptor tag"); } if (this.registration == null) { this.registration = new RegistrationDefinition(this.dirtyEvent); } this.registration.dirtyEvent.Add(this.readyToLockChangedEvent); if (this.legendList == null) { this.legendList = new LegendList(this, this.dirtyEvent, this.readyToLockChangedEvent); } if (this._sourceMapInfo == null) { this._sourceMapInfo = new SourceMapInfo(this.dirtyEvent); } if (this._sourceMapRenderOptions == null) { this._sourceMapRenderOptions = new SourceMapRenderOptions(this.dirtyEvent); } if (this._transparencyOptions == null) { this._transparencyOptions = new TransparencyOptions(this.dirtyEvent); } }
public void ReadXML(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("S3Credentials"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs("AccessKeyId")) { context.AssertUnique(this._accessKeyId); XMLTagReader xMLTagReader2 = context.NewTagReader("AccessKeyId"); this._accessKeyId = context.reader.GetAttribute("Value"); xMLTagReader2.SkipAllSubTags(); } else { if (xMLTagReader.TagIs("SecretAccessKeyTag")) { context.AssertUnique(this._secretAccessKey); XMLTagReader xMLTagReader3 = context.NewTagReader("SecretAccessKeyTag"); this._secretAccessKey = context.reader.GetAttribute("Value"); xMLTagReader3.SkipAllSubTags(); } } } context.AssertPresent(this._accessKeyId, "AccessKeyId"); context.AssertPresent(this._secretAccessKey, "SecretAccessKeyTag"); }
public Pixel(MashupParseContext context) { this.p.r = 0; this.p.g = 0; this.p.b = 0; this.p.a = 0; XMLTagReader xMLTagReader = context.NewTagReader("PixelValues"); this.p.r = (byte)Pixel.byteRange.Parse(context, "r"); this.p.g = (byte)Pixel.byteRange.Parse(context, "g"); this.p.b = (byte)Pixel.byteRange.Parse(context, "b"); this.p.a = (byte)Pixel.byteRange.Parse(context, "a"); xMLTagReader.SkipAllSubTags(); }
public void ReadXML(MashupParseContext context) { XMLTagReader xMLTagReader = context.NewTagReader("MapGrinderMashupFile"); context.version = MashupXMLSchemaVersion.ReadXMLAttribute(context.reader); SingleMaxZoomForEntireMashupCompatibilityBlob singleMaxZoomForEntireMashupCompatibilityBlob = null; string text = null; while (xMLTagReader.FindNextStartTag()) { if (context.version != MonolithicMapPositionsSchema.schema && xMLTagReader.TagIs(LayerList.GetXMLTag())) { this._layerList = new LayerList(context, new SourceMap.GetFilenameContext(this.GetFilenameContext), this.dirtyEvent, this.readyToLockEvent); } else { if (context.version == MonolithicMapPositionsSchema.schema && xMLTagReader.TagIs(SourceMap.GetXMLTag())) { if (this._layerList != null && this._layerList.Count > 0) { throw new InvalidMashupFile(context, string.Format("Multiple SourceMaps in Version {0} file.", context.version.versionNumberString)); } SourceMap sourceMap = new SourceMap(context, new SourceMap.GetFilenameContext(this.GetFilenameContext), this.dirtyEvent, this.readyToLockEvent); this._layerList = new LayerList(this.dirtyEvent); this._layerList.AddNewLayer(); this._layerList.First.Add(sourceMap); } else { if (xMLTagReader.TagIs(RenderOptions.GetXMLTag())) { this.renderOptions = new RenderOptions(context, this.dirtyEvent, ref singleMaxZoomForEntireMashupCompatibilityBlob); } else { if (xMLTagReader.TagIs(Mashup.LastViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(Mashup.LastViewTag); text = context.reader.GetAttribute(Mashup.LastView_TargetIdAttr); xMLTagReader2.SkipAllSubTags(); } } } } } this._lastView = new NoView(); if (text != null) { object obj = context.FetchObjectByIdentity(text); if (obj != null && obj is LastViewIfc) { this._lastView = ((LastViewIfc)obj).lastView; } } if (this.renderOptions == null) { if (context.version != MonolithicMapPositionsSchema.schema) { context.warnings.Add(new MashupFileWarning("RenderOptions tag absent.")); } this.renderOptions = new RenderOptions(this.dirtyEvent); } if (singleMaxZoomForEntireMashupCompatibilityBlob != null) { D.Assert(context.version == SingleMaxZoomForEntireMashupSchema.schema); foreach (Layer current in this._layerList) { foreach (SourceMap current2 in current) { current2.sourceMapRenderOptions.maxZoom = singleMaxZoomForEntireMashupCompatibilityBlob.maxZoom; } } } }
public Layer(MashupParseContext context, SourceMap.GetFilenameContext filenameContextDelegate, DirtyEvent parentDirty, DirtyEvent parentReadyToLockEvent) { this.dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("Layer"); context.ExpectIdentity(this); string attribute = context.reader.GetAttribute("DisplayName"); if (attribute != null) { this._displayName = attribute; context.GetAttributeBoolean("Expanded", ref this._expanded); string attribute2 = context.reader.GetAttribute("SimulateTransparencyWithVEBackingLayer"); if (attribute2 != null) { this._simulateTransparencyWithVEBackingLayer = attribute2; } while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(SourceMap.GetXMLTag())) { this.Add(new SourceMap(context, filenameContextDelegate, this.dirtyEvent, parentReadyToLockEvent)); } else { if (xMLTagReader.TagIs(LayerView.GetXMLTag())) { this._lastView = new LayerView(this, context); } else { if (xMLTagReader.TagIs("LastLayerViewPosition")) { XMLTagReader xMLTagReader2 = context.NewTagReader("LastLayerViewPosition"); MapPosition mapPosition = null; while (xMLTagReader2.FindNextStartTag()) { if (xMLTagReader2.TagIs(MapPosition.GetXMLTag(context.version))) { mapPosition = new MapPosition(context, null, MercatorCoordinateSystem.theInstance); } } if (mapPosition != null) { this._lastView = new LayerView(this, mapPosition); } } else { if (xMLTagReader.TagIs(RenderClip.GetXMLTag())) { this._renderClip = new RenderClip(context); } } } } } return; } throw new InvalidMashupFile(context, "Expected displayName attribute"); }