Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Error when using Mapbox UpdateMap() function in Unity

Discussion in 'Getting Started' started by wuy420, Jun 16, 2020.

  1. wuy420

    wuy420

    Joined:
    Apr 22, 2019
    Posts:
    17
    I'm developing a project using Mapbox and Unity.
    Mapbox sdk: 2.1.1
    Unity: 2018.4.13f1

    The problem is when I try to use the UpdateMap() in C#, it doesn't display nothing in the scene other than just a flat plane. And the size of the map also changed.
    Before
    Before button clicked.png
    After executing UpdateMap() After button clicked.png
    As you can see in the image, each tile has an error in the "Vector Data State" option.
    No idea why this is happening.
     
  2. wuy420

    wuy420

    Joined:
    Apr 22, 2019
    Posts:
    17
    I found the reason. It is just stupid. I am using API to acquire longitude and latitude from an online database. But the longitude and latitude in the database are opposite, so UpdateMap() cannot load. Sorry for the dumb question.