File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
sdkproject/Assets/Mapbox/Unity/Utilities Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -200,13 +200,13 @@ public static RectD TileBounds(UnwrappedTileId unwrappedTileId)
200
200
/// <param name="longitude"> The longitude. </param>
201
201
/// <param name="zoom"> Zoom level. </param>
202
202
/// <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 )
204
204
{
205
205
var x = ( int ) Math . Floor ( ( longitude + 180.0 ) / 360.0 * Math . Pow ( 2.0 , zoom ) ) ;
206
206
var y = ( int ) Math . Floor ( ( 1.0 - Math . Log ( Math . Tan ( latitude * Math . PI / 180.0 )
207
207
+ 1.0 / Math . Cos ( latitude * Math . PI / 180.0 ) ) / Math . PI ) / 2.0 * Math . Pow ( 2.0 , zoom ) ) ;
208
208
209
- return new Vector2d ( x , y ) ;
209
+ return new UnwrappedTileId ( x , y , zoom ) ;
210
210
}
211
211
212
212
/// <summary>
You can’t perform that action at this time.
0 commit comments