Find County name for a Lat/Long

后端 未结 5 1793
暖寄归人
暖寄归人 2021-02-05 08:00

I\'m trying to find a webservice that will allow me to get a County name (not Country) for a specific Lat/Long. I would be performing the lookup within a server application (li

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 08:34

    Maybe this is a great solution.It is in a json format.I always use this in my projects.

    http://maps.google.com/maps/geo?ll=10.345561,123.896932

    And simply extract the information using php.

    $x = file_get_contents("http://maps.google.com/maps/geo?ll=10.345561,123.896932");
    
    $j_decodex = json_decode($x);
    
    print_r($j_decodex);
    

提交回复
热议问题