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);
							}
						}
					}
				}
			}
		}
示例#2
0
        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);
                            }
                        }
                    }
                }
            }
        }
示例#3
0
        //[CompilerGenerated]
        //private static Comparison<ThumbnailRecord> <>9__CachedAnonymousMethodDelegate1;

        public SourceMapRecord(Layer layer, SourceMap sourceMap, MapTileSourceFactory mapTileSourceFactory)
        {
            displayName      = sourceMap.displayName;
            sourceMapInfo    = sourceMap.sourceMapInfo;
            userBoundingRect = sourceMap.GetUserBoundingBox(mapTileSourceFactory);
            maxZoom          = sourceMap.sourceMapRenderOptions.maxZoom;
            try
            {
                imageTransformer =
                    sourceMap.registration.warpStyle.getImageTransformer(sourceMap.registration,
                                                                         InterpolationMode.Invalid);
            }
            catch (Exception)
            {
            }

            foreach (Legend current in sourceMap.legendList)
            {
                legendRecords.Add(new LegendRecord("legends",
                                                   sourceMap.GetLegendFilename(current),
                                                   current.displayName,
                                                   current.GetOutputSizeSynchronously(mapTileSourceFactory.CreateDisplayableUnwarpedSource(sourceMap)
                                                                                      .GetUserBounds(current.latentRegionHolder, FutureFeatures.Cached))));
            }

            sourceMapLegendFrame = new SourceMapLegendFrame(layer,
                                                            sourceMap,
                                                            legendRecords,
                                                            thumbnailForLegendFrame);
        }
		public SourceMapLegendFrame(Layer layer, SourceMap sourceMap, List<LegendRecord> legendRecords, SourceMapLegendFrame.ThumbnailDelegate thumbnailDelegate)
		{
			this.filename = RenderState.ForceValidFilename(string.Format("SourceMap_{0}_{1}.html", layer.displayName, sourceMap.displayName));
			this.displayName = sourceMap.displayName;
			this.sourceMapInfo = sourceMap.sourceMapInfo;
			this.legendRecords = legendRecords;
			this.thumbnailDelegate = thumbnailDelegate;
		}
示例#5
0
 public void WriteXML(XmlTextWriter writer)
 {
     writer.WriteStartElement(SourceMapLegendFrame.GetXMLTag());
     writer.WriteAttributeString("Filename", this.filename);
     writer.WriteAttributeString("URL", this.GetURL());
     writer.WriteAttributeString("Width", this.size.Width.ToString(CultureInfo.InvariantCulture));
     writer.WriteAttributeString("Height", this.size.Height.ToString(CultureInfo.InvariantCulture));
     writer.WriteEndElement();
 }
示例#6
0
        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();
        }
        //[CompilerGenerated]
        //private static Comparison<ThumbnailRecord> <>9__CachedAnonymousMethodDelegate1;
		
        public SourceMapRecord(Layer layer, SourceMap sourceMap, MapTileSourceFactory mapTileSourceFactory)
		{
			this.displayName = sourceMap.displayName;
			this.sourceMapInfo = sourceMap.sourceMapInfo;
			this.userBoundingRect = sourceMap.GetUserBoundingBox(mapTileSourceFactory);
			this.maxZoom = sourceMap.sourceMapRenderOptions.maxZoom;
			try
			{
				this.imageTransformer = sourceMap.registration.warpStyle.getImageTransformer(sourceMap.registration, InterpolationMode.Invalid);
			}
			catch (Exception)
			{
			}
			foreach (Legend current in sourceMap.legendList)
			{
				this.legendRecords.Add(new LegendRecord("legends", sourceMap.GetLegendFilename(current), current.displayName, current.GetOutputSizeSynchronously(mapTileSourceFactory.CreateDisplayableUnwarpedSource(sourceMap).GetUserBounds(current.latentRegionHolder, FutureFeatures.Cached))));
			}
			this.sourceMapLegendFrame = new SourceMapLegendFrame(layer, sourceMap, this.legendRecords, new SourceMapLegendFrame.ThumbnailDelegate(this.thumbnailForLegendFrame));
		}