【问题标题】:Address in autocomplete results自动完成结果中的地址
【发布时间】:2021-08-28 13:15:00
【问题描述】:

当我在地址响应中执行自动建议请求时,我只会收到标签。地址对象未填充。

这是我的要求:https://autosuggest.search.hereapi.com/v1/autosuggest?at=48.8578817,2.2791249999999934&limit=5&q=stj&apikey=xxxx

我收到这个:

            "title": "Top Services (Stj)",
            "id": "here:pds:place:250u09wj-afceace0a11b49bca950ea22d0f8e452",
            "resultType": "place",
            "address": {
                "label": "********"
            },

我需要收到没有姓名的格式化地址

我该如何解决这个问题?

谢谢

【问题讨论】:

    标签: here-api autosuggest here-maps-rest heremaps


    【解决方案1】:

    我们已尝试重现您的查询,它对我们有用,请参阅以下代码。

    请查看文档页面以获取有关自动建议的详细信息

    文档链接:

    https://autosuggest.search.hereapi.com/v1/autosuggest?at=48.8578817,2.2791249999999934&limit=5&q=stj&apikey=XXXX.

    查询结果:

    {
      "items": [
        {
          "title": "Top Services (Stj)",
          "id": "here:pds:place:250u09wj-afceace0a11b49bca950ea22d0f8e452",
          "resultType": "place",
          "address": {
            "label": "Top Services, 61 Rue du Faubourg Saint-Denis, 75010 Paris, France"
          },
          "position": {
            "lat": 48.8721,
            "lng": 2.35384
          },
          "access": [
            {
              "lat": 48.87208,
              "lng": 2.35392
            }
          ],
          "distance": 5690,
          "categories": [
            {
              "id": "700-7200-0254",
              "name": "Construction",
              "primary": true
            },
            {
              "id": "700-7200-0264",
              "name": "Services de conseil et de gestion"
            },
            {
              "id": "700-7200-0277",
              "name": "Entrepreneur de second œuvre"
            }
          ],
          "highlights": {
            "title": [
              {
                "start": 14,
                "end": 17
              }
            ],
            "address": {
              "label": [
                
              ]
            }
          }
        },
        {
          "title": "La Clinique du Scooter d'Occasion (Stj 2 Roues)",
          "id": "here:pds:place:250u09tv-591de1b090c54199b11154a72f462c0d",
          "resultType": "place",
          "address": {
            "label": "La Clinique du Scooter d'Occasion, 148 Boulevard du Montparnasse, 75014 Paris, France"
          },
          "position": {
            "lat": 48.84039,
            "lng": 2.33383
          },
          "access": [
            {
              "lat": 48.84052,
              "lng": 2.33393
            }
          ],
          "distance": 4451,
          "categories": [
            {
              "id": "400-4200-0241",
              "name": "Services logistiques",
              "primary": true
            }
          ],
          "highlights": {
            "title": [
              {
                "start": 35,
                "end": 38
              }
            ],
            "address": {
              "label": [
                
              ]
            }
          }
        },
        {
          "title": "Stjohn's",
          "id": "here:pds:place:2501r4ve-43f913ba8f9b0e7046aaee61bcfe8b9b",
          "resultType": "place",
          "address": {
            "label": "Stjohn's, 11 Rue Edmond Valentin, 75007 Paris, France"
          },
          "position": {
            "lat": 48.85961,
            "lng": 2.30159
          },
          "access": [
            {
              "lat": 48.85968,
              "lng": 2.30157
            }
          ],
          "distance": 1655,
          "categories": [
            {
              "id": "700-7400-0141",
              "name": "Services aux entreprises",
              "primary": true
            },
            {
              "id": "700-7200-0252",
              "name": "Publicité, marketing, communication et études de marché"
            }
          ],
          "highlights": {
            "title": [
              {
                "start": 0,
                "end": 3
              }
            ],
            "address": {
              "label": [
                {
                  "start": 0,
                  "end": 3
                }
              ]
            }
          }
        },
        {
          "title": "Stjohn S",
          "id": "here:pds:place:250u09tv-0f38e06dd8634ab4a0d931dad94de24c",
          "resultType": "place",
          "address": {
            "label": "Stjohn S, 4 Rue des Petits-Pères, 75002 Paris, France"
          },
          "position": {
            "lat": 48.86601,
            "lng": 2.34027
          },
          "access": [
            {
              "lat": 48.8662,
              "lng": 2.34023
            }
          ],
          "distance": 4564,
          "categories": [
            {
              "id": "700-7200-0252",
              "name": "Publicité, marketing, communication et études de marché",
              "primary": true
            },
            {
              "id": "700-7200-0271",
              "name": "Services financiers et d'assurance"
            }
          ],
          "highlights": {
            "title": [
              {
                "start": 0,
                "end": 3
              }
            ],
            "address": {
              "label": [
                {
                  "start": 0,
                  "end": 3
                }
              ]
            }
          }
        },
        {
          "title": "Espace St-Jo'",
          "id": "here:pds:place:250u09te-220742c64e4a40a48b8772987e7f987c",
          "resultType": "place",
          "address": {
            "label": "Espace St-Jo', 54 Rue du Moulin de Pierres, 92140 Clamart, France"
          },
          "position": {
            "lat": 48.80865,
            "lng": 2.26594
          },
          "access": [
            {
              "lat": 48.8087,
              "lng": 2.2659
            }
          ],
          "distance": 5558,
          "categories": [
            {
              "id": "200-2200-0000",
              "name": "Théâtre, musique et culture",
              "primary": true
            },
            {
              "id": "200-2000-0015",
              "name": "Salle de spectacle/concert"
            },
            {
              "id": "550-5520-0000",
              "name": "Aire de loisirs"
            }
          ],
          "references": [
            {
              "supplier": {
                "id": "yelp"
              },
              "id": "xJtl5krT8OZ3QYXtMl6Leg"
            }
          ],
          "highlights": {
            "title": [
              {
                "start": 7,
                "end": 12
              }
            ],
            "address": {
              "label": [
                {
                  "start": 7,
                  "end": 12
                }
              ]
            }
          }
        }
      ],
      "queryTerms": [
        
      ]
    }
    

    【讨论】:

      猜你喜欢
      • 2015-11-13
      • 1970-01-01
      • 1970-01-01
      • 2013-10-24
      • 2018-09-15
      • 1970-01-01
      • 1970-01-01
      • 2020-09-15
      • 2017-08-05
      相关资源
      最近更新 更多