mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Extend map projections
This commit is contained in:
parent
57e614978b
commit
d8d1cbccaf
27 changed files with 448 additions and 207 deletions
|
|
@ -37,17 +37,21 @@ namespace MapControl
|
|||
|
||||
if (projection != null && items != null)
|
||||
{
|
||||
image = await Task.Run(() => GetImage(projection, boundingBox, items));
|
||||
var mapRect = projection.BoundingBoxToMapRect(boundingBox);
|
||||
|
||||
if (mapRect != null)
|
||||
{
|
||||
image = await Task.Run(() => GetImage(projection, mapRect, items));
|
||||
}
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
private DrawingImage GetImage(MapProjection projection, BoundingBox boundingBox, IEnumerable<IMapDrawingItem> items)
|
||||
private DrawingImage GetImage(MapProjection projection, MapRect mapRect, IEnumerable<IMapDrawingItem> items)
|
||||
{
|
||||
var scale = ParentMap.ViewTransform.Scale;
|
||||
var rotation = ParentMap.ViewTransform.Rotation;
|
||||
var mapRect = projection.BoundingBoxToMapRect(boundingBox);
|
||||
var drawings = new DrawingGroup();
|
||||
|
||||
foreach (var item in items)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue