예제 #1
0
    private void Awake()
    {
        keyPoints     = new List <Vector3>();
        totalDistance = 0;
        AddPoint(Vector3.zero);

        if (useRealPath)
        {
            GPSConverter   coordConverter = GetComponent <GPSConverter>();
            List <Vector3> gpsCoords      = coordConverter.GetPathPoints();
            Debug.Log("Number of gps points: " + gpsCoords.Count);
            for (int i = 0; i < gpsCoords.Count; i++)
            {
                Vector3 coord = gpsCoords[i];
                Debug.Log("Coord: " + coord);
                coord = Vector3.right * coord.magnitude;
                AddPoint(coord);

                //GameObject pickup = Instantiate<GameObject>(pickupPrefab);
                //pickup.transform.position = coord;
            }
        }

        else
        {
            AddPoint(300 * Vector3.right);
        }
    }
예제 #2
0
파일: Program.cs 프로젝트: TheLuther/Fork
        static void Main(string[] args)
        {
            if (GPSConverter.DeviceGPSToBaiduGPS("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 120.379235583333, 36.19172925, out double x, out double y))
            {
                Console.WriteLine($"120.379235583333 - 36.19172925");
                Console.WriteLine($"{x} - {y}");
            }
http:       //api.map.baidu.com/geocoder/v2/?location=36.1981373852607,120.390842831702&output=json&ak=iAe652kYOgleRHUYQkW1E8MIHEptnMb5
            Console.ReadLine();
        }
예제 #3
0
파일: Program.cs 프로젝트: force0908/Fork
        static void Main(string[] args)
        {
            if (GPSConverter.DeviceGPSToBaiduGPS("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 120.379235583333, 36.19172925, out double x, out double y))
            {
                Console.WriteLine($"120.379235583333 - 36.19172925");
                Console.WriteLine($"{x} - {y}");
            }


            GPSInfoWebModel model = GPSInfoTool.GetInfo("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 40.039669, 252.129464);

            if (model != null)
            {
                GPSInfoModel info = model.ToGPSInfoModel();
                Console.WriteLine(info);
            }
            Console.ReadLine();
        }