mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
IMapLayer.SupportedMapProjections
This commit is contained in:
parent
046cebb341
commit
b5dac4a854
8 changed files with 144 additions and 103 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
#if WPF
|
||||
|
|
@ -126,6 +127,8 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public double LoadingProgress => (double)GetValue(LoadingProgressProperty);
|
||||
|
||||
public abstract IReadOnlyCollection<string> SupportedMapProjections { get; }
|
||||
|
||||
protected override void SetParentMap(MapBase map)
|
||||
{
|
||||
if (map != null)
|
||||
|
|
@ -183,7 +186,11 @@ namespace MapControl
|
|||
ImageSource image = null;
|
||||
BoundingBox boundingBox = null;
|
||||
|
||||
if (ParentMap != null && ParentMap.ActualWidth > 0d && ParentMap.ActualHeight > 0d)
|
||||
if (ParentMap != null &&
|
||||
ParentMap.ActualWidth > 0d &&
|
||||
ParentMap.ActualHeight > 0d &&
|
||||
SupportedMapProjections != null &&
|
||||
SupportedMapProjections.Contains(ParentMap.MapProjection.CrsId))
|
||||
{
|
||||
var width = ParentMap.ActualWidth * RelativeImageSize;
|
||||
var height = ParentMap.ActualHeight * RelativeImageSize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue