Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ExtLibs/GMap.NET.Core/GMap.NET/PureProjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ public List<GPoint> GetAreaTileList(RectLatLng rect, int zoom, int padding)
return ret;
}

/// <summary>
/// get number of tiles in rect at specific zoom
/// </summary>
public long GetAreaTileNumber(RectLatLng rect, int zoom, int padding)
{
GPoint topLeft = FromPixelToTileXY(FromLatLngToPixel(rect.LocationTopLeft, zoom));
GPoint rightBottom = FromPixelToTileXY(FromLatLngToPixel(rect.LocationRightBottom, zoom));
return (rightBottom.X - topLeft.X + 1) * (rightBottom.Y - topLeft.Y + 1);
}

/// <summary>
/// The ground resolution indicates the distance (in meters) on the ground that’s represented by a single pixel in the map.
/// For example, at a ground resolution of 10 meters/pixel, each pixel represents a ground distance of 10 meters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ void worker_DoWork(object sender, DoWorkEventArgs e)
list.Clear();
list = null;
}
worker.ReportProgress(0, 0);
list = provider.Projection.GetAreaTileList(area, zoom, 0);
maxOfTiles = provider.Projection.GetTileMatrixMaxXY(zoom);
all = list.Count;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading