【问题标题】:Get the location picture using here map API?使用here map API获取位置图片?
【发布时间】:2019-01-19 11:47:35
【问题描述】:

下面的承诺返回我所在位置附近的商店,结果包含每个商店位置的某些信息,例如标题、替代名称、id、位置、附近...和图标“标记”。

但是没有像谷歌地图这样的商店的图像,当我们搜索餐厅时,我们看到的餐厅图像正是我使用这里地图 API 所需要的?

    return new Promise((resolve, reject) => {
        // do some async stuff
        var placesService = this.platform.getPlacesService(),
            parameters = {
                at:this.cookieService.get('User_lat')+","+this.cookieService.get('User_lng'),
                cat:'shop'
            };
        placesService.explore(parameters,
            (result) => {
                resolve(result)
            }, (_error) => {
                reject(_error)
            });
    })

【问题讨论】:

    标签: google-maps-api-3 here-api here-maps-rest map-api


    【解决方案1】:

    Places API 还提供图标。在这里你可以看到一个例子:

    https://developer.here.com/api-explorer/rest/places

    在此响应部分中提供了图标的链接:

    {
      "items": [
        {
          "id": "eat-drink",
          "title": "Essen und Trinken",
          "icon": "https://download.vcdn.cit.data.here.com/p/d/places2_stg/icons/categories/03.icon",
          "type": "urn:nlp-types:category",
          "href": "https://places.demo.api.here.com/places/v1/categories/places/eat-drink?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg",
          "system": "places",
          "within": []
        }
    

    ,

    【讨论】:

      猜你喜欢
      • 2019-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-30
      • 2022-08-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多