当前位置: 首页>>代码示例>>C#>>正文


C# BoundingBox.ToExtent方法代码示例

本文整理汇总了C#中BoundingBox.ToExtent方法的典型用法代码示例。如果您正苦于以下问题:C# BoundingBox.ToExtent方法的具体用法?C# BoundingBox.ToExtent怎么用?C# BoundingBox.ToExtent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BoundingBox的用法示例。


在下文中一共展示了BoundingBox.ToExtent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetFeatures

 public IList<IFeature> GetFeatures(BoundingBox box, double resolution, ITileSchema schema, ITileCache<Feature> memoryCache)
 {
     var dictionary = new Dictionary<TileIndex, IFeature>();
     var levelId = BruTile.Utilities.GetNearestLevel(schema.Resolutions, resolution);
     GetRecursive(dictionary, schema, memoryCache, box.ToExtent(), levelId);
     var sortedFeatures = dictionary.OrderByDescending(t => schema.Resolutions[t.Key.Level].UnitsPerPixel);
     return sortedFeatures.ToDictionary(pair => pair.Key, pair => pair.Value).Values.ToList();
 }
开发者ID:pauldendulk,项目名称:Mapsui,代码行数:8,代码来源:RenderGetStrategy.cs

示例2: GetFeatures

        public IList<IFeature> GetFeatures(BoundingBox box, double resolution, ITileSchema schema, ITileCache<Feature> memoryCache)
        {
            var tiles = schema.GetTileInfos(box.ToExtent(), resolution);
            var result = new List<IFeature>();
            foreach (var tileInfo in tiles)
            {
                var feature = memoryCache.Find(tileInfo.Index);

                if (feature != null)
                {
                    result.Add(feature);
                }
            }
            return result;
        }
开发者ID:pauldendulk,项目名称:Mapsui,代码行数:15,代码来源:MinimalRenderGetStrategy.cs

示例3: GetFeaturesInView

        public override IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
        {
            var dictionary = new Dictionary<TileIndex, IFeature>();

            if (Schema == null) return dictionary.Values;

            var levelId = BruTile.Utilities.GetNearestLevel(Schema.Resolutions, resolution);
            RenderGetStrategy.GetRecursive(dictionary, Schema, _memoryCache, box.ToExtent(), levelId);
            
            var sortedDictionary = (from entry in dictionary orderby entry.Key ascending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);
            return sortedDictionary.Values;
        }
开发者ID:jdeksup,项目名称:Mapsui.Net4,代码行数:12,代码来源:GroupTileLayer.cs

示例4: ViewChanged

        public override void ViewChanged(bool majorChange, BoundingBox extent, double resolution)
        {
            foreach (var tileLayer in Layers)
            {
                tileLayer.ViewChanged(majorChange, extent, resolution);
            }

            if (Schema == null) return;
            var infos = Schema.GetTileInfos(extent.ToExtent(), BruTile.Utilities.GetNearestLevel(Schema.Resolutions, resolution));
            foreach (var tileInfo in infos)
            {
                if (_memoryCache.Find(tileInfo.Index) == null)
                {
                    TileLayerDataChanged(this, new DataChangedEventArgs(null, false, tileInfo, Name));
                }
            }
        }
开发者ID:jdeksup,项目名称:Mapsui.Net4,代码行数:17,代码来源:GroupTileLayer.cs


注:本文中的BoundingBox.ToExtent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。