google 谷歌place 搜索地点 api

https://maps.googleapis.com/maps/api/place/queryautocomplete/json?&key=kjkutuj6868hLRdrZm4&input=广州海底捞

 

输入文字,搜索相关地址,返回结果列表。上面的key是错误的,自行替换

返回结果如下

{
   "predictions" : [
      {
         "description" : "中国广州越秀区北京路海底捞火锅",
         "id" : "2755d50dde9978c30bce4e4b5ac8d3118822722f",
         "matched_substrings" : [
            {
               "length" : 2,
               "offset" : 2
            },
            {
               "length" : 3,
               "offset" : 10
            }
         ],
         "place_id" : "ChIJ9elOtcb4AjQRQvnfXD7sOr4",
         "reference" : "ChIJ9elOtcb4AjQRQvnfXD7sOr4",
         "structured_formatting" : {
            "main_text" : "海底捞火锅",
            "main_text_matched_substrings" : [
               {
                  "length" : 3,
                  "offset" : 0
               }
            ],
            "secondary_text" : "中国广州越秀区北京路",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 2,
                  "offset" : 2
               }
            ]
         },
         "terms" : [
            {
               "offset" : 10,
               "value" : "海底捞火锅"
            },
            {
               "offset" : 7,
               "value" : "北京路"
            },
            {
               "offset" : 4,
               "value" : "越秀区"
            },
            {
               "offset" : 2,
               "value" : "广州"
            },
            {
               "offset" : 0,
               "value" : "中国"
            }
         ],
         "types" : [ "restaurant", "food", "point_of_interest", "establishment" ]
      },
      {
         "description" : "中国广东省广州天河区天河北兆业街海底捞火锅",
         "id" : "aff65a66e4497d2f08e7f2a734124aba111b7622",
         "matched_substrings" : [
            {
               "length" : 2,
               "offset" : 5
            },
            {
               "length" : 3,
               "offset" : 16
            }
         ],
         "place_id" : "ChIJ2cKhcuP-AjQRpse5ZGYgAyo",
         "reference" : "ChIJ2cKhcuP-AjQRpse5ZGYgAyo",
         "structured_formatting" : {
            "main_text" : "海底捞火锅",
            "main_text_matched_substrings" : [
               {
                  "length" : 3,
                  "offset" : 0
               }
            ],
            "secondary_text" : "中国广东省广州天河区天河北兆业街",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 2,
                  "offset" : 5
               }
            ]
         },
         "terms" : [
            {
               "offset" : 16,
               "value" : "海底捞火锅"
            },
            {
               "offset" : 13,
               "value" : "兆业街"
            },
            {
               "offset" : 10,
               "value" : "天河北"
            },
            {
               "offset" : 7,
               "value" : "天河区"
            },
            {
               "offset" : 5,
               "value" : "广州"
            },
            {
               "offset" : 2,
               "value" : "广东省"
            },
            {
               "offset" : 0,
               "value" : "中国"
            }
         ],
         "types" : [ "restaurant", "food", "point_of_interest", "establishment" ]
      },
      {
         "description" : "中国广东省广州海珠区客村海底捞火锅(珠影·星光城)",
         "id" : "311f41e14c614dd53c2c3a8030de22d3d52edad5",
         "matched_substrings" : [
            {
               "length" : 2,
               "offset" : 5
            },
            {
               "length" : 3,
               "offset" : 12
            }
         ],
         "place_id" : "ChIJs79FPWP_AjQRpgZs6U9FEHU",
         "reference" : "ChIJs79FPWP_AjQRpgZs6U9FEHU",
         "structured_formatting" : {
            "main_text" : "海底捞火锅(珠影·星光城)",
            "main_text_matched_substrings" : [
               {
                  "length" : 3,
                  "offset" : 0
               }
            ],
            "secondary_text" : "中国广东省广州海珠区客村",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 2,
                  "offset" : 5
               }
            ]
         },
         "terms" : [
            {
               "offset" : 12,
               "value" : "海底捞火锅(珠影·星光城)"
            },
            {
               "offset" : 10,
               "value" : "客村"
            },
            {
               "offset" : 7,
               "value" : "海珠区"
            },
            {
               "offset" : 5,
               "value" : "广州"
            },
            {
               "offset" : 2,
               "value" : "广东省"
            },
            {
               "offset" : 0,
               "value" : "中国"
            }
         ],
         "types" : [ "premise", "geocode" ]
      },
      {
         "description" : "中国广东省广州海珠区客村新港中路海底捞火锅",
         "id" : "f4218805d4d5e6d0187b3db431901452c322cc66",
         "matched_substrings" : [
            {
               "length" : 2,
               "offset" : 5
            },
            {
               "length" : 3,
               "offset" : 16
            }
         ],
         "place_id" : "ChIJKz1i7WP_AjQRlYMn03srGm8",
         "reference" : "ChIJKz1i7WP_AjQRlYMn03srGm8",
         "structured_formatting" : {
            "main_text" : "海底捞火锅",
            "main_text_matched_substrings" : [
               {
                  "length" : 3,
                  "offset" : 0
               }
            ],
            "secondary_text" : "中国广东省广州海珠区客村新港中路",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 2,
                  "offset" : 5
               }
            ]
         },
         "terms" : [
            {
               "offset" : 16,
               "value" : "海底捞火锅"
            },
            {
               "offset" : 12,
               "value" : "新港中路"
            },
            {
               "offset" : 10,
               "value" : "客村"
            },
            {
               "offset" : 7,
               "value" : "海珠区"
            },
            {
               "offset" : 5,
               "value" : "广州"
            },
            {
               "offset" : 2,
               "value" : "广东省"
            },
            {
               "offset" : 0,
               "value" : "中国"
            }
         ],
         "types" : [ "restaurant", "food", "point_of_interest", "establishment" ]
      },
      {
         "description" : "中国广东省广州白云区机场路海底捞火锅",
         "id" : "72fb6f7223a80b61ad6898b937abd0c63a5099e4",
         "matched_substrings" : [
            {
               "length" : 2,
               "offset" : 5
            },
            {
               "length" : 3,
               "offset" : 13
            }
         ],
         "place_id" : "ChIJFd-bE977AjQRrlN3-8HtxZ4",
         "reference" : "ChIJFd-bE977AjQRrlN3-8HtxZ4",
         "structured_formatting" : {
            "main_text" : "海底捞火锅",
            "main_text_matched_substrings" : [
               {
                  "length" : 3,
                  "offset" : 0
               }
            ],
            "secondary_text" : "中国广东省广州白云区机场路",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 2,
                  "offset" : 5
               }
            ]
         },
         "terms" : [
            {
               "offset" : 13,
               "value" : "海底捞火锅"
            },
            {
               "offset" : 10,
               "value" : "机场路"
            },
            {
               "offset" : 7,
               "value" : "白云区"
            },
            {
               "offset" : 5,
               "value" : "广州"
            },
            {
               "offset" : 2,
               "value" : "广东省"
            },
            {
               "offset" : 0,
               "value" : "中国"
            }
         ],
         "types" : [ "restaurant", "food", "point_of_interest", "establishment" ]
      }
   ],
   "status" : "OK"
}

 

你可能感兴趣的:(Android开发,spring,boot)