我正在尝试使用google map api获取正确的Lat Long以获取以下地址的地址 .

它正在从formatted_address消除酒店名称,我没有得到所需的lat long .

预期成果:(纬度:3.171632 |经度:101.695846)

实际结果:(“lat”:3.1708103,“lng”:101.6961378)

https://maps.googleapis.com/maps/api/geocode/json?address=Vistana+Hotel+Kuala+Lumpur+Jalan+Lumut+Kuala+Lumpur+Federal+Territory+of+Kuala+Lumpur+Malaysia&key=MY_KEY

输出:

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "Jalan Lumut",
               "short_name" : "Jalan Lumut",
               "types" : [ "route" ]
            },
            {
               "long_name" : "Titiwangsa Sentral",
               "short_name" : "Titiwangsa Sentral",
               "types" : [ "sublocality_level_1", "sublocality", "political" ]
            },
            {
               "long_name" : "Kuala Lumpur",
               "short_name" : "Kuala Lumpur",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Wilayah Persekutuan Kuala Lumpur",
               "short_name" : "Wilayah Persekutuan Kuala Lumpur",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "Malaysia",
               "short_name" : "MY",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "50400",
               "short_name" : "50400",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "Jalan Lumut, Titiwangsa Sentral, 50400 Kuala Lumpur, Wilayah Persekutuan Kuala Lumpur, Malaysia",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 3.171799,
                  "lng" : 101.697601
               },
               "southwest" : {
                  "lat" : 3.1698591,
                  "lng" : 101.6954027
               }
            },
            "location" : {
               "lat" : 3.1708103,
               "lng" : 101.6961378
            },
            "location_type" : "GEOMETRIC_CENTER",
            "viewport" : {
               "northeast" : {
                  "lat" : 3.172178030291502,
                  "lng" : 101.6978508302915
               },
               "southwest" : {
                  "lat" : 3.169480069708498,
                  "lng" : 101.6951528697085
               }
            }
         },
         "partial_match" : true,
         "place_id" : "ChIJHXuFpCJIzDER0VmfA41SBU8",
         "types" : [ "route" ]
      }
   ],
   "status" : "OK"
}

如果我错过了什么,有人可以告诉我吗?