You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

开发Web应用自动补全组件:H.PlacesService相关技术疑问

HERE PlacesService.suggest Deprecation & Autosuggest Replacement Guide

Great questions—let’s break this down clearly since HERE’s Places API changes can be a bit confusing at first.

Why was PlacesService.suggest deprecated?

HERE deprecated the suggest endpoint (and its corresponding PlacesService.suggest method) mainly to streamline their Places API ecosystem. The old suggest endpoint was limited in functionality compared to newer tools: it lacked support for advanced filtering like category-based suggestions, location-aware result biasing, and unified results for addresses, POIs, and search terms. By sunsetting this endpoint, HERE focused on maintaining a single, robust solution that covers all autocomplete use cases—the Autosuggest API. This consolidation ensures consistent feature updates, better performance, and a more intuitive experience for developers.

Is Autosuggest the official replacement?

Absolutely. The Autosuggest API is the direct, supported replacement for the deprecated suggest endpoint. It’s built to handle every place autocomplete scenario you might need, with key improvements like:

  • Unified suggestions for addresses, points of interest, and general search queries
  • Support for location biasing to prioritize results near a user’s current position
  • Flexible filtering by category, country, or other custom parameters
  • More relevant and accurate results compared to the old suggest endpoint

Should you still use the PlacesService wrapper?

Since the official PlacesService doesn’t currently implement the Autosuggest endpoint, sticking strictly to the existing wrapper isn’t the most efficient path. Here are two solid alternatives:

  1. Direct REST API calls: You can call the Autosuggest REST endpoint directly from your frontend code. This gives you full control over parameters and response handling without relying on a wrapper that doesn’t support the feature you need.
  2. Custom wrapper extension: If you want to keep a consistent wrapper pattern across your app (to align with other HERE service integrations), create a custom extension of PlacesService (or a separate service class) that wraps the Autosuggest API calls. This way, you maintain organized code while using the supported endpoint.

Either way, moving away from the deprecated suggest method is critical to keep your app functional as HERE phases out that endpoint entirely.

内容的提问来源于stack exchange,提问作者Luca Rasconi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 08:34:37