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 

  • 相关阅读:
    rest_framework 认证组件 权限组件
    Django rest_framework 序列化组件
    django 跨域问题
    python的magic methods
    RESTful规范
    BBS论坛 后台管理
    BBS论坛 文章详情、点赞、评论
    BBS论坛 home主页与个人站点主页
    好用的SqlParamterList
    教你如何在实战项目中使用WCF
  • 原文地址:https://www.cnblogs.com/eebb/p/1666315.html
Copyright © 2011-2022 走看看