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

Unexpected behaviour on SetZoom

Open streepje8 opened this issue 3 years ago • 1 comments

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

  • Unity version: 2021.3.11f1

    • Scripting Runtime Version: I think the same as the api level, but the setting seems to be gone from my project settings (unity removed it?)
    • Scripting Backend: Mono
    • Api Compatibility Level: .NET Standard 2.1
  • Mapbox SDK version: 2.0.1

  • The platform you're building to: The bug occurs in the unity editor. My build target is Android.

  • A description of what you're trying to do: Setting the zoom on a map

  • Steps to recreate the bug if appropriate: I used the following code, expecting the map zoom to change. This however, crashed the unity engine (probebly because an infinite loop occured somewhere). image

  • Links to your logs are also helpful: There is no special logs.

Adding this line to the SetZoom function fixed the issue. Although I'm not familiar with the mapbox codebase at all, so I have no idea what other code could be impacted by this. image

streepje8 avatar Mar 01 '23 20:03 streepje8

try using UpdateMap(Vector2d latLon, float zoom) function

smahalgavaiya avatar Jul 09 '23 11:07 smahalgavaiya