public CrunchedLayer(RenderOptions renderOptions, Layer layer, List<RangeDescriptor> rangeDescriptors, MapTileSourceFactory mapTileSourceFactory) { this.displayName = layer.GetDisplayName(); this.namingScheme = new VENamingScheme(layer.GetFilesystemName(), renderOptions.GetOutputTileSuffix()); this.rangeDescriptors = rangeDescriptors; bool flag; this.defaultView = this.GetDefaultView(layer, new Size(600, 600), mapTileSourceFactory, out flag); foreach (SourceMap current in layer) { this.sourceMapRecords.Add(new SourceMapRecord(layer, current, mapTileSourceFactory)); } }
public Mashup() { this.dirtyEvent.Add(new DirtyListener(this.SetDirtyFlag)); this._layerList = new LayerList(this.dirtyEvent); this.renderOptions = new RenderOptions(this.dirtyEvent); }
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; } } } }
internal void Setup(RenderOptions renderOptions, Mashup currentMashup, MapTileSourceFactory mapTileSourceFactory, RenderProgressPanel2.LaunchRenderedBrowserDelegate LaunchRenderedBrowser, RenderState.FlushRenderedTileCachePackageDelegate flushRenderedTileCachePackage) { this.renderOptionsPanel.SetRenderOptions(renderOptions); this.renderProgressPanel.Setup(currentMashup, mapTileSourceFactory, LaunchRenderedBrowser, flushRenderedTileCachePackage); }
public void SetRenderOptions(RenderOptions renderOptions) { if (!BuildConfig.theConfig.enableS3) { this.renderToFileRadio.Visible = false; this.renderToS3radio.Visible = false; } if (this.renderOptions != null) { this.renderOptions.dirtyEvent.Remove(new DirtyListener(this.PromptReload)); } this.renderOptions = renderOptions; if (this.renderOptions != null) { this.renderOptions.dirtyEvent.Add(new DirtyListener(this.PromptReload)); } this.PromptReload(); }
public Mashup() { dirtyEvent.Add(SetDirtyFlag); _layerList = new LayerList(dirtyEvent); renderOptions = new RenderOptions(dirtyEvent); }
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())) { _layerList = new LayerList(context, GetFilenameContext, dirtyEvent, readyToLockEvent); } else { if (context.version == MonolithicMapPositionsSchema.schema && xMLTagReader.TagIs(SourceMap.GetXMLTag())) { if (_layerList != null && _layerList.Count > 0) { throw new InvalidMashupFile(context, string.Format("Multiple SourceMaps in Version {0} file.", context.version.versionNumberString)); } SourceMap sourceMap = new SourceMap(context, GetFilenameContext, dirtyEvent, readyToLockEvent); _layerList = new LayerList(dirtyEvent); _layerList.AddNewLayer(); _layerList.First.Add(sourceMap); } else { if (xMLTagReader.TagIs(RenderOptions.GetXMLTag())) { renderOptions = new RenderOptions(context, dirtyEvent, ref singleMaxZoomForEntireMashupCompatibilityBlob); } else { if (xMLTagReader.TagIs(LastViewTag)) { XMLTagReader xMLTagReader2 = context.NewTagReader(LastViewTag); text = context.reader.GetAttribute(LastView_TargetIdAttr); xMLTagReader2.SkipAllSubTags(); } } } } } _lastView = new NoView(); if (text != null) { object obj = context.FetchObjectByIdentity(text); if (obj != null && obj is LastViewIfc) { _lastView = ((LastViewIfc)obj).lastView; } } if (renderOptions == null) { if (context.version != MonolithicMapPositionsSchema.schema) { context.warnings.Add(new MashupFileWarning("RenderOptions tag absent.")); } renderOptions = new RenderOptions(dirtyEvent); } if (singleMaxZoomForEntireMashupCompatibilityBlob != null) { D.Assert(context.version == SingleMaxZoomForEntireMashupSchema.schema); foreach (Layer current in _layerList) { foreach (SourceMap current2 in current) { current2.sourceMapRenderOptions.maxZoom = singleMaxZoomForEntireMashupCompatibilityBlob.maxZoom; } } } }