Skip to content

Commit c6f8fe2

Browse files
authored
Fix compile error related to return type. (#572)
minor change.
1 parent 6b7bc6b commit c6f8fe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdkproject/Assets/Mapbox/Unity/Utilities/Conversions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ public static RectD TileBounds(UnwrappedTileId unwrappedTileId)
200200
/// <param name="longitude"> The longitude. </param>
201201
/// <param name="zoom"> Zoom level. </param>
202202
/// <returns> A <see cref="T:UnityEngine.Vector2d"/> xy tile ID. </returns>
203-
public static Vector2d LatitudeLongitudeToTileId(double latitude, double longitude, int zoom)
203+
public static UnwrappedTileId LatitudeLongitudeToTileId(double latitude, double longitude, int zoom)
204204
{
205205
var x = (int)Math.Floor((longitude + 180.0) / 360.0 * Math.Pow(2.0, zoom));
206206
var y = (int)Math.Floor((1.0 - Math.Log(Math.Tan(latitude * Math.PI / 180.0)
207207
+ 1.0 / Math.Cos(latitude * Math.PI / 180.0)) / Math.PI) / 2.0 * Math.Pow(2.0, zoom));
208208

209-
return new Vector2d(x, y);
209+
return new UnwrappedTileId(x, y, zoom);
210210
}
211211

212212
/// <summary>

0 commit comments

Comments
 (0)