new Suggestion(Viewer)
app/suggestion/Suggestion.js, line 26
构造一个suggestion对象
Name | Type | Description |
---|---|---|
Viewer |
Viewer |
Classes
Methods
-
staticSuggestion.getDataByAMap(keywords, options, outputCoordType){Promise}
app/suggestion/Suggestion.js, line 63 -
调用高德的输入提示服务获取数据
Name Type Description keywords
String 输入的关键词
options
Object 查询参数,可以不设置
Name Type Default Description city
String "全国" optional 查询城市
location
Array 指定点位,传入location参数后,返回结果将以距离进行排序
outputCoordType
String 输出的数据的坐标类型,
AMap/BMap/TMap/GMap
options.url
String 高德地图输入提示服务URL,有默认值
options.key
String 高德地图输入提示服务key,有默认值
Returns:
Type Description Promise 输入提示返回的数据 -
staticSuggestion.getDataByBMap(keywords, options, outputCoordType){Promise}
app/suggestion/Suggestion.js, line 79 -
Name Type Description keywords
String 输入的关键词
options
Object 查询参数,可以不设置
Name Type Default Description city
String "全国" optional 查询城市
location
Array 指定点位,传入location参数后,返回结果将以距离进行排序
outputCoordType
String 输出的数据的坐标类型,
AMap/BMap/TMap/GMap
options.url
String 百度地图输入提示服务URL,有默认值
options.key
String 百度地图输入提示服务key,有默认值
- Deprecated
- (弃用)调用百度的输入提示服务获取数据
Returns:
Type Description Promise 输入提示返回的数据 -
search(keywords, options){Promise}
app/suggestion/Suggestion.js, line 46 -
获取输入提示
Name Type Description keywords
String 输入的关键词
options
Object 查询参数,可以不设置
Name Type Default Description city
String "全国" optional 查询城市
location
Array 指定点位,传入location参数后,返回结果将以距离进行排序
Returns:
Type Description Promise 输入提示返回的数据