Initial commit
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* BMKBusLineSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "BMKPoiSearchType.h"
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
#import "BMKBusLineSearchOption.h"
|
||||
#import "BMKRouteSearchType.h"
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
@protocol BMKBusLineSearchDelegate;
|
||||
///busline搜索服务
|
||||
@interface BMKBusLineSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKBusLineSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*公交详情检索
|
||||
*异步函数,返回结果在BMKBusLineSearchDelegate的onGetBusDetailResult通知
|
||||
*@param busLineSearchOption 公交线路检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)busLineSearch:(BMKBusLineSearchOption*)busLineSearchOption;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
///搜索delegate,用于获取搜索结果
|
||||
@protocol BMKBusLineSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回busdetail搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param busLineResult 搜索结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetBusDetailResult:(BMKBusLineSearch*)searcher result:(BMKBusLineResult*)busLineResult errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* BMKBusLineSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
/// 公交线路检索信息类
|
||||
@interface BMKBusLineSearchOption : NSObject
|
||||
{
|
||||
NSString *_city;
|
||||
NSString *_busLineUid;
|
||||
}
|
||||
///城市名
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
///公交线路的uid
|
||||
@property (nonatomic, strong) NSString *busLineUid;
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// BMKDistrictSearch.h
|
||||
// SearchComponent
|
||||
//
|
||||
// Created by wzy on 15/12/14.
|
||||
// Copyright © 2015年 baidu. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BMKDistrictSearch_h
|
||||
#define BMKDistrictSearch_h
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
/// 行政区域检索信息
|
||||
@interface BMKDistrictSearchOption : NSObject
|
||||
|
||||
/// 城市名字(必须)
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
/// 区县名字(可选)
|
||||
@property (nonatomic, strong) NSString *district;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/// 行政区域检索结果
|
||||
@interface BMKDistrictResult : NSObject
|
||||
|
||||
/// 行政区域编码
|
||||
@property (nonatomic, assign) NSInteger code;
|
||||
/// 行政区域名称
|
||||
@property (nonatomic, strong) NSString *name;
|
||||
/// 行政区域中心点
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D center;
|
||||
/// 行政区边界直角地理坐标点数据(NSString数组,字符串数据格式为: @"x,y;x,y")
|
||||
@property (nonatomic, strong) NSArray *paths;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@protocol BMKDistrictSearchDelegate;
|
||||
|
||||
/// 行政区域搜索服务
|
||||
@interface BMKDistrictSearch : BMKSearchBase
|
||||
/// 检索模块的delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKDistrictSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*行政区域检索
|
||||
*异步函数,返回结果在BMKDistrictSearchDelegate的onGetDistrictResult通知
|
||||
*@param DistrictSearchOption 公交线路检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)districtSearch:(BMKDistrictSearchOption*)districtSearchOption;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
///搜索delegate,用于获取行政区域搜索结果
|
||||
@protocol BMKDistrictSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回行政区域搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结BMKDistrictSearch果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetDistrictResult:(BMKDistrictSearch *)searcher result:(BMKDistrictResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* BMKDistrictSearch_h */
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* BMKGeocodeSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "BMKGeocodeSearchOption.h"
|
||||
#import "BMKGeocodeType.h"
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
@protocol BMKGeoCodeSearchDelegate;
|
||||
///geo搜索服务
|
||||
@interface BMKGeoCodeSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKGeoCodeSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*根据地址名称获取地理信息
|
||||
*异步函数,返回结果在BMKGeoCodeSearchDelegate的onGetAddrResult通知
|
||||
*@param geoCodeOption geo检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)geoCode:(BMKGeoCodeSearchOption*)geoCodeOption;
|
||||
/**
|
||||
*根据地理坐标获取地址信息
|
||||
*异步函数,返回结果在BMKGeoCodeSearchDelegate的onGetAddrResult通知
|
||||
*@param reverseGeoCodeOption 反geo检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)reverseGeoCode:(BMKReverseGeoCodeOption*)reverseGeoCodeOption;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
///搜索delegate,用于获取搜索结果
|
||||
@protocol BMKGeoCodeSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回地址信息搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结BMKGeoCodeSearch果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回反地理编码搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* BMKGeoCodeSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2013 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
/// geo检索信息类
|
||||
@interface BMKGeoCodeSearchOption : NSObject
|
||||
{
|
||||
NSString *_address;
|
||||
NSString *_city;
|
||||
}
|
||||
///地址
|
||||
@property (nonatomic, strong) NSString *address;
|
||||
///城市名
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
@end
|
||||
|
||||
///反geo检索信息类
|
||||
@interface BMKReverseGeoCodeOption : NSObject {
|
||||
CLLocationCoordinate2D _reverseGeoPoint;
|
||||
}
|
||||
///经纬度
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D reverseGeoPoint;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* BMKGeocodeType.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
|
||||
///反地址编码结果
|
||||
@interface BMKReverseGeoCodeResult : NSObject
|
||||
{
|
||||
BMKAddressComponent* _addressDetail;
|
||||
NSString* _address;
|
||||
CLLocationCoordinate2D _location;
|
||||
NSArray* _poiList;
|
||||
}
|
||||
///层次化地址信息
|
||||
@property (nonatomic, strong) BMKAddressComponent* addressDetail;
|
||||
///地址名称
|
||||
@property (nonatomic, strong) NSString* address;
|
||||
///商圈名称
|
||||
@property (nonatomic, strong) NSString* businessCircle;
|
||||
///结合当前位置POI的语义化结果描述
|
||||
@property (nonatomic, strong) NSString* sematicDescription;
|
||||
///地址坐标
|
||||
@property (nonatomic) CLLocationCoordinate2D location;
|
||||
///地址周边POI信息,成员类型为BMKPoiInfo
|
||||
@property (nonatomic, strong) NSArray* poiList;
|
||||
|
||||
@end
|
||||
|
||||
///地址编码结果
|
||||
@interface BMKGeoCodeResult : NSObject
|
||||
{
|
||||
CLLocationCoordinate2D _location;
|
||||
NSString* _address;
|
||||
}
|
||||
///地理编码位置
|
||||
@property (nonatomic) CLLocationCoordinate2D location;
|
||||
///地理编码地址
|
||||
@property (nonatomic,strong) NSString* address;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* BMKPoiSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "BMKPoiSearchType.h"
|
||||
#import "BMKPoiSearchOption.h"
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
@protocol BMKPoiSearchDelegate;
|
||||
///搜索服务
|
||||
@interface BMKPoiSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKPoiSearchDelegate> delegate;
|
||||
|
||||
|
||||
/**
|
||||
*城市POI检索
|
||||
*异步函数,返回结果在BMKPoiSearchDelegate的onGetPoiResult通知
|
||||
*@param option 城市内搜索的搜索参数类(BMKCitySearchOption)
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)poiSearchInCity:(BMKCitySearchOption*)option;
|
||||
|
||||
/**
|
||||
*根据范围和检索词发起范围检索
|
||||
*异步函数,返回结果在BMKPoiSearchDelegate的onGetPoiResult通知
|
||||
*@param option 范围搜索的搜索参数类(BMKBoundSearchOption)
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)poiSearchInbounds:(BMKBoundSearchOption*)option;
|
||||
/**
|
||||
*根据中心点、半径和检索词发起周边检索
|
||||
*异步函数,返回结果在BMKPoiSearchDelegate的onGetPoiResult通知
|
||||
*@param option 周边搜索的搜索参数类(BMKNearbySearchOption)
|
||||
*@param index 页码,如果是第一次发起搜索,填0,根据返回的结果可以去获取第n页的结果,页码从0开始
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)poiSearchNearBy:(BMKNearbySearchOption*)option;
|
||||
/**
|
||||
*根据poi uid 发起poi详情检索
|
||||
*异步函数,返回结果在BMKPoiSearchDelegate的onGetPoiDetailResult通知
|
||||
*@param option poi详情检索参数类(BMKPoiDetailSearchOption)
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)poiDetailSearch:(BMKPoiDetailSearchOption*)option;
|
||||
/**
|
||||
*poi室内检索
|
||||
*异步函数,返回结果在BMKPoiSearchDelegate的onGetPoiIndoorResult通知
|
||||
*@param option poi室内检索参数类(BMKPoiIndoorSearchOption)
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)poiIndoorSearch:(BMKPoiIndoorSearchOption*)option;
|
||||
@end
|
||||
|
||||
///搜索delegate,用于获取搜索结果
|
||||
@protocol BMKPoiSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回POI搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param poiResult 搜索结果列表
|
||||
*@param errorCode 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetPoiResult:(BMKPoiSearch*)searcher result:(BMKPoiResult*)poiResult errorCode:(BMKSearchErrorCode)errorCode;
|
||||
|
||||
/**
|
||||
*返回POI详情搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param poiDetailResult 详情搜索结果
|
||||
*@param errorCode 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetPoiDetailResult:(BMKPoiSearch*)searcher result:(BMKPoiDetailResult*)poiDetailResult errorCode:(BMKSearchErrorCode)errorCode;
|
||||
|
||||
/**
|
||||
*返回POI室内搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param poiIndoorResult 搜索结果列表
|
||||
*@param errorCode 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetPoiIndoorResult:(BMKPoiSearch*)searcher result:(BMKPoiIndoorResult*)poiIndoorResult errorCode:(BMKSearchErrorCode)errorCode;
|
||||
@end
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* BMKPoiSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2013 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
|
||||
typedef enum{
|
||||
BMK_POI_SORT_BY_COMPOSITE = 0,//综合排序
|
||||
BMK_POI_SORT_BY_DISTANCE,//距离由近到远排序
|
||||
}BMKPoiSortType;
|
||||
|
||||
/// 检索基础信息类,所有类型Poi检索的基类
|
||||
@interface BMKBasePoiSearchOption : NSObject
|
||||
{
|
||||
NSString *_keyword;
|
||||
int _pageIndex;
|
||||
int _pageCapacity;
|
||||
}
|
||||
///搜索关键字
|
||||
@property (nonatomic, strong) NSString *keyword;
|
||||
///分页索引,可选,默认为0
|
||||
@property (nonatomic, assign) int pageIndex;
|
||||
///分页数量,可选,默认为10,最多为50
|
||||
@property (nonatomic, assign) int pageCapacity;
|
||||
|
||||
@end
|
||||
|
||||
///本地云检索参数信息类
|
||||
@interface BMKCitySearchOption : BMKBasePoiSearchOption {
|
||||
NSString *_city;
|
||||
}
|
||||
///区域名称(市或区的名字,如北京市,海淀区),必选, 必须最长25个字符
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
///是否请求门址信息列表,默认为YES
|
||||
@property (nonatomic, assign) BOOL requestPoiAddressInfoList;
|
||||
@end
|
||||
|
||||
///周边云检索参数信息类
|
||||
@interface BMKNearbySearchOption : BMKBasePoiSearchOption {
|
||||
CLLocationCoordinate2D _location;
|
||||
int _radius;
|
||||
}
|
||||
///检索的中心点,经纬度
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D location;
|
||||
///周边检索半径
|
||||
@property (nonatomic, assign) int radius;
|
||||
//搜索结果排序规则,可选,默认BMK_POI_SORT_BY_COMPOSITE
|
||||
@property (nonatomic, assign) BMKPoiSortType sortType;
|
||||
|
||||
@end
|
||||
|
||||
///矩形云检索参数信息类
|
||||
@interface BMKBoundSearchOption : BMKBasePoiSearchOption {
|
||||
CLLocationCoordinate2D _leftBottom;
|
||||
CLLocationCoordinate2D _rightTop;
|
||||
|
||||
}
|
||||
///矩形区域,左下角和右上角的经纬度坐标点。
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D leftBottom;
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D rightTop;
|
||||
@end
|
||||
|
||||
///室内POI检索参数信息类
|
||||
@interface BMKPoiIndoorSearchOption : BMKBasePoiSearchOption
|
||||
/// 室内ID(必须)
|
||||
@property (nonatomic, strong) NSString *indoorId;
|
||||
/// 楼层(可选),设置后,会优先获取该楼层的室内POI,然后是其它楼层的
|
||||
@property (nonatomic, strong) NSString *floor;
|
||||
@end
|
||||
|
||||
///poi详情检索信息类
|
||||
@interface BMKPoiDetailSearchOption : NSObject {
|
||||
NSString* _poiUid;
|
||||
}
|
||||
///poi的uid,从poi检索返回的BMKPoiResult结构中获取
|
||||
@property (nonatomic, strong) NSString* poiUid;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/*
|
||||
* BMKPoiSearchType.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
enum {
|
||||
BMKInvalidCoordinate = -1, ///<无效坐标
|
||||
BMKCarTrafficFIRST = 60, ///<驾乘检索策略常量:躲避拥堵,若无实时路况,默认按照时间优先策略
|
||||
BMKCarTimeFirst = 0, ///<驾乘检索策略常量:时间优先
|
||||
BMKCarDisFirst, ///<驾乘检索策略常量:最短距离
|
||||
BMKCarFeeFirst, ///<驾乘检索策略常量:较少费用
|
||||
BMKBusTimeFirst, ///<公交检索策略常量:时间优先
|
||||
BMKBusTransferFirst, ///<公交检索策略常量:最少换乘
|
||||
BMKBusWalkFirst, ///<公交检索策略常量:最小步行距离
|
||||
BMKBusNoSubway, ///<公交检索策略常量:不含地铁
|
||||
BMKTypeCityList = 7, ///<POI检索类型:城市列表
|
||||
BMKTypePoiList = 11, ///<POI检索类型:城市内搜索POI列表
|
||||
BMKTypeAreaPoiList = 21, ///<POI检索类型:范围搜索、周边搜索POI列表
|
||||
BMKTypeAreaMultiPoiList = 45 ///<POI检索类型:多关键字范围搜索、周边搜索POI列表
|
||||
};
|
||||
|
||||
///城市列表信息类
|
||||
@interface BMKCityListInfo : NSObject
|
||||
{
|
||||
NSString* _city;
|
||||
int _num;
|
||||
}
|
||||
///城市名称
|
||||
@property (nonatomic, strong) NSString* city;
|
||||
///该城市所含搜索结果数目
|
||||
@property (nonatomic) int num;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
///POI信息类
|
||||
@interface BMKPoiInfo : NSObject
|
||||
{
|
||||
NSString* _name; ///<POI名称
|
||||
NSString* _uid;
|
||||
NSString* _address; ///<POI地址
|
||||
NSString* _city; ///<POI所在城市
|
||||
NSString* _phone; ///<POI电话号码
|
||||
NSString* _postcode; ///<POI邮编
|
||||
int _epoitype; ///<POI类型,0:普通点 1:公交站 2:公交线路 3:地铁站 4:地铁线路
|
||||
CLLocationCoordinate2D _pt; ///<POI坐标
|
||||
}
|
||||
///POI名称
|
||||
@property (nonatomic, strong) NSString* name;
|
||||
///POIuid
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///POI地址
|
||||
@property (nonatomic, strong) NSString* address;
|
||||
///POI所在城市
|
||||
@property (nonatomic, strong) NSString* city;
|
||||
///POI电话号码
|
||||
@property (nonatomic, strong) NSString* phone;
|
||||
///POI邮编
|
||||
@property (nonatomic, strong) NSString* postcode;
|
||||
///POI类型,0:普通点 1:公交站 2:公交线路 3:地铁站 4:地铁线路
|
||||
@property (nonatomic) int epoitype;
|
||||
///POI坐标
|
||||
@property (nonatomic) CLLocationCoordinate2D pt;
|
||||
///是否有全景
|
||||
@property (nonatomic, assign) BOOL panoFlag;
|
||||
@end
|
||||
|
||||
///POI门址信息类
|
||||
@interface BMKPoiAddressInfo : NSObject
|
||||
|
||||
///名称
|
||||
@property (nonatomic, strong) NSString* name;
|
||||
///地址
|
||||
@property (nonatomic, strong) NSString* address;
|
||||
///坐标
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D pt;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
///POI搜索结果类
|
||||
@interface BMKPoiResult : NSObject
|
||||
{
|
||||
int _totalPoiNum; ///<本次POI搜索的总结果数
|
||||
int _currPoiNum; ///<当前页的POI结果数
|
||||
int _pageNum; ///<本次POI搜索的总页数
|
||||
int _pageIndex; ///<当前页的索引
|
||||
|
||||
NSArray* _poiInfoList; ///<POI列表,成员是BMKPoiInfo
|
||||
NSArray* _cityList; ///<城市列表,成员是BMKCityListInfo
|
||||
}
|
||||
///本次POI搜索的总结果数
|
||||
@property (nonatomic) int totalPoiNum;
|
||||
///当前页的POI结果数
|
||||
@property (nonatomic) int currPoiNum;
|
||||
///本次POI搜索的总页数
|
||||
@property (nonatomic) int pageNum;
|
||||
///当前页的索引
|
||||
@property (nonatomic) int pageIndex;
|
||||
///POI列表,成员是BMKPoiInfo
|
||||
@property (nonatomic, strong) NSArray* poiInfoList;
|
||||
///城市列表,成员是BMKCityListInfo
|
||||
@property (nonatomic, strong) NSArray* cityList;
|
||||
|
||||
///是否返回的有门址信息列表
|
||||
@property (nonatomic, assign) BOOL isHavePoiAddressInfoList;
|
||||
///门址信息列表,成员是BMKPoiAddrsInfo(当进行的是poi城市检索,且检索关键字是具体的门址信息(如在北京搜"上地十街10号")时,会返回此信息)
|
||||
@property (nonatomic, strong) NSArray* poiAddressInfoList;
|
||||
|
||||
@end
|
||||
|
||||
///poi详情检索结果类
|
||||
@interface BMKPoiDetailResult : NSObject {
|
||||
NSString* _name;
|
||||
CLLocationCoordinate2D _pt;
|
||||
NSString* _address;
|
||||
NSString* _phone;
|
||||
NSString* _uid;
|
||||
NSString* _tag;
|
||||
NSString* _detailUrl;
|
||||
NSString* _type;
|
||||
double _price;
|
||||
double _overallRating;
|
||||
double _tasteRating;
|
||||
double _serviceRating;
|
||||
double _environmentRating;
|
||||
double _facilityRating;
|
||||
double _hygieneRating;
|
||||
double _technologyRating;
|
||||
int _imageNum;
|
||||
int _grouponNum;
|
||||
int _commentNum;
|
||||
int _favoriteNum;
|
||||
int _checkInNum;
|
||||
NSString* _shopHours;
|
||||
}
|
||||
///POI名称
|
||||
@property (nonatomic, strong) NSString* name;
|
||||
///POI地址
|
||||
@property (nonatomic, strong) NSString* address;
|
||||
///POI电话号码
|
||||
@property (nonatomic, strong) NSString* phone;
|
||||
///POIuid
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///POI标签
|
||||
@property (nonatomic, strong) NSString* tag;
|
||||
///POI详情页url
|
||||
@property (nonatomic, strong) NSString* detailUrl;
|
||||
///POI所属分类,如“hotel”,“cater”,“life”
|
||||
@property (nonatomic, strong) NSString* type;
|
||||
///POI地理坐标
|
||||
@property (nonatomic) CLLocationCoordinate2D pt;
|
||||
///POI价格
|
||||
@property (nonatomic) double price;
|
||||
///POI综合评分
|
||||
@property (nonatomic) double overallRating;
|
||||
///POI口味评分
|
||||
@property (nonatomic) double tasteRating;
|
||||
///POI服务评分
|
||||
@property (nonatomic) double serviceRating;
|
||||
///POI环境评分
|
||||
@property (nonatomic) double environmentRating;
|
||||
///POI设施评分
|
||||
@property (nonatomic) double facilityRating;
|
||||
///POI卫生评分
|
||||
@property (nonatomic) double hygieneRating;
|
||||
///POI技术评分
|
||||
@property (nonatomic) double technologyRating;
|
||||
///POI图片数目
|
||||
@property (nonatomic) int imageNum;
|
||||
///POI团购数目
|
||||
@property (nonatomic) int grouponNum;
|
||||
///POI评论数目
|
||||
@property (nonatomic) int commentNum;
|
||||
///POI收藏数目
|
||||
@property (nonatomic) int favoriteNum;
|
||||
///POI签到数目
|
||||
@property (nonatomic) int checkInNum;
|
||||
///POI营业时间
|
||||
@property (nonatomic, strong) NSString* shopHours;
|
||||
@end
|
||||
|
||||
///室内POI信息类
|
||||
@interface BMKPoiIndoorInfo : NSObject
|
||||
|
||||
///POI名称
|
||||
@property (nonatomic, strong) NSString* name;
|
||||
///POIuid
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///该室内POI所在 室内ID
|
||||
@property (nonatomic, strong) NSString* indoorId;
|
||||
///该室内POI所在楼层
|
||||
@property (nonatomic, strong) NSString* floor;
|
||||
///POI地址
|
||||
@property (nonatomic, strong) NSString* address;
|
||||
///POI所在城市
|
||||
@property (nonatomic, strong) NSString* city;
|
||||
///POI电话号码
|
||||
@property (nonatomic, strong) NSString* phone;
|
||||
///POI坐标
|
||||
@property (nonatomic) CLLocationCoordinate2D pt;
|
||||
///POI标签
|
||||
@property (nonatomic, strong) NSString* tag;
|
||||
///价格
|
||||
@property (nonatomic, assign) double price;
|
||||
///星级(0-50),50表示五星
|
||||
@property (nonatomic, assign) NSInteger starLevel;
|
||||
///是否有团购
|
||||
@property (nonatomic, assign) BOOL grouponFlag;
|
||||
///是否有外卖
|
||||
@property (nonatomic, assign) BOOL takeoutFlag;
|
||||
///是否排队
|
||||
@property (nonatomic, assign) BOOL waitedFlag;
|
||||
///团购数,-1表示没有团购信息
|
||||
@property (nonatomic, assign) NSInteger grouponNum;
|
||||
|
||||
@end
|
||||
|
||||
///POI室内搜索结果类
|
||||
@interface BMKPoiIndoorResult : NSObject
|
||||
|
||||
///本次POI室内搜索的总结果数
|
||||
@property (nonatomic, assign) NSInteger totalPoiNum;
|
||||
///当前页的室内POI结果数
|
||||
@property (nonatomic, assign) NSInteger currPoiNum;
|
||||
///本次POI室内搜索的总页数
|
||||
@property (nonatomic, assign) NSInteger pageNum;
|
||||
///当前页的索引
|
||||
@property (nonatomic) int pageIndex;
|
||||
///室内POI列表,成员是BMKPoiIndoorInfo
|
||||
@property (nonatomic, strong) NSArray* poiIndoorInfoList;
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* BMKRouteSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
#import "BMKRouteSearchOption.h"
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
@protocol BMKRouteSearchDelegate;
|
||||
///route搜索服务
|
||||
@interface BMKRouteSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKRouteSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*公交路线检索(仅支持市内)
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetTransitRouteResult通知
|
||||
*@param transitRoutePlanOption 公交换乘信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)transitSearch:(BMKTransitRoutePlanOption*)transitRoutePlanOption;
|
||||
|
||||
/**
|
||||
*公共交通路线检索(new)(支持市内和跨城)
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetMassTransitRouteResult通知
|
||||
*注:起终点城市不支持使用cityId
|
||||
*@param routePlanOption 公共交通检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)massTransitSearch:(BMKMassTransitRoutePlanOption*)routePlanOption;
|
||||
|
||||
/**
|
||||
*驾乘路线检索
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetDrivingRouteResult通知
|
||||
*@param drivingRoutePlanOption 驾车检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)drivingSearch:(BMKDrivingRoutePlanOption*)drivingRoutePlanOption;
|
||||
|
||||
/**
|
||||
*步行路线检索
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetWalkingRouteResult通知
|
||||
*@param walkingRoutePlanOption 步行检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)walkingSearch:(BMKWalkingRoutePlanOption*)walkingRoutePlanOption;
|
||||
|
||||
/**
|
||||
*骑行路线检索
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetRidingRouteResult通知
|
||||
*@param ridingRoutePlanOption 骑行检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)ridingSearch:(BMKRidingRoutePlanOption*) ridingRoutePlanOption;
|
||||
|
||||
/**
|
||||
*室内路线检索
|
||||
*异步函数,返回结果在BMKRouteSearchDelegate的onGetIndoorRouteResult通知
|
||||
*@param indoorRoutePlanOption 室内路线检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)indoorRoutePlanSearch:(BMKIndoorRoutePlanOption*) indoorRoutePlanOption;
|
||||
|
||||
@end
|
||||
|
||||
///路线搜索delegate,用于获取路线搜索结果
|
||||
@protocol BMKRouteSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回公交搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKTransitRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetTransitRouteResult:(BMKRouteSearch*)searcher result:(BMKTransitRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回公共交通路线检索结果(new)
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKMassTransitRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetMassTransitRouteResult:(BMKRouteSearch*)searcher result:(BMKMassTransitRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回驾乘搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKDrivingRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetDrivingRouteResult:(BMKRouteSearch*)searcher result:(BMKDrivingRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回步行搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKWalkingRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetWalkingRouteResult:(BMKRouteSearch*)searcher result:(BMKWalkingRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回骑行搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKRidingRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetRidingRouteResult:(BMKRouteSearch*)searcher result:(BMKRidingRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回室内路线搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果,类型为BMKIndoorRouteResult
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetIndoorRouteResult:(BMKRouteSearch*)searcher result:(BMKIndoorRouteResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
@end
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* BMKPoiSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2013 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
#import "BMKRouteSearchType.h"
|
||||
/// 路线查询基础信息类
|
||||
@interface BMKBaseRoutePlanOption : NSObject
|
||||
{
|
||||
BMKPlanNode *_from;
|
||||
BMKPlanNode *_to;
|
||||
}
|
||||
///检索的起点,可通过关键字、坐标两种方式指定。cityName和cityID同时指定时,优先使用cityID
|
||||
@property (nonatomic, strong) BMKPlanNode *from;
|
||||
///检索的终点,可通过关键字、坐标两种方式指定。cityName和cityID同时指定时,优先使用cityID
|
||||
@property (nonatomic, strong) BMKPlanNode *to;
|
||||
@end
|
||||
/// 步行查询基础信息类
|
||||
@interface BMKWalkingRoutePlanOption : BMKBaseRoutePlanOption
|
||||
{
|
||||
|
||||
}
|
||||
@end
|
||||
/// 驾车查询基础信息类
|
||||
@interface BMKDrivingRoutePlanOption : BMKBaseRoutePlanOption
|
||||
{
|
||||
NSArray* _wayPointsArray;
|
||||
BMKDrivingPolicy _drivingPolicy;
|
||||
}
|
||||
@property (nonatomic, strong) NSArray *wayPointsArray;
|
||||
///驾车检索策略,默认使用BMK_DRIVING_TIME_FIRST
|
||||
@property (nonatomic) BMKDrivingPolicy drivingPolicy;
|
||||
|
||||
///驾车检索获取路线每一个step的路况,默认使用BMK_DRIVING_REQUEST_TRAFFICE_TYPE_NONE
|
||||
@property (nonatomic) BMKDrivingRequestTrafficType drivingRequestTrafficType;
|
||||
|
||||
|
||||
@end
|
||||
/// 公交查询基础信息类
|
||||
@interface BMKTransitRoutePlanOption : BMKBaseRoutePlanOption
|
||||
{
|
||||
NSString* _city;
|
||||
BMKTransitPolicy _transitPolicy;
|
||||
}
|
||||
///城市名,用于在哪个城市内进行检索
|
||||
@property (nonatomic, strong) NSString *city;
|
||||
///公交检索策略,默认使用BMK_TRANSIT_TIME_FIRST
|
||||
@property (nonatomic) BMKTransitPolicy transitPolicy;
|
||||
|
||||
@end
|
||||
|
||||
/// 公共交通路线查询基础信息类(支持市内和跨城)(注:起终点城市不支持cityId)
|
||||
@interface BMKMassTransitRoutePlanOption : BMKBaseRoutePlanOption
|
||||
|
||||
///分页索引,可选,默认为0(从0开始)
|
||||
@property (nonatomic, assign) NSUInteger pageIndex;
|
||||
///分页数量,可选,默认为10,取值范围[1,10]
|
||||
@property (nonatomic, assign) NSUInteger pageCapacity;
|
||||
///市内公交换乘策略策略,可选,默认使用BMK_MASS_TRANSIT_INCITY_RECOMMEND
|
||||
@property (nonatomic, assign) BMKMassTransitIncityPolicy incityPolicy;
|
||||
///跨城公交换乘策略,可选,默认使用BMK_MASS_TRANSIT_INTERCITY_TIME_FIRST
|
||||
@property (nonatomic, assign) BMKMassTransitIntercityPolicy intercityPolicy;
|
||||
///跨城交通方式策略,可选,默认使用BMK_MASS_TRANSIT_INTERCITY_TRANS_TRAIN_FIRST
|
||||
@property (nonatomic, assign) BMKMassTransitIntercityTransPolicy intercityTransPolicy;
|
||||
|
||||
@end
|
||||
|
||||
/// 骑行查询基础信息类
|
||||
@interface BMKRidingRoutePlanOption : BMKBaseRoutePlanOption
|
||||
|
||||
@end
|
||||
|
||||
/// 室内路线规划查询基础信息类
|
||||
@interface BMKIndoorRoutePlanOption : NSObject
|
||||
///检索的起点
|
||||
@property (nonatomic, strong) BMKIndoorPlanNode *from;
|
||||
///检索的终点
|
||||
@property (nonatomic, strong) BMKIndoorPlanNode *to;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,598 @@
|
||||
/*
|
||||
* BMKRouteSearchType.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2011 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "BMKPoiSearchType.h"
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
///路段类型枚举
|
||||
typedef enum
|
||||
{
|
||||
BMK_BUSLINE = 0,///公交
|
||||
BMK_SUBWAY = 1,///地铁
|
||||
BMK_WAKLING = 2,///步行
|
||||
}BMKTransitStepType;
|
||||
|
||||
///交通方式枚举
|
||||
typedef enum
|
||||
{
|
||||
BMK_TRANSIT_SUBWAY = 0,///地铁
|
||||
BMK_TRANSIT_TRAIN = 1,///火车
|
||||
BMK_TRANSIT_PLANE = 2,///飞机
|
||||
BMK_TRANSIT_BUSLINE = 3,///公交
|
||||
BMK_TRANSIT_DRIVING = 4,///驾车
|
||||
BMK_TRANSIT_WAKLING = 5,///步行
|
||||
BMK_TRANSIT_COACH = 6,///大巴
|
||||
}BMKMassTransitType;
|
||||
|
||||
|
||||
///室内路线结点类型
|
||||
typedef enum
|
||||
{
|
||||
BMK_INDOOR_STEP_NODE_TYPE_ELEVATOR = 1,///直梯
|
||||
BMK_INDOOR_STEP_NODE_TYPE_ESCALATOR = 2,///扶梯
|
||||
BMK_INDOOR_STEP_NODE_TYPE_STAIR = 3,///楼梯
|
||||
BMK_INDOOR_STEP_NODE_TYPE_SECURITY_CHECK = 4,///安检
|
||||
}BMKIndoorStepNodeType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BMK_TRANSIT_TIME_FIRST = 3, //较快捷(公交)
|
||||
BMK_TRANSIT_TRANSFER_FIRST = 4, //少换乘(公交)
|
||||
BMK_TRANSIT_WALK_FIRST = 5, //少步行(公交)
|
||||
BMK_TRANSIT_NO_SUBWAY = 6, //不坐地铁
|
||||
}BMKTransitPolicy;
|
||||
|
||||
/// 公共交通:市内公交换乘策略
|
||||
typedef enum
|
||||
{
|
||||
BMK_MASS_TRANSIT_INCITY_RECOMMEND = 0,//推荐
|
||||
BMK_MASS_TRANSIT_INCITY_TRANSFER_FIRST = 1,//少换乘
|
||||
BMK_MASS_TRANSIT_INCITY_WALK_FIRST = 2,//少步行
|
||||
BMK_MASS_TRANSIT_INCITY_NO_SUBWAY = 3,//不坐地铁
|
||||
BMK_MASS_TRANSIT_INCITY_TIME_FIRST = 4,//较快捷
|
||||
BMK_MASS_TRANSIT_INCITY_SUBWAY_FIRST = 5,//地铁优先
|
||||
}BMKMassTransitIncityPolicy;
|
||||
|
||||
/// 公共交通:跨城公交换乘策略
|
||||
typedef enum
|
||||
{
|
||||
BMK_MASS_TRANSIT_INTERCITY_TIME_FIRST = 0,//较快捷
|
||||
BMK_MASS_TRANSIT_INTERCITY_START_EARLY = 1,//出发早
|
||||
BMK_MASS_TRANSIT_INTERCITY_PRICE_FIRST = 2,//价格低
|
||||
}BMKMassTransitIntercityPolicy;
|
||||
|
||||
/// 公共交通:跨城交通方式策略
|
||||
typedef enum
|
||||
{
|
||||
BMK_MASS_TRANSIT_INTERCITY_TRANS_TRAIN_FIRST = 0,//火车优先
|
||||
BMK_MASS_TRANSIT_INTERCITY_TRANS_PLANE_FIRST = 1,//飞机优先
|
||||
BMK_MASS_TRANSIT_INTERCITY_TRANS_BUS_FIRST = 2,//大巴优先
|
||||
}BMKMassTransitIntercityTransPolicy;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BMK_DRIVING_BLK_FIRST = -1, //躲避拥堵(自驾)
|
||||
BMK_DRIVING_TIME_FIRST = 0, //最短时间(自驾)
|
||||
BMK_DRIVING_DIS_FIRST = 1, //最短路程(自驾)
|
||||
BMK_DRIVING_FEE_FIRST, //少走高速(自驾)
|
||||
|
||||
}BMKDrivingPolicy;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BMK_DRIVING_REQUEST_TRAFFICE_TYPE_NONE = 0, //不带路况
|
||||
BMK_DRIVING_REQUEST_TRAFFICE_TYPE_PATH_AND_TRAFFICE = 1, //道路和路况
|
||||
}BMKDrivingRequestTrafficType;
|
||||
|
||||
///打车信息类
|
||||
@interface BMKTaxiInfo : NSObject
|
||||
|
||||
///路线打车描述信息
|
||||
@property (nonatomic, strong) NSString* desc;
|
||||
///总路程,单位: 米
|
||||
@property (nonatomic) int distance;
|
||||
///总耗时,单位: 秒
|
||||
@property (nonatomic) int duration;
|
||||
///每千米单价(白天),单位 元
|
||||
@property (nonatomic) CGFloat perKMPrice;
|
||||
///起步价(白天),单位 元
|
||||
@property (nonatomic) CGFloat startPrice;
|
||||
///总价(预估) , 单位: 元
|
||||
@property (nonatomic) int totalPrice;
|
||||
|
||||
@end
|
||||
|
||||
///路线换乘方案里的交通工具信息类
|
||||
@interface BMKVehicleInfo : NSObject{
|
||||
NSString* _uid;
|
||||
NSString* _title;
|
||||
int _passStationNum;
|
||||
int _totalPrice;
|
||||
int _zonePrice;
|
||||
}
|
||||
///该交通路线的标识
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///该交通路线的名称
|
||||
@property (nonatomic, strong) NSString* title;
|
||||
///该交通路线的所乘站数
|
||||
@property (nonatomic) int passStationNum;
|
||||
///该交通路线的全程价格
|
||||
@property (nonatomic) int totalPrice;
|
||||
///该交通路线的所乘区间的区间价格
|
||||
@property (nonatomic) int zonePrice;
|
||||
@end
|
||||
|
||||
///此类代表一个时间段,每个属性都是一个时间段。
|
||||
@interface BMKTime : NSObject{
|
||||
int _dates;
|
||||
int _hours;
|
||||
int _minutes;
|
||||
int _seconds;
|
||||
|
||||
}
|
||||
|
||||
///时间段,单位(天)
|
||||
@property (nonatomic) int dates;
|
||||
///时间段,单位(小时)
|
||||
@property (nonatomic) int hours;
|
||||
///时间段,单位(分)
|
||||
@property (nonatomic) int minutes;
|
||||
///时间段,单位(秒)
|
||||
@property (nonatomic) int seconds;
|
||||
@end
|
||||
|
||||
///此类表示路线中的一节点,节点包括:路线起终点,公交站点等
|
||||
@interface BMKRouteNode : NSObject{
|
||||
NSString* _uid;
|
||||
NSString* _title;
|
||||
CLLocationCoordinate2D _location;
|
||||
}
|
||||
///该节点uid
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///该节点的名称
|
||||
@property (nonatomic, strong) NSString* title;
|
||||
///该节点的坐标
|
||||
@property (nonatomic) CLLocationCoordinate2D location;
|
||||
@end
|
||||
///此类表示公交站点信息
|
||||
@interface BMKBusStation : BMKRouteNode
|
||||
@end
|
||||
|
||||
|
||||
///此类表示路线中的一个路段(基类)
|
||||
@interface BMKRouteStep : NSObject{
|
||||
int _distance;
|
||||
int _duration;
|
||||
BMKMapPoint* _points;
|
||||
int _pointsCount;
|
||||
}
|
||||
///路段长度 单位: 米
|
||||
@property (nonatomic) int distance;
|
||||
///路段耗时 单位: 秒
|
||||
@property (nonatomic) int duration;
|
||||
///路段所经过的地理坐标集合
|
||||
@property (nonatomic) BMKMapPoint* points;
|
||||
///路段所经过的地理坐标集合内点的个数
|
||||
@property (nonatomic) int pointsCount;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示公交线路中的一个路段
|
||||
@interface BMKBusStep : BMKRouteStep
|
||||
@end
|
||||
|
||||
///此类表示公交换乘路线中的一个路段
|
||||
@interface BMKTransitStep : BMKRouteStep{
|
||||
BMKRouteNode* _entrace;
|
||||
BMKRouteNode* _exit;
|
||||
NSString* _instruction;
|
||||
BMKTransitStepType _stepType;
|
||||
BMKVehicleInfo* _vehicleInfo;
|
||||
}
|
||||
///路段入口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* entrace;
|
||||
///路段出口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* exit;
|
||||
///路段换乘说明
|
||||
@property (nonatomic, strong) NSString* instruction;
|
||||
///路段类型
|
||||
@property (nonatomic) BMKTransitStepType stepType;
|
||||
///当路段为公交路段或地铁路段时,可以获取交通工具信息
|
||||
@property (nonatomic, strong) BMKVehicleInfo* vehicleInfo;
|
||||
@end
|
||||
|
||||
///公共交通方案里的交通工具信息基类类
|
||||
@interface BMKBaseVehicleInfo : NSObject
|
||||
|
||||
///该交通路线的名称
|
||||
@property (nonatomic, strong) NSString* name;
|
||||
///出发站
|
||||
@property (nonatomic, strong) NSString* departureStation;
|
||||
///到达站
|
||||
@property (nonatomic, strong) NSString* arriveStation;
|
||||
///出发时间(BMKBusVehicleInfo时departureTime为空)
|
||||
@property (nonatomic, strong) NSString* departureTime;
|
||||
///到达时间(BMKBusVehicleInfo时arriveTime为空)
|
||||
@property (nonatomic, strong) NSString* arriveTime;
|
||||
|
||||
@end
|
||||
|
||||
///公共交通方案里的交通工具信息类- 公交车、地铁
|
||||
@interface BMKBusVehicleInfo : BMKBaseVehicleInfo
|
||||
|
||||
///该交通路线的所乘站数
|
||||
@property (nonatomic, assign) NSInteger passStationNum;
|
||||
///始发车发车时间
|
||||
@property (nonatomic, strong) NSString* firstTime;
|
||||
///末班车发车时间
|
||||
@property (nonatomic, strong) NSString* lastTime;
|
||||
|
||||
@end
|
||||
///公共交通方案里的交通工具信息类 - 飞机
|
||||
@interface BMKPlaneVehicleInfo : BMKBaseVehicleInfo
|
||||
|
||||
///价格(单位:元)
|
||||
@property (nonatomic, assign) CGFloat price;
|
||||
///折扣
|
||||
@property (nonatomic, assign) CGFloat discount;
|
||||
///航空公司
|
||||
@property (nonatomic, strong) NSString* airlines;
|
||||
///订票网址
|
||||
@property (nonatomic, strong) NSString* bookingUrl;
|
||||
|
||||
@end
|
||||
///公共交通方案里的交通工具信息类 - 火车
|
||||
@interface BMKTrainVehicleInfo : BMKBaseVehicleInfo
|
||||
|
||||
///价格(单位:元)
|
||||
@property (nonatomic, assign) CGFloat price;
|
||||
///订票电话
|
||||
@property (nonatomic, strong) NSString* booking;
|
||||
|
||||
@end
|
||||
///公共交通方案里的交通工具信息类 - 大巴
|
||||
@interface BMKCoachVehicleInfo : BMKBaseVehicleInfo
|
||||
|
||||
///价格(单位:元)
|
||||
@property (nonatomic, assign) CGFloat price;
|
||||
///订票网址
|
||||
@property (nonatomic, strong) NSString* bookingUrl;
|
||||
///合作方名称
|
||||
@property (nonatomic, strong) NSString* providerName;
|
||||
///合作方官网
|
||||
@property (nonatomic, strong) NSString* providerUrl;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示公共交通路线中的路段
|
||||
@interface BMKMassTransitStep : NSObject
|
||||
///steps中是方案还是子路段,YES:steps是BMKMassTransitStep的子路段(A到B需要经过多个steps);NO:steps是多个方案(A到B有多个方案选择)
|
||||
@property (nonatomic, assign) BOOL isSubStep;
|
||||
///本BMKMassTransitStep中的有几个方案或几个子路段,成员类型为BMKMassTransitSubStep
|
||||
@property (nonatomic, strong) NSArray *steps;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示公共交通路线中的一个路段
|
||||
@interface BMKMassTransitSubStep : BMKRouteStep
|
||||
|
||||
///路段入口经纬度
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D entraceCoor;
|
||||
///路段出口经纬度
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D exitCoor;
|
||||
///路段说明
|
||||
@property (nonatomic, strong) NSString* instructions;
|
||||
///路段类型
|
||||
@property (nonatomic) BMKMassTransitType stepType;
|
||||
///该路段交通工具信息(当stepType为公交地铁时,BMKBusVehicleInfo对象;stepType为大巴时,BMKCoachVehicleInfo对象;stepType为飞机时,BMKPlaneVehicleInfo对象;stepType为火车时,BMKTrainVehicleInfo对象;其它为nil)
|
||||
@property (nonatomic, strong) BMKBaseVehicleInfo* vehicleInfo;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示驾车路线中的一个路段
|
||||
@interface BMKDrivingStep : BMKRouteStep{
|
||||
int _direction;
|
||||
BMKRouteNode* _entrace;
|
||||
NSString* _entraceInstruction;
|
||||
BMKRouteNode* _exit;
|
||||
NSString* _exitInstruction;
|
||||
NSString* _instruction;
|
||||
int _numTurns;
|
||||
}
|
||||
///该路段起点方向值
|
||||
@property (nonatomic) int direction;
|
||||
///路段入口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* entrace;
|
||||
///路段入口的指示信息
|
||||
@property (nonatomic, strong) NSString* entraceInstruction;
|
||||
///路段出口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* exit;
|
||||
///路段出口指示信息
|
||||
@property (nonatomic, strong) NSString* exitInstruction;
|
||||
///路段总体指示信息
|
||||
@property (nonatomic, strong) NSString* instruction;
|
||||
///路段需要转弯数
|
||||
@property (nonatomic) int numTurns;
|
||||
///路段是否有路况信息
|
||||
@property (nonatomic) BOOL hasTrafficsInfo;
|
||||
///路段的路况信息,成员为NSNumber。0:无数据;1:畅通;2:缓慢;3:拥堵
|
||||
@property (nonatomic, strong) NSArray* traffics;
|
||||
|
||||
@end
|
||||
|
||||
///室内路线结点
|
||||
@interface BMKIndoorStepNode : NSObject
|
||||
|
||||
///坐标
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
|
||||
///类型
|
||||
@property (nonatomic, assign) BMKIndoorStepNodeType type;
|
||||
///描述
|
||||
@property (nonatomic, strong) NSString* desc;
|
||||
|
||||
@end
|
||||
|
||||
/// 此类表示室内路线的一个路段
|
||||
@interface BMKIndoorRouteStep : BMKRouteStep
|
||||
|
||||
///入口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* entrace;
|
||||
///出口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* exit;
|
||||
///路段指示信息
|
||||
@property (nonatomic, strong) NSString* instructions;
|
||||
///建筑物id
|
||||
@property (nonatomic, strong) NSString* buildingid;
|
||||
///室内楼层id
|
||||
@property (nonatomic, strong) NSString* floorid;
|
||||
///结点数组,成员类型为:BMKIndoorStepNode
|
||||
@property (nonatomic, strong) NSArray* indoorStepNodes;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示步行路线中的一个路段
|
||||
@interface BMKWalkingStep : BMKRouteStep{
|
||||
int _direction;
|
||||
BMKRouteNode* _entrace;
|
||||
NSString* _entraceInstruction;
|
||||
BMKRouteNode* _exit;
|
||||
NSString* _exitInstruction;
|
||||
NSString* _instruction;
|
||||
}
|
||||
///该路段起点方向值
|
||||
@property (nonatomic) int direction;
|
||||
///路段入口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* entrace;
|
||||
///获取该路段入口指示信息
|
||||
@property (nonatomic, strong) NSString* entraceInstruction;
|
||||
///路段出口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* exit;
|
||||
///获取该路段出口指示信息
|
||||
@property (nonatomic, strong) NSString* exitInstruction;
|
||||
///获取该路段指示信息
|
||||
@property (nonatomic, strong) NSString* instruction;
|
||||
@end
|
||||
|
||||
///此类表示骑行路线中的一个路段
|
||||
@interface BMKRidingStep : BMKRouteStep
|
||||
|
||||
///该路段起点方向值
|
||||
@property (nonatomic) NSInteger direction;
|
||||
///路段入口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* entrace;
|
||||
///获取该路段入口指示信息
|
||||
@property (nonatomic, strong) NSString* entraceInstruction;
|
||||
///路段出口信息
|
||||
@property (nonatomic, strong) BMKRouteNode* exit;
|
||||
///获取该路段出口指示信息
|
||||
@property (nonatomic, strong) NSString* exitInstruction;
|
||||
///获取该路段指示信息
|
||||
@property (nonatomic, strong) NSString* instruction;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
///此类表示路线数据结构的基类,表示一条路线,路线可能包括:路线规划中的换乘/驾车/步行路线
|
||||
///此类为路线数据结构的基类,一般关注其子类对象即可,无需直接生成该类对象
|
||||
@interface BMKRouteLine : NSObject{
|
||||
int _distance;
|
||||
BMKTime* _duration;
|
||||
BMKRouteNode* _starting;
|
||||
BMKRouteNode* _terminal;
|
||||
NSString* _title;
|
||||
NSArray* _steps;
|
||||
}
|
||||
///路线长度 单位: 米
|
||||
@property (nonatomic) int distance;
|
||||
///路线耗时 单位: 秒
|
||||
@property (nonatomic, strong) BMKTime* duration;
|
||||
///路线起点信息
|
||||
@property (nonatomic, strong) BMKRouteNode* starting;
|
||||
///路线终点信息
|
||||
@property (nonatomic, strong) BMKRouteNode* terminal;
|
||||
///路线名称(预留字段,现为空)
|
||||
@property (nonatomic, strong) NSString* title;
|
||||
///路线中的所有路段,成员类型为BMKWalkingStep,BMKDrivingStep,BMKTransitStep,BMKRidingStep,BMKIndoorRouteStep,BMKMassTransitStep
|
||||
@property (nonatomic, strong) NSArray* steps;
|
||||
@end
|
||||
|
||||
///此类表示一个换乘路线,换乘路线将根据既定策略调配多种交通工具
|
||||
@interface BMKTransitRouteLine : BMKRouteLine
|
||||
@end
|
||||
///此类表示一条公共交通路线
|
||||
@interface BMKMassTransitRouteLine : BMKRouteLine
|
||||
|
||||
///路线花费
|
||||
@property (nonatomic, assign) CGFloat price;
|
||||
|
||||
@end
|
||||
///此类表示一个室内路线
|
||||
@interface BMKIndoorRouteLine : BMKRouteLine
|
||||
@end
|
||||
///此类表示一条驾车路线
|
||||
@interface BMKDrivingRouteLine : BMKRouteLine{
|
||||
bool _isSupportTraffic;//从2.7.0开始,废弃
|
||||
NSArray* _wayPoints;
|
||||
}
|
||||
///该路线所在区域是否含有交通流量信息,从2.7.0开始,废弃
|
||||
@property (nonatomic) bool isSupportTraffic;
|
||||
///路线途经点列表,成员类型为BMKPlanNode
|
||||
@property (nonatomic, strong) NSArray* wayPoints;
|
||||
///路线红绿灯个数
|
||||
@property (nonatomic, assign) NSInteger lightNum;
|
||||
///路线拥堵米数,发起请求时需设置参数 drivingRequestTrafficType = BMK_DRIVING_REQUEST_TRAFFICE_TYPE_PATH_AND_TRAFFICE 才有值
|
||||
@property (nonatomic, assign) NSInteger congestionMetres;
|
||||
///路线预估打车费(元),负数表示无打车费信息
|
||||
@property (nonatomic, assign) NSInteger taxiFares;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示一条步行路线
|
||||
@interface BMKWalkingRouteLine : BMKRouteLine
|
||||
@end
|
||||
|
||||
///此类表示一条骑行路线
|
||||
@interface BMKRidingRouteLine : BMKRouteLine
|
||||
@end
|
||||
|
||||
///路线搜索地址结果类.当输入的起点或终点有多个地点选择时,或者选定的城市没有此地点,但其它城市有(驾乘或步行),返回该类的实例
|
||||
@interface BMKSuggestAddrInfo : NSObject
|
||||
{
|
||||
NSArray* _startPoiList;
|
||||
NSArray* _endPoiList;
|
||||
NSArray* _startCityList;
|
||||
NSArray* _endCityList;
|
||||
NSArray* _wayPointsPoiList;
|
||||
NSArray* _wayPointsCityList;
|
||||
}
|
||||
///起点POI列表,成员类型为BMKPoiInfo
|
||||
@property (nonatomic, strong) NSArray* startPoiList;
|
||||
///起点城市列表,成员类型为BMKCityListInfo,如果输入的地点在本城市没有而在其它城市有,则返回其它城市的信息
|
||||
@property (nonatomic, strong) NSArray* startCityList;
|
||||
///终点POI列表,成员类型为BMKPoiInfo
|
||||
@property (nonatomic, strong) NSArray* endPoiList;
|
||||
///终点城市列表,成员类型为BMKCityListInfo,如果输入的地点在本城市没有而在其它城市有,则返回其它城市的信息
|
||||
@property (nonatomic, strong) NSArray* endCityList;
|
||||
///途经点POI列表,成员类型为NSArray<BMKPoiInfo*>
|
||||
@property (nonatomic, strong) NSArray* wayPointPoiList;
|
||||
///途经点城市列表,成员类型为NSArray<BMKCityListInfo*>,如果输入的地点在本城市没有而在其它城市有,则返回其它城市的信息
|
||||
@property (nonatomic, strong) NSArray* wayPointCityList;
|
||||
@end
|
||||
|
||||
///此类表示公共交通信息查询结果
|
||||
@interface BMKBusLineResult : NSObject{
|
||||
NSString* _busCompany;
|
||||
NSString* _busLineName;
|
||||
NSString* _uid;
|
||||
NSString* _startTime;
|
||||
NSString* _endTime;
|
||||
int _isMonTicket;
|
||||
NSArray* _busStations;
|
||||
NSArray* _busSteps;
|
||||
}
|
||||
///公交公司名称
|
||||
@property (nonatomic, strong) NSString* busCompany;
|
||||
///公交线路名称
|
||||
@property (nonatomic, strong) NSString* busLineName;
|
||||
///公交线路方向
|
||||
@property (nonatomic, strong) NSString* busLineDirection;
|
||||
///公交线路uid
|
||||
@property (nonatomic, strong) NSString* uid;
|
||||
///公交路线首班车时间
|
||||
@property (nonatomic, strong) NSString* startTime;
|
||||
///公交路线末班车时间
|
||||
@property (nonatomic, strong) NSString* endTime;
|
||||
///公交是线是否有月票
|
||||
@property (nonatomic) int isMonTicket;
|
||||
///起步票价
|
||||
@property (nonatomic, assign) CGFloat basicPrice;
|
||||
///全程票价
|
||||
@property (nonatomic, assign) CGFloat totalPrice;
|
||||
///所有公交站点信息,成员类型为BMKBusStation
|
||||
@property (nonatomic, strong) NSArray* busStations;
|
||||
///公交路线分段信息,成员类型为BMKBusStep
|
||||
@property (nonatomic, strong) NSArray* busSteps;
|
||||
@end
|
||||
|
||||
///此类表示步行路线结果
|
||||
@interface BMKWalkingRouteResult : NSObject{
|
||||
BMKTaxiInfo* _taxiInfo;
|
||||
BMKSuggestAddrInfo* _suggestAddrResult;
|
||||
NSArray* _routes;
|
||||
}
|
||||
///该路线打车信息
|
||||
@property (nonatomic, strong) BMKTaxiInfo* taxiInfo;
|
||||
///返回起点或终点的地址信息结果
|
||||
@property (nonatomic, strong) BMKSuggestAddrInfo* suggestAddrResult;
|
||||
///步行结果,现在只返回一条。成员类型为BMKWalkingRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示驾车路线结果
|
||||
@interface BMKDrivingRouteResult : NSObject{
|
||||
BMKTaxiInfo* _taxiInfo;
|
||||
BMKSuggestAddrInfo* _suggestAddrResult;
|
||||
NSArray* _routes;
|
||||
}
|
||||
///该路线打车信息
|
||||
@property (nonatomic, strong) BMKTaxiInfo* taxiInfo;
|
||||
///返回起点或终点的地址信息结果
|
||||
@property (nonatomic, strong) BMKSuggestAddrInfo* suggestAddrResult;
|
||||
///驾车结果,支持多路线。成员类型为BMKDrivingRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
|
||||
@end
|
||||
|
||||
@interface BMKTransitRouteResult : NSObject{
|
||||
BMKTaxiInfo* _taxiInfo;
|
||||
BMKSuggestAddrInfo* _suggestAddrResult;
|
||||
NSArray* _routes;
|
||||
}
|
||||
///该路线打车信息
|
||||
@property (nonatomic, strong) BMKTaxiInfo* taxiInfo;
|
||||
///返回起点或终点的地址信息结果
|
||||
@property (nonatomic, strong) BMKSuggestAddrInfo* suggestAddrResult;
|
||||
///方案数组,成员类型为BMKTransitRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示公共交通路线结果
|
||||
@interface BMKMassTransitRouteResult : NSObject
|
||||
|
||||
///返回起点或终点的地址信息结果
|
||||
@property (nonatomic, strong) BMKSuggestAddrInfo* suggestAddrResult;
|
||||
///方案数组,成员类型为BMKMassTransitRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
///总方案数
|
||||
@property (nonatomic, assign) NSInteger totalRoutes;
|
||||
///该路线打车信息(只有起终点是大陆地区且是同城的请求时才返回此字段, 否则此字段为nil)
|
||||
@property (nonatomic, strong) BMKTaxiInfo* taxiInfo;
|
||||
|
||||
@end
|
||||
|
||||
///此类表示骑行路线结果
|
||||
@interface BMKRidingRouteResult : NSObject
|
||||
|
||||
///返回起点或终点的地址信息结果
|
||||
@property (nonatomic, strong) BMKSuggestAddrInfo* suggestAddrResult;
|
||||
///骑行路线结果,成员类型为BMKRidingRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
|
||||
@end
|
||||
|
||||
/// 此类表示室内路线结果
|
||||
@interface BMKIndoorRouteResult : NSObject
|
||||
|
||||
///方案数组,成员类型为BMKIndoorRouteLine
|
||||
@property (nonatomic, strong) NSArray* routes;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// BMKSearchBase.h
|
||||
// SearchComponent
|
||||
//
|
||||
// Created by wzy on 15/9/9.
|
||||
// Copyright © 2015年 baidu. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BMKSearchBase_h
|
||||
#define BMKSearchBase_h
|
||||
|
||||
///检索服务基类
|
||||
@interface BMKSearchBase : NSObject
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#endif /* BMKSearchBase_h */
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// BMKSearchComponent.h
|
||||
// SearchComponent
|
||||
//
|
||||
// Created by baidu on 14-3-10.
|
||||
// Copyright (c) 2014年 baidu. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BMKSearchVersion.h"
|
||||
#import "BMKPoiSearchType.h"
|
||||
#import "BMKGeocodeType.h"
|
||||
#import "BMKRouteSearchType.h"
|
||||
#import "BMKPoiSearchOption.h"
|
||||
#import "BMKPoiSearch.h"
|
||||
#import "BMKGeocodeSearch.h"
|
||||
#import "BMKGeocodeSearchOption.h"
|
||||
#import "BMKShareURLSearch.h"
|
||||
#import "BMKShareUrlSearchOption.h"
|
||||
#import "BMKSuggestionSearch.h"
|
||||
#import "BMKSuggestionSearchOption.h"
|
||||
#import "BMKBusLineSearch.h"
|
||||
#import "BMKBusLineSearchOption.h"
|
||||
#import "BMKRouteSearch.h"
|
||||
#import "BMKRouteSearchOption.h"
|
||||
#import "BMKDistrictSearch.h"
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// BMKSearchVersion.h
|
||||
// SearchComponent
|
||||
//
|
||||
// Created by wzy on 15/9/9.
|
||||
// Copyright © 2015年 baidu. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef BMKSearchVersion_h
|
||||
#define BMKSearchVersion_h
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/**
|
||||
*重要:
|
||||
*base组件的版本和search组件的版本必须一致,否则不能正常使用
|
||||
*/
|
||||
|
||||
/**
|
||||
*获取当前地图API search组件 的版本号
|
||||
*当前search组件版本 : 3.3.0
|
||||
*return 返回当前API search组件 的版本号
|
||||
*/
|
||||
UIKIT_EXTERN NSString* BMKGetMapApiSearchComponentVersion();
|
||||
|
||||
/**
|
||||
*检查search组件的版本号是否和base组件的版本号一致
|
||||
*return 版本号一致返回YES
|
||||
*/
|
||||
UIKIT_EXTERN BOOL BMKCheckSearchComponentIsLegal();
|
||||
|
||||
#endif /* BMKSearchVersion_h */
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* BMKShareUrlSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "BMKShareUrlSearchOption.h"
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
///分享URL结果类
|
||||
@interface BMKShareURLResult : NSObject
|
||||
{
|
||||
NSString * _url;
|
||||
}
|
||||
///返回结果url
|
||||
@property (nonatomic,strong) NSString* url;
|
||||
@end
|
||||
|
||||
|
||||
@protocol BMKShareURLSearchDelegate;
|
||||
///短串搜索服务
|
||||
@interface BMKShareURLSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKShareURLSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*获取poi详情短串分享url
|
||||
*异步函数,返回结果在BMKShareUrlSearchDelegate的onGetPoiDetailShareURLResult通知
|
||||
*@param poiDetailShareUrlSearchOption poi详情短串分享检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)requestPoiDetailShareURL:(BMKPoiDetailShareURLOption *) poiDetailShareUrlSearchOption;
|
||||
|
||||
/**
|
||||
*获取反geo短串分享url
|
||||
*异步函数,返回结果在BMKShareUrlSearchDelegate的onGetLocationShareURLResult通知
|
||||
*@param reverseGeoShareUrlSearchOption 反geo短串分享检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)requestLocationShareURL:(BMKLocationShareURLOption *)reverseGeoShareUrlSearchOption;
|
||||
|
||||
/**
|
||||
*获取路线规划短串分享url
|
||||
*异步函数,返回结果在BMKShareUrlSearchDelegate的onGetRoutePlanShareURLResult通知
|
||||
*@param routePlanShareUrlSearchOption 取路线规划短串分享检索信息类
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)requestRoutePlanShareURL:(BMKRoutePlanShareURLOption *)routePlanShareUrlSearchOption;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
///搜索delegate,用于获取搜索结果
|
||||
@protocol BMKShareURLSearchDelegate <NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回poi详情分享url
|
||||
*@param searcher 搜索对象
|
||||
*@param result 返回结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetPoiDetailShareURLResult:(BMKShareURLSearch *)searcher result:(BMKShareURLResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回位置信息分享url
|
||||
*@param searcher 搜索对象
|
||||
*@param result 返回结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetLocationShareURLResult:(BMKShareURLSearch *)searcher result:(BMKShareURLResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
/**
|
||||
*返回路线规划分享url
|
||||
*@param searcher 搜索对象
|
||||
*@param result 返回结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetRoutePlanShareURLResult:(BMKShareURLSearch *)searcher result:(BMKShareURLResult *)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* BMKShareUrlSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
/// poi详情短串分享检索信息类
|
||||
@interface BMKPoiDetailShareURLOption : NSObject
|
||||
{
|
||||
NSString *_uid;
|
||||
}
|
||||
///poi的uid
|
||||
@property (nonatomic, strong) NSString *uid;
|
||||
|
||||
@end
|
||||
|
||||
///反geo短串分享检索信息类
|
||||
@interface BMKLocationShareURLOption : NSObject {
|
||||
NSString *_name;
|
||||
NSString *_snippet;
|
||||
CLLocationCoordinate2D _location;
|
||||
}
|
||||
///名称
|
||||
@property (nonatomic, strong) NSString *name;
|
||||
///通过短URL调起客户端时作为附加信息显示在名称下面
|
||||
@property (nonatomic, strong) NSString *snippet;
|
||||
///经纬度
|
||||
@property (nonatomic, assign) CLLocationCoordinate2D location;
|
||||
@end
|
||||
|
||||
|
||||
///路线规划短串分享
|
||||
typedef enum {
|
||||
BMK_ROUTE_PLAN_SHARE_URL_TYPE_DRIVE = 0, //驾车路线规划短串分享
|
||||
BMK_ROUTE_PLAN_SHARE_URL_TYPE_WALK = 1, //步行路线规划短串分享
|
||||
BMK_ROUTE_PLAN_SHARE_URL_TYPE_RIDE = 2, //骑行路线规划短串分享
|
||||
BMK_ROUTE_PLAN_SHARE_URL_TYPE_TRANSIT = 3, //公交路线规划短串分享
|
||||
}BMKRoutePlanShareURLType;
|
||||
|
||||
///路线规划短串分享检索信息类
|
||||
@interface BMKRoutePlanShareURLOption : NSObject
|
||||
|
||||
///路线规划短串分享类型
|
||||
@property (nonatomic, assign) BMKRoutePlanShareURLType routePlanType;
|
||||
///起点,可通过关键字、坐标两种方式指定,使用关键字时必须指定from.cityID
|
||||
@property (nonatomic, strong) BMKPlanNode *from;
|
||||
///终点,可通过关键字、坐标两种方式指定,使用关键字时必须指定to.cityID
|
||||
@property (nonatomic, strong) BMKPlanNode *to;
|
||||
///cityID,当进行公交路线规划短串分享且起终点通过关键字指定时,必须指定
|
||||
@property (nonatomic, assign) NSUInteger cityID;
|
||||
///公交路线规划短串分享时使用,分享的是第几条线路
|
||||
@property (nonatomic, assign) NSUInteger routeIndex;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* BMKSuggestionSearch.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "BMKSuggestionSearchOption.h"
|
||||
#import <BaiduMapAPI_Base/BMKTypes.h>
|
||||
#import "BMKSearchBase.h"
|
||||
|
||||
///Suggestion结果类
|
||||
@interface BMKSuggestionResult : BMKSearchBase
|
||||
{
|
||||
NSArray* _keyList;
|
||||
NSArray* _cityList;
|
||||
NSArray* _districtList;
|
||||
}
|
||||
///key列表,成员是NSString
|
||||
@property (nonatomic, strong) NSArray* keyList;
|
||||
///city列表,成员是NSString
|
||||
@property (nonatomic, strong) NSArray* cityList;
|
||||
///district列表,成员是NSString
|
||||
@property (nonatomic, strong) NSArray* districtList;
|
||||
///poiId列表,成员是NSString
|
||||
@property (nonatomic, strong) NSArray* poiIdList;
|
||||
///pt列表,成员是:封装成NSValue的CLLocationCoordinate2D
|
||||
@property (nonatomic, strong) NSArray* ptList;
|
||||
|
||||
@end
|
||||
|
||||
@protocol BMKSuggestionSearchDelegate;
|
||||
///sug搜索服务
|
||||
@interface BMKSuggestionSearch : BMKSearchBase
|
||||
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
|
||||
@property (nonatomic, weak) id<BMKSuggestionSearchDelegate> delegate;
|
||||
|
||||
/**
|
||||
*搜索建议检索
|
||||
*@param suggestionSearchOption sug检索信息类
|
||||
*异步函数,返回结果在BMKSuggestionSearchDelegate的onGetSuggestionResult通知
|
||||
*@return 成功返回YES,否则返回NO
|
||||
*/
|
||||
- (BOOL)suggestionSearch:(BMKSuggestionSearchOption*)suggestionSearchOption;
|
||||
|
||||
@end
|
||||
|
||||
///搜索delegate,用于获取搜索结果
|
||||
@protocol BMKSuggestionSearchDelegate<NSObject>
|
||||
@optional
|
||||
/**
|
||||
*返回suggestion搜索结果
|
||||
*@param searcher 搜索对象
|
||||
*@param result 搜索结果
|
||||
*@param error 错误号,@see BMKSearchErrorCode
|
||||
*/
|
||||
- (void)onGetSuggestionResult:(BMKSuggestionSearch*)searcher result:(BMKSuggestionResult*)result errorCode:(BMKSearchErrorCode)error;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* BMKSuggestionSearchOption.h
|
||||
* BMapKit
|
||||
*
|
||||
* Copyright 2014 Baidu Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
/// sug检索信息类
|
||||
@interface BMKSuggestionSearchOption : NSObject
|
||||
{
|
||||
NSString *_keyword;
|
||||
NSString *_cityname;
|
||||
|
||||
}
|
||||
///搜索关键字
|
||||
@property (nonatomic, strong) NSString *keyword;
|
||||
///城市名
|
||||
@property (nonatomic, strong) NSString *cityname;
|
||||
///是否只返回指定城市检索结果(默认:NO)(提示:海外区域暂不支持设置cityLimit)
|
||||
@property (nonatomic, assign) BOOL cityLimit;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
检索功能:包括POI检索,公交信息查询,路线规划,地理编码/反地理编码,在线建议查询,短串分享等;
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
iOS 地图 SDK v3.3.0是适用于iOS系统移动设备的矢量地图开发包
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
地图SDK功能介绍(全功能开发包):
|
||||
|
||||
地图:提供地图展示和地图操作功能;
|
||||
|
||||
POI检索:支持周边检索、区域检索和城市内兴趣点检索;
|
||||
|
||||
地理编码:提供经纬度和地址信息相互转化的功能接口;
|
||||
|
||||
线路规划:支持公交、驾车、步行三种方式的线路规划;
|
||||
|
||||
覆盖物图层:支持在地图上添加覆盖物(标注、几何图形、热力图、地形图图层等),展示更丰富的LBS信息;
|
||||
|
||||
定位:获取当前位置信息,并在地图上展示(支持普通、跟随、罗盘三种模式);
|
||||
|
||||
离线地图:使用离线地图可节省用户流量,提供更好的地图展示效果;
|
||||
|
||||
调启百度地图:利用SDK接口,直接在本地打开百度地图客户端或WebApp,实现地图功能;
|
||||
|
||||
周边雷达:利用周边雷达功能,开发者可在App内低成本、快速实现查找周边使用相同App的用户位置的功能;
|
||||
|
||||
LBS云检索:支持查询存储在LBS云内的自有数据;
|
||||
|
||||
特色功能:提供短串分享、Place详情检索、热力图等特色功能,帮助开发者搭建功能更加强大的应用;
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
注:自v3.2.0起,百度地图iOS SDK全面支持HTTPS,需要广大开发者导入第三方openssl静态库:libssl.a和libcrypto.a(存放于thirdlib目录下)。
|
||||
|
||||
新 版 提 示 】
|
||||
【 注 意 】
|
||||
1、自v3.2.0起,百度地图iOS SDK全面支持HTTPS,需要广大开发者导入第三方openssl静态库:libssl.a和libcrypto.a(存放于thirdlib目录下)
|
||||
添加方法:在 TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择libssl.a和libcrypto.a添加到工程中 。
|
||||
|
||||
2、支持CocoaPods导入
|
||||
pod setup //更新CocoPods的本地库
|
||||
pod search BaiduMapKit //下载最新地图SDK
|
||||
|
||||
【 新 增 】
|
||||
[ 基 础 地 图 ]
|
||||
3D地图下,增加显示天空效果,无需设置
|
||||
|
||||
[ 工 具 ]
|
||||
1.全面支持GCJ02坐标输入/输出,全局设置方法如下:
|
||||
[BMKMapManager setCoordinateTypeUsedInBaiduMapSDK:BMK_COORDTYPE_COMMON];//默认为BD09LL坐标,且此方法仅在国内生效,国外均为WGS84坐标
|
||||
|
||||
2. 新增调启步行AR导航接口:openBaiduMapwalkARNavigation
|
||||
|
||||
[ LBS云]
|
||||
云检索中,keywords 改为非必填项
|
||||
|
||||
【 优 化 】
|
||||
优化个性化地图元素分类
|
||||
|
||||
【 修 复 】
|
||||
少部分地铁线及室内图无法显示问题(v3.2.0引入的问题)。␍未下载全国离线基础包时,离线状态下全国(球)地图显示异常。␍␍
|
||||
Reference in New Issue
Block a user