コード例 #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();
        }