根据GPS数据的经纬度取天气预报和地名

    技术2022-05-19  23

    一.根据经纬度取地名

    1. http://maps.google.cn/maps/geo?output=xml&key=abcdef&q=22.51822,113.93711

    2. http://maps.google.cn/maps/geo?output=csv&key=abcdef&q=22.51822,113.93711

    3. http://ditu.google.cn/maps/geo?output=xml&key=abcdef&q=22.51822,113.93711

    4. http://ditu.google.cn/maps/geo?output=csv&key=abcdef&q=22.51822,113.93711

     

    二.取天气预报

    1.根据地名取天气预报

        http://www.google.co.uk/ig/api?weather=shenzhen

     

    2.根据经纬度取天气预报(注意经纬度格式)

        http://www.google.co.uk/ig/api?weather=,,,22518220,113937110

     

     三.另外一种根据经纬度取地名的方法

    http://api.365ditu.mobi/service/BaseService.ashx?action=getdistrict&userid=ytyl&password=ytyl0218&lng=113.31477&lat=23.21118   返回的结果格式如下:   <?xml version="1.0" encoding="utf-8" ?> <Result Success="True" Count="1"> <District      DistrictId="441823"      Name="阳山县"      ShortName="阳山"      TelAreaCode="0763"      Longitude="112.6264"      Latitude="24.466519"      Area="3374.83"      IsCapital="False"      FlagId="3"      ParentId="441800"      ProvinceId="440000"      ProvinceName="广东省"      CityId="441800"      CityName="清远市"      CountyId="441823"      CountyName="阳山县" /> </Result>

    最新回复(0)