Skip to content
Snippets Groups Projects
Commit b8b5937b authored by Knuiman, Bart's avatar Knuiman, Bart
Browse files

SyncGPS adjusted

parent d3301f3a
No related branches found
No related tags found
No related merge requests found
......@@ -82,10 +82,15 @@ namespace Wander
private List<TileDownload> requests = new List<TileDownload>();
private List<Task<List<TreeIsland>>> treeIslandTasks;
public void SetGPSCoord(Vector2 gps)
public void SetGPSCoord(Vector4 gps)
{
wgs84Lat = gps.x;
wgs84Lon = gps.y;
// Calc size at original zoom, we might use a diff zoom here (very likely).
float size = (gps.w*2+1)*gps.z; // (NumRings*2+1) is nTiles wide. Times gps.z == tileSize == totalSize.
float tileSize = (float)RDUtils.CalcTileSizeRD( zoom );
int numTiles = Mathf.FloorToInt( (size + tileSize/2) / tileSize );
numRings = (numTiles-1)/2 + 1;
}
internal void CancelAndClean()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment