예제 #1
0
파일: Ranger.cs 프로젝트: tkokan/Ranger
        /// <summary>
        /// Creates a dynamic Google map.
        /// </summary>
        public void CreateDynamicMap(MapAreaInputs mapAreaInput, MapInputs mapInputs)
        {
            // build a filename with origin name, range, grid size and smooth percentage
            var fileName = string.Format(
                "{0}-Rng{1}-Unt{2}-Pct{3}.html",
                mapAreaInput.OriginName.Replace(" ", ""),
                mapAreaInput.RangeMins.ToString("000"),
                mapAreaInput.UnitDistance,
                mapAreaInput.SmoothPct.ToString("000"));

            CreateDynamicMap(new List <MapAreaInputs>()
            {
                mapAreaInput
            }, mapInputs, fileName);
        }
예제 #2
0
파일: Program.cs 프로젝트: tkokan/Ranger
        static void Main(string[] args)
        {
            var ranger = new Ranger();

            var mapAreaInputs = new MapAreaInputs()
            {
                OriginName = "Rome, Italy"
            };

            var mapInputs = new MapInputs();

            ranger.CreateDynamicMap(mapAreaInputs, mapInputs);

            var area = ranger.CalculateArea(mapAreaInputs);

            Console.WriteLine("Area = {0:0.00} sq km", area);

            Console.WriteLine("Done");
            Console.ReadLine();
        }