mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
ImageLoader
This commit is contained in:
parent
560f44a139
commit
069072ce34
6 changed files with 73 additions and 71 deletions
|
|
@ -35,16 +35,16 @@ namespace MapControl
|
|||
{
|
||||
private class GeoBitmap
|
||||
{
|
||||
public GeoBitmap(BitmapSource bitmapSource, Matrix transform, MapProjection projection)
|
||||
public GeoBitmap(BitmapSource bitmap, Matrix transform, MapProjection projection)
|
||||
{
|
||||
var p1 = transform.Transform(new Point());
|
||||
var p2 = transform.Transform(new Point(
|
||||
#if AVALONIA
|
||||
bitmapSource.PixelSize.Width, bitmapSource.PixelSize.Height));
|
||||
bitmap.PixelSize.Width, bitmap.PixelSize.Height));
|
||||
#else
|
||||
bitmapSource.PixelWidth, bitmapSource.PixelHeight));
|
||||
bitmap.PixelWidth, bitmap.PixelHeight));
|
||||
#endif
|
||||
BitmapSource = bitmapSource;
|
||||
BitmapSource = bitmap;
|
||||
LatLonBox = projection != null
|
||||
? new LatLonBox(projection.MapToBoundingBox(new Rect(p1, p2)))
|
||||
: new LatLonBox(p1.Y, p1.X, p2.Y, p2.X);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue