Пример #1
0
    APICalls()
    {
        Debug.Log("API Calls being made");
        osmMapData = await Task.Run(() => api.GetOsmMap());   //working

        mapBounds = await Task.Run(() => api.GetMapBounds()); //working

        Debug.Log("Datapoint getting");
        dataPointId = await Task.Run(() => api.GetPointLocations());

        models = await Task.Run(() => api.GetModels());

        try
        {
            histMapContainer = api.GetHistMap();
            historyMapData   = histMapContainer.MapData;
            historyMap       = gWorld.LoadDataIntoTexture(historyMapData);
        }
        catch (Exception e)
        {
            Debug.Log("Historical map not found: " + e);
            // This means there was no historical map in the db
        }
        goForApi = true;
    }