本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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));
}
}
}