高德地图IP定位2.0接口已下线。
class amap_ipconfig:amap
{
//文档:https://lbs.amap.com/api/webservice/guide/api/ipconfig
private string ip = "114.247.50.2";
private string type = "4"; // 4/6 ipv4/ipv6
private string output = "json";//json/xml
private string apiurl = "https://restapi.amap.com/v3/ip?";
public string IP { get => ip; set => ip = value; }
public string Type { get => type; set => type = value; }
public override string GetRequestUrl()
{
return apiurl + "key=" + base.key + "&output=" + output + "&ip=" + ip + "&type=" + type;
}
}