|
TencentMapSDK_iOS_3D_v6.4.0
|
实例方法 | |
| (void) | - setBoundaryByRegionWithCityName:autoExtend: |
| 指定地区名称 | |
| (void) | - setBoundaryByRegionWithCityName:autoExtend:center: |
| 指定地区名称 | |
| (void) | - setBoundaryByNearbyWithCenterCoordinate:radius:autoExtend: |
| 周边搜索 圆形区域范围 | |
| (void) | - setBoundaryByRectangleWithleftBottomCoordinate:rightTopCoordinate: |
| 矩形范围 | |
| (void) | - setFilterByCategories: |
| 构建filter | |
属性 | |
| NSUInteger | page_size |
| 每页条目数,最大限制为20条。 默认10条 | |
| NSUInteger | page_index |
| 第x页,默认第1页 | |
| NSString * | keyword |
| 必填 POI搜索关键字,用于全文检索字段 例如:keyword=酒店 | |
| NSString * | boundary |
| 搜索地理范围, 语法参考:http://lbs.qq.com/webservice_v1/guide-search.html#boundary_detail , | |
| NSString * | filter |
| 筛选条件 | |
| NSString * | orderby |
| 排序方式: 排序,目前仅周边搜索(boundary=nearby) 支持按距离由近到远排序,默认取值取值:_distance, 以到boundary的中心点距离排序;当orderby为空时, 以POI权重排序 | |
| NSNumber * | get_subpois |
| 是否返回子地点,如大厦停车场、出入口等 本参数只对 boundary = nearby()和boundary = region()有效 | |
| NSNumber * | sub_title_format |
| 子点名称格式 取值: 0 [默认]代表全写(主点名称+子点名称) 1 简写(仅子点名称) | |
属性 继承自 QMSSearchOption | |
| NSString * | added_fields |
| 设置额外字段, 每个字段使用,分隔, 例如 added_fields=cities,tolldistance | |
| NSDictionary< NSString *, NSString * > * | extraParam |
| 设置请求补充参数, 例如:"get_subpois" : @"1"} | |
| - (void) setBoundaryByNearbyWithCenterCoordinate: | (CLLocationCoordinate2D) | centerCoordinate | |
| radius: | (NSUInteger) | radius | |
| autoExtend: | (BOOL) | isAutoEntend |
周边搜索 圆形区域范围
| centerCoordinate | 中心坐标 |
| radius | 半径/米 |
| isAutoEntend | 当前范围无结果时,是否自动扩大范围。 取值1:自动扩大范围; 取值0:不扩大。 |
| - (void) setBoundaryByRectangleWithleftBottomCoordinate: | (CLLocationCoordinate2D) | leftBottomCoordinate | |
| rightTopCoordinate: | (CLLocationCoordinate2D) | rightTopCoordinate |
矩形范围
| leftBottomCoordinate | 左下/西南 坐标 |
| rightTopCoordinate | 右上/东北 坐标 |
| - (void) setBoundaryByRegionWithCityName: | (NSString *) | cityName | |
| autoExtend: | (BOOL) | isAutoEntend |
指定地区名称
| cityName | 检索区域名称, 城市名字,如北京市。 |
| isAutoEntend | 当前城市搜索无结果,是否自动扩大范围。 取值1:自动扩大范围; 取值0:仅在当前城市搜索。 |
| - (void) setBoundaryByRegionWithCityName: | (NSString *) | cityName | |
| autoExtend: | (BOOL) | isAutoEntend | |
| center: | (CLLocationCoordinate2D) | coordinate |
指定地区名称
| cityName | 检索区域名称, 城市名字,如北京市。 |
| isAutoEntend | 当前城市搜索无结果,是否自动扩大范围。 取值1:自动扩大范围; 取值0:仅在当前城市搜索。 |
| coordinate | 搜索的建议中心点。当用户使用泛关键词搜索时(如酒店、超市),这类搜索多为了查找附近,使用此参数,搜索结果以此坐标为中心,返回就近地点,体验更优。 |
| - (void) setFilterByCategories: | (NSArray< NSString * > *) | categories |
构建filter
| categories | 为数组,最多支持5个分类词,会影响filter的值 |
|
readwritenonatomiccopy |
搜索地理范围, 语法参考:http://lbs.qq.com/webservice_v1/guide-search.html#boundary_detail ,
本接口提供更灵活的参数组合能力 示例1,指定地区名称,不自动扩大范围:boundary=region(北京,0) 或者boundary=region(北京,0,39.9018,116.94038) 等 示例2,周边搜索(圆形范围):boundary=nearby(39.908491,116.374328,1000) 或者 boundary=nearby(39.908491,116.374328,1000,0) 等 示例3,矩形区域范围:boundary=rectangle(39.9072,116.3689,39.9149,116.3793)
SDK提供快捷构建该属性的方法
|
readwritenonatomiccopy |
筛选条件
搜索指定分类 例如传入“category=公交站”则最终会被组装为filter=category=公交站
搜索多个分类 举例:category=大学,中学
腾讯地图POI分类关键词参考: http://lbs.qq.com/webservice_v1/guide-appendix.html
SDK提供快捷构建该属性的方法
|
readwritenonatomiccopy |
是否返回子地点,如大厦停车场、出入口等 本参数只对 boundary = nearby()和boundary = region()有效
取值: 0 [默认]不返回 1 返回