如何使用此处的地图API获取位置图片?

时间:2019-01-19 11:47:36

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

下面的此保证会返回我附近的附近商店,结果包含每个商店位置的某些信息,例如标题,alterantiveNames,id,位置,位置...和图标“标记”,但该商店没有图像像google map一样,当我们搜索餐厅时,会看到我使用此处的地图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)
            });
    })

1 个答案:

答案 0 :(得分:-1)

Pleaces 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": []
    }