예제 #1
0
        public static String produceMapPoint(Point s,Point e,int count,String cardIndex,int beginCardNumber)
        {
            Console.WriteLine("produceMapPoint");
            MapPointList mapPointss = new MapPointList();

            double sss = ((double)2 / (double)100);
            debug("sss = " + sss);

            debug("e.x = "+e.X+"e.y"+e.Y);
            debug("s.x = " + s.X + "s.y" + s.Y);
            double xstep = (((double)e.X - (double)s.X) / count);
            debug("xstep = " + xstep);
            double ystep = (((double)e.Y - (double)s.Y) / count);
            debug("ystep = " + ystep);
            for (int i = 0; i < count;i++)
            {
                MapPoints mapPoint = new MapPoints();
                //debug("xstep * count = " + xstep * i);

                mapPoint.x = (int)(s.X + xstep * i);
                mapPoint.y = (int)(s.Y + ystep * i);
                mapPointss.add(cardIndex + "" + (beginCardNumber + i), mapPoint);

                /*mapPoint.id = cardIndex + "" + (beginCardNumber + i);

                debug("i = "+i+"  x = " + mapPoint.point.X + " y = " + mapPoint.point.Y);
                list.add(mapPoint);*/
                //setProgressBar1();

            }
            string output = ConvertJsonString(JsonConvert.SerializeObject(mapPointss));

            Console.WriteLine(output);

            return output;
        }
예제 #2
0
 public void add(String id ,MapPoints mapPoints)
 {
     this.mapPoints.Add(id, mapPoints);
 }