Пример #1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="dpc"></param>
    void GetDataPointInfo()
    {
        while (!goForApi)
        {
            Debug.Log("Go for Api " + goForApi.ToString());
            Thread.Sleep(1000);
        }

        foreach (var item in dataPointId)
        {
            List <Dictionary <string, string> > dataPointInformation = new List <Dictionary <string, string> >(); /// Will hold point name, description and image hex

            dataPointInformation.Add(api.GetPointInformation(item["id"]));

            DataPointInfo dpi = new DataPointInfo(item["id"],
                                                  dataPointInformation[0]["point_name"] + "\n" + dataPointInformation[0]["point_desc"],
                                                  api.HexStringToBinary(dataPointInformation[0]["point_image"]),
                                                  (float)item["longitude"],
                                                  (float)item["latitude"]);
            dpInfo.Add(dpi);
            Debug.Log("Entered dp info");
        }

        goForDataPoints = true;
    }