zoukankan      html  css  js  c++  java
  • font


    Your key is:
    ABQIAAAAdYLK_lYoKp8jQ4_HgIwcHxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSrgeFLmlNqJPs1xT4rnzEV8SGDjg



    JavaScript Maps API Example

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true_or_false&amp;key=ABQIAAAAdYLK_lYoKp8jQ4_HgIwcHxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSrgeFLmlNqJPs1xT4rnzEV8SGDjg" type="text/javascript"></script>



    HTTP Service Example

    http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8\
    &sensor=true_or_false&key=ABQIAAAAdYLK_lYoKp8jQ4_HgIwcHxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSrgeFLmlNqJPs1xT4rnzEV8SGDjg


    http://code.google.com/apis/maps/documentation/geocoding/

     1       /// <summary>
     2       /// 获取两点(经纬度表示)间的距离
     3       /// </summary>
     4       /// <param name="p1Lat">第一点纬度值</param>
     5       /// <param name="p1Lng">第一点经度值</param>
     6       /// <param name="p2Lat">第二点纬度值</param>
     7       /// <param name="p2Lng">第二点经度值</param>
     8       /// <returns>返回两点间距离</returns>
     9       public double GetDistance(double p1Lat, double p1Lng, double p2Lat, double p2Lng)
    10       {
    11          double dLat1InRad = p1Lat * (Math.PI / 180);
    12          double dLong1InRad = p1Lng * (Math.PI / 180);
    13          double dLat2InRad = p2Lat * (Math.PI / 180);
    14          double dLong2InRad = p2Lng * (Math.PI / 180);
    15          double dLongitude = dLong2InRad - dLong1InRad;
    16          double dLatitude = dLat2InRad - dLat1InRad;
    17          double a = Math.Pow(Math.Sin(dLatitude / 2), 2+ Math.Cos(dLat1InRad) * Math.Cos(dLat2InRad) * Math.Pow(Math.Sin(dLongitude / 2), 2);
    18          double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
    19          double dDistance = EarthRadiusKm * c;
    20          return dDistance;
    21       }
    22 
    23       /// <summary>
    24       /// Radius of the Earth
    25       /// </summary>
    26       public double EarthRadiusKm = 6378.137// WGS-84 

  • 相关阅读:
    hi35183e增加exfat文件系统的支持(转)
    UDP 单播、广播和多播(转)
    linux系统中,kill -3查看java进程状态无效的解决方法
    js是用什么语言编写实现的
    云海天教程
    Docker下安装MySQL
    如何延长手机的使用寿命时间
    如何延长空调使用寿命?
    Linux 发送邮件
    Linux jstack命令
  • 原文地址:https://www.cnblogs.com/eebb/p/1666315.html
Copyright © 2011-2022 走看看