Ejemplo n.º 1
0
        protected void btnShow_Click(object sender, EventArgs e)
        {
            string strLoccode   = lstLocation.SelectedItem.Value;
            string strVehicleno = string.Empty;
            string url;

            if (txtVehicleno.Text.Trim().Length > 4)
            {
                strVehicleno = txtVehicleno.Text.Trim();
            }
            else
            {
                strVehicleno = lstVehicle.SelectedItem.Text;
            }

            string strResponse = string.Empty;

            url = System.Configuration.ConfigurationManager.AppSettings["DHANUKAAPIURL"];
            url = url.Replace("{0}", strLoccode);
            url = url.Replace("{1}", strVehicleno);

            strResponse = CCommon.GET(url);
            //Label1.Text = strResponse;
            DisplayResult(strResponse);
        }
Ejemplo n.º 2
0
        protected void btnShow_Click(object sender, EventArgs e)
        {
            string url;

            string strResponse = string.Empty;

            url = @"https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=28.514922,77.085373&destinations=28.639471%2C77.3494702%7C28.579471%2C77.349470%7C28.564449%2C77.386243&key=AIzaSyAh6fWrqkQI3rK3uJXGbCgPXBt-ntStwpI";

            //url = System.Configuration.ConfigurationManager.AppSettings["DHANUKAAPIURL"];
            strResponse = CCommon.GET(url);
            //Label1.Text = strResponse;
            DisplayResult(strResponse);
            // Bestech 28.404361, 77.043254
            // Gyan Khand 1 28.639471, 77.349470
            //Jasola Vihar %7C28.547444%2C77.289726

            //28.564449, 77.386243    mahagun moderne
            // 28.514922, 77.085373    office
        }