mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

GeoToWorldPosition returning NaN for posY for lat 90.246...

Open liquidbuddha opened this issue 3 years ago • 3 comments

Hello, back again. :)

Note: If this is a bug or support ticket, please provide the following information:

  • Unity version: 2020.3.34f1

    • Scripting Runtime Version: (na)
    • Scripting Backend: Mono
    • Api Compatibility Level: .NET standard 2.0
  • Mapbox SDK version: v2.1.1

  • The platform you're building to: Editor / Mac / Win

  • A description of what you're trying to do: I'm getting a NaN for the posy when trying to get a vector2d for a lat/lon pair of 90.246.../-146.834...

I'm drawing a box with a center point in the US and box bounds of 3000m radius to show the limits of a lat/lon search of aircraft positions. When I hit 3k miles, this NaN error pops and break my box drawing. Seems fine under 3k. Curious why I'm getting a not-a-number when its trying to calculate a lat of 90.246... ? What can I do to trap for this or otherwise limit the query so I can always get a real number?

  • Steps to recreate the bug if appropriate: Please see the attachment for the specifics.

Screen Shot 2022-09-20 at 8 59 58 AM

liquidbuddha avatar Sep 20 '22 13:09 liquidbuddha

纬度最多是90

maki0315 avatar Sep 27 '22 04:09 maki0315

thank you. I'll trap for that. Cheers.

liquidbuddha avatar Oct 07 '22 14:10 liquidbuddha

@liquidbuddha latitude range is in between -90 and 90 so any value above 90 shouldn't happen at all. So it looks like there's something wrong with input here.

brnkhy avatar Oct 17 '22 06:10 brnkhy