Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string         com = Session["cmd"].ToString();
            SqlDataAdapter da  = new SqlDataAdapter(com, con);
            DataSet        ds  = new DataSet();
            da.Fill(ds);

            DataTable dt = new DataTable();
            dt.Columns.Add(new DataColumn("Latitude"));
            dt.Columns.Add(new DataColumn("Longitude"));

            DataRow row;


            int rows = ds.Tables[0].Rows.Count;
            for (int i = 0; i < rows; i++)
            {
                row              = dt.NewRow();
                row["Latitude"]  = ds.Tables[0].Rows[i][0].ToString();
                row["Longitude"] = ds.Tables[0].Rows[i][1].ToString();
                dt.Rows.Add(row);
            }
            js.Text = GPSLib.PlotGPSPoints(dt);
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add(new DataColumn("Latitude"));
            dt.Columns.Add(new DataColumn("Longitude"));

            DataRow row = dt.NewRow();
            row["Latitude"]  = 33.779005;
            row["Longitude"] = -118.178985;
            dt.Rows.Add(row);

            row              = dt.NewRow();
            row["Latitude"]  = 33.879005;
            row["Longitude"] = -118.098985;
            dt.Rows.Add(row);

            row              = dt.NewRow();
            row["Latitude"]  = 33.979005;
            row["Longitude"] = -118.218985;
            dt.Rows.Add(row);

            js.Text = GPSLib.PlotGPSPoints(dt);;
        }
    }