Skip to content

CustomData

此类表示检索lbs云服务的数据。它没有构造函数,但可通过对象字面量形式表示。要检索lbs云服务的数据,需要在引用api的时候在参数后加上lbs云平台的key。

属性

属性类型描述
geotableIdNumberlbs云v2接口,可在lbs云平台上查看自己的geotableId
tagsString空格分隔的多字符串
filterString过滤条件,参考:lbsyun.baidu.com/index.php?title=lbscloud/api/geosearch

示例

ts
// 创建lbs云服务数据对象
const customData = {
  geotableId: 123456,
  tags: "tag1 tag2 tag3",
  filter: "field1:value1"
};

// 在搜索时使用
localSearch.search('关键词', {
  customData: customData
});

基于 MIT 许可发布