Thread: -- Deleted --
View Single Post
Old 14.09.2006, 06:49   #21
astrid
Архивный участник
 
Join Date: May 2006
Posts: 55
Default

hell, make it yourself. its easy. try like this (c#):
Code:
public class map : System.Web.UI.Page	
{ 
	private void Page_Load(System.Object sender, System.EventArgs e)
	{
		String Conn = (String) ((NameValueCollection) Context.GetConfig("system.web/dsnstore"))["sql"];
		SqlConnection pubsConn = new SqlConnection(Conn);
		DataSet ds = new DataSet();
		SqlConnection myConnection = new SqlConnection(Conn);
		SqlDataAdapter myCommand = new SqlDataAdapter("SELECT xloc, yloc FROM user_data WHERE (login > logout)", myConnection);
		myCommand.Fill(ds);
		myConnection.Close();
		draw(ds);
	}

	public void draw(DataSet coord)
	{
		System.Drawing.Image img = null;
		System.Drawing.Image imgmark = null;
		Bitmap bmp = null;
		try
		{
			img = new Bitmap( "c4_map.jpg" );
			imgmark = new Bitmap( "cross.gif" );
			int width = img.Width;
			int height = img.Height;

			bmp = new Bitmap(width, height);
			gfx = Graphics.FromImage(img);
			foreach(DataRow myRow in coord.Tables[0].Rows)
			{
				int xloc=Convert.ToInt32(myRow["xloc"]);
				int yloc=Convert.ToInt32(myRow["yloc"]);
				int x=0;
				int y=0;
				x=Convert.ToInt32(Math.Round(((xloc+131064.0)/885.5),0));
				y=Convert.ToInt32(Math.Round(((yloc+262136.0)/890.1),0));

				gfx.DrawImage(imgmark, x, y);
			}
			Response.ContentType = "image/jpeg";
			bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
		}
		catch ( System.Exception ) 
		{ 
		}
		finally
		{
			if(gfx!=null) gfx.Dispose();
			if(img!=null) imgaden.Dispose();
			if(imgmark!=null) imgmark.Dispose();
		}
	}
}
on php must be something similar. just calculate right aspect ratios for your map size.
astrid is offline