Exemple #1
0
    void Start()
    {
        ServicePointManager.ServerCertificateValidationCallback += (p1, p2, p3, p4) => true;

        var request = new GeocodingRequest("AIzaSyAzYNj5AyuB0e8KSmSdyzMLYnYtJRVnNho")
        {
            Region   = "us",
            Language = "en"
        };

        Debug.Log(request.GetURL());

        request.Send("MIT Manipal")
        .Then(response => Debug.Log(JsonUtility.ToJson(response)))
        .Catch(exception => Debug.Log(exception));
    }
Exemple #2
0
        async void Start()
        {
            UniMapInitializer.Initialize();

            var request = new GeocodingRequest("KEY")
            {
                Region   = "us",
                Language = "en"
            };

            try {
                var response = await request.Send("MIT Manipal");

                Debug.Log(JsonUtility.ToJson(response));
            }
            catch (Exception e) {
                Debug.LogError(e);
            }
        }