public static void AddTerraTile(string baseName, double lngPerTile, double latPerTile, TileTerra tile) { if (snapLat == null) { snapLng = new SnapList(lngPerTile, false); snapLat = new SnapList(latPerTile, false); } if (!CameraTrack.camTrackTerraTiles.Contains(baseName)) { CameraTrack.camTrackTerraTiles.Add(baseName); // adding to snap lists prepares them for calculating snap points: GeoCoord tl = tile.getTopLeft(); GeoCoord br = tile.getBottomRight(); snapLat.Add(tl.Lat); snapLat.Add(br.Lat); snapLng.Add(tl.Lng); snapLng.Add(br.Lng); } }