新会御景酒店 map.baidu.com m.baidu.com

&&新闻:││&互动:│││ 县(市)频道:
&&频道:││││││|
江门玉湖御景酒店
每间每晚?378元起
江门玉湖御景酒店
酒店设施:免费Wifi、免费停车场、会议服务、酒吧、大床、双...
所在位置:
酒店地址: 新会区圭峰山风景区(紧靠圭峰山)&&&&
酒店描述:&&&江门玉湖御景酒店由中新家具实业发展有限公司独资兴建,香港堡龙国际酒店管理公司策划,管理的具有高星级酒店档...
例如:这家酒店大床房有窗户吗? 押金是多少?
正常工作日9:00-18:00,您的提问会得到及时回答;其它时段可能需等待较长时间
13913****** 于提问:
江门玉湖御景酒店地址?从江门火车站到江门玉湖御景酒店怎么过去?
您好,江门玉湖御景酒店地址:圭峰山风景区(紧靠圭峰山),酒店位于新会区附近,您可以从酒店地图[.cn//hotelmap-5813.html]上看到江门玉湖御景酒店的位置,以及如何从火车站、长途汽车站、机场前往酒店。玉湖小苑站、玉湖别墅站
1381334**** 预订:
附近三公里其他酒店
距离:2.2公里
距离:2.2公里
距离:2.6公里baidumap demo(二) - yulang - 推酷
baidumap demo(二) - yulang
百度地图API提供的搜索服务包括:POI检索,多关键字检索,公交方案检索,驾车路线检索,步行路线检索,地理编码,反地理编码,公交详情检索,在线建议查询,短串分享。
所有检索请求接口均为异步接口,您必须实现BMKSearchDelegate协议,在一个时刻只能有一个BMKSearch接受回调消息,因此如果在不同的viewController中使用多个BMKSearch,需要在页面切换对BMKSearch的delegate做处理,代码如下:
)viewWillAppear:(BOOL)animated&&
&&&&_search.delegate&=&&&
)viewWillDisappear:(BOOL)animated&&
&&&&_search.delegate&=&&&
在检索到结果后,API会回调BMKSearchDelegate对应的接口,通知调用者检索结果数据。
BMKSearchDelegate对应的接口如下:
&*返回POI搜索结果
&*@param&poiResultList&搜索结果列表,成员类型为BMKPoiResult
&*@param&error&错误号,@see&BMKErrorCode
)onGetPoiResult:(NSArray*)poiResultList&searchType:(
)type&errorCode:(
&*返回公交搜索结果
*@param&result&搜索结果
&*@param&error&错误号,@see&BMKErrorCode
)onGetTransitRouteResult:(BMKPlanResult*)result&errorCode:(
&*返回驾乘搜索结果
&*@param&result&搜索结果
&*@param&error&错误号,@see&BMKErrorCode
)onGetDrivingRouteResult:(BMKPlanResult*)result&errorCode:(
&*返回步行搜索结果
&*@param&result&搜索结果
&*@param&error&错误号,@see&BMKErrorCode
)onGetWalkingRouteResult:(BMKPlanResult*)result&errorCode:(
&*返回地址信息搜索结果
&*@param&result&搜索结果
&*@param&error&错误号,@see&BMKErrorCode
)onGetAddrResult:(BMKAddrInfo*)result&errorCode:(
&*返回公交详情搜索结果
&*@param&result&搜索结果
&*@param&error&错误号,@see&BMKErrorCode
)onGetBusDetailResult:(BMKBusLineResult*)result&errorCode:(
&*返回suggestion搜索结果&
&*@param&result&搜索结果&
&*@param&error&错误号,@see&BMKErrorCode&
)onGetSuggestionResult:(BMKSuggestionResult*)result&errorCode:(
)error{&&&&
&*返回poi详情分享url&
&*@param&url&返回结果url&
&*@param&error&错误号,@see&BMKErrorCode&
)onGetShareUrl:(NSString*)&url&withType:(BMK_SHARE_URL_TYPE)&urlType&errorCode:(
)error&{&&&&
百度地图API提供以下几类POI检索类型:城市内检索,周边检索,范围检索,多关键字检索。
此处以城市内检索为例说明:
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码如下:
&PoiSearchDemoViewController&:&UIViewController&BMKMapViewDelegate,&BMKSearchDelegate&&{&&&&
&&&&IBOutlet&BMKMapView*&_mapV&&&&
&&&&BMKSearch*&_&&&&
在ViewController.m的viewDidLoad中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取POI结果的方法,代码如下:
)viewDidLoad&{&&&&&
&viewDidLoad];&&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&&&
&&&&_search.delegate&=&&&&&
//发起POI检索&&
&&&&[_search&poiSearchInCity:@
&withKey:@
&pageIndex:0];&&&&
)onGetPoiResult:(NSArray*)poiResultList&searchType:(
)type&errorCode:(
)error&&&&
&(error&==&BMKErrorOk)&{&&&&
&&&&&&&&BMKPoiResult*&result&=&[poiResultList&objectAtIndex:0];&&&&
&i&=&0;&i&&&result.poiInfoList.&i++)&{&&&&
&&&&&&&&&&&&BMKPoiInfo*&poi&=&[result.poiInfoList&objectAtIndex:i];&&&&
&&&&&&&&BMKPointAnnotation*&item&=&[[BMKPointAnnotation&alloc]init];&&&&
&&&&&&&&&&&&item.coordinate&=&poi.&&&&
&&&&&&&&&&&item.title&=&poi.&&&&
&&&&&&&&&&&&[_mapView&addAnnotation:item];&&&&
&&&&&&&&&&&&[item&release];&&&&
&&&&&&&&}&&&&
运行效果如图:
示例代码请参考
demo工程中的PoiSearchDemoViewController.mm文件
公交方案检索
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取公交路线结果的方法,代码如下:
)viewDidLoad&{&&&&&
&viewDidLoad];&&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&&&
&&&&_search.delegate&=&&&&&
//发起公交检索&&
&&&&BMKPlanNode*&start&=&[[BMKPlanNode&alloc]init];&&&&
&&&&start.name&=&@
&&&&BMKPlanNode*&end&=&[[BMKPlanNode&alloc]init];&&&&
&&&&end.name&=&@
&百度大厦&
&&&&&&&&[_search&transitSearch:@
&startNode:start&endNode:end];&&&&
&&&&[start&release];&&&&
&&&&[end&release];&&&&
)onGetTransitRouteResult:(BMKPlanResult*)result&errorCode:(
)error&&&&
//&在此处添加您对公交方案结果的处理&&
将公交方案对应的路线和关键点绘制在地图上,效果如下图:
示例代码请参考
demo工程中的RouteSearchDemoViewController.mm文件
驾车路线检索
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取驾车路线结果的方法,代码如下:
)viewDidLoad&{&&&&&
&viewDidLoad];&&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&&&
&&&&_search.delegate&=&&&&&
//发起公交检索&&
&&&&BMKPlanNode*&start&=&[[BMKPlanNode&alloc]init];&&&&
&&&&start.name&=&@
&&&&BMKPlanNode*&end&=&[[BMKPlanNode&alloc]init];&&&&
&&&&end.name&=&@
&百度大厦&
&&&&[_search&drivingSearch:@
&startNode:start&endCity:@
&endNode:end];&&&&
&&&&[start&release];&&&&
&&&&[end&release];&&&&
)onGetDrivingRouteResult:(BMKPlanResult*)result&errorCode:(
)error&&&&
//&在此处添加您对驾车方案结果的处理&&
将驾车方案对应的路线和关键点绘制在地图上,效果如下图:
示例代码请参考
demo工程中的RouteSearchDemoViewController.mm文件
驾车路线途经点检索
BMKPlanNode*&start&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
start.pt&=&startPt;&&
start.name&=&_startAddrText.&&
BMKPlanNode*&end&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
end.name&=&_endAddrText.&&
NSMutableArray&*&array&=&[[[NSMutableArray&alloc]&initWithCapacity:10]&autorelease];&&
BMKPlanNode*&wayPoint1&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
wayPoint1.cityName&=&@
wayPoint1.name&=&@
&清华大学&
[array&addObject:wayPoint1];&&
BOOL&flag&=&[_search&drivingSearch:_startCityText.text&startNode:start&endCity:_endCityText.text&endNode:end&throughWayPoints:array];&&
注意:途经点传入的数组内容为BMKPlanNode,途经点长度最大限制为10个,超过10个途经点的请求不会被发送。BMKPlanNode数据结构新添加cityName属性,标记途经点的城市,如果不填默认用startCity。
步行路线检索
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取步行路线结果的方法,代码如下:
)viewDidLoad&{&&
&viewDidLoad];&&
&&&&_mapView.delegate&=&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&
&&&&_search.delegate&=&&&
//发起步行检索
&&&&BMKPlanNode*&start&=&[[BMKPlanNode&alloc]init];&&
&&&&start.name&=&@
&&&&BMKPlanNode*&end&=&[[BMKPlanNode&alloc]init];&&
&&&&end.name&=&@
&百度大厦&
&&&&[_search&walkingSearch:@
&startNode:start&endCity:@
&endNode:end];&&
&&&&[start&release];&&
&&&&[end&release];&&
)onGetWalkingRouteResult:(BMKPlanResult*)result&errorCode:(
//&在此处添加您对步行方案结果的处理
将步行方案对应的路线和关键点绘制在地图上,效果如下图:
示例代码请参考
demo工程中的RouteSearchDemoViewController.mm文件
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取地理编码结果的方法,代码如下:
)viewDidLoad&{&&
&viewDidLoad];&&
&&&&_mapView.delegate&=&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&
&&&&_search.delegate&=&&&
//发起地理编码
&&&&[_search&geocode:@
&东长安街33号&
&withCity:@
)onGetAddrResult:(BMKAddrInfo*)result&errorCode:(
//&在此处添加您对地理编码结果的处理
完整的示例代码请参考
demo工程中的GeocodeDemoViewController.mm文件
反地理编码
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取反地理编码结果的方法,代码如下:
)viewDidLoad&{&&&&
&viewDidLoad];&&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&&&
&&&&_search.delegate&=&&&&&
//发起反地理编码&&
&&&&CLLocationCoordinate2D&pt&=&(CLLocationCoordinate2D){0,&0};
//此处填写想要反地理编码的坐标
&&&&BOOL&flag&=&[_search&reverseGeocode:pt];&&
)onGetAddrResult:(BMKAddrInfo*)result&errorCode:(
)error&&&&
//&在此处添加您对反地理编码结果的处理&&
完整的示例代码请参考
demo工程中的GeocodeDemoViewController.mm文件
公交详情检索
在ViewController.h中声明BMKSearch对象,并将ViewController实现BMKSearchDelegate协议,代码参考
中的示例代码.
在ViewController.m中创建BMKSearch对象,设置对应的delegate,并实现BMKSearchDelegate协议中获取驾车路线结果的方法。发起公交详情搜索前,先进行POI检索,检索结果中poi.epoitype == 2时表示该类型为公交线路,才可发起公交搜索,代码如下:
)viewDidLoad&{&&&&&
&viewDidLoad];&&&&
&&&&_search&=&[[BMKSearch&alloc]init];&&&&
&&&&_search.delegate&=&&&&&
//发起poi检索&&
&&&&[_search&poiSearchInCity:@
&withKey:@
&pageIndex:0];&&&&
)onGetPoiResult:(NSArray*)poiResultList&searchType:(
)type&errorCode:(
)error&&&&
&(error&==&BMKErrorOk)&{&&&&
&&&&&&&&BMKPoiResult*&result&=&[poiResultList&objectAtIndex:0];&&&&
&i&=&0;&i&&&result.poiInfoList.&i++)&{&&&&
&&&&&&&&&&&&BMKPoiInfo*&poi&=&[result.poiInfoList&objectAtIndex:i];&&&&
&&&&&&&&&&&&
(poi.epoitype&==&2)&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&{&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&}&&&&
&&&&&&&&}&&&&
&&&&&&&&&&&&
//&发起公交详情搜索&&
&&&&&&&&&&&&&&
(poi&!=&nil&&&&poi.epoitype&==&2&)&&&&
&&&&&&&&&&&&&&{&&&&
&&&&&&&&&&&&&&&&NSLog(poi.uid);&&&&
&&&&&&&&&&&&&&&&&&&BOOL&flag&=&[_search&busLineSearch:@
&&&withKey:poi.uid];&&&&
&&&&&&&&&&&&&&&&&&&&&&
&(!flag)&{&&&&
&&&&&&&&&&&&&&&&&&&&&&&NSLog(@
&search&failed!&
&&&&&&&&&&&&&&&&&&&&&&}&&&&
&&&&&&&&&&&&&&}&&&&
)onGetBusDetailResult:(BMKBusLineResult&*)busLineResult&errorCode:(
)error&&&&
//&在此处添加您对公交详情结果的处理&&
将公交详情对应的路线和关键点绘制在地图上,效果如下图:
示例代码请参考
demo工程中的BusLineSearchViewController.mm文件
在线建议查询
在线建议查询是指根据关键词查询在线建议词,代码如下:
[_search&suggestionSearch:@
在- (void)onGetSuggestionResult:(BMKSuggestionResult*)result errorCode:(int)接口中获取数据。
短串分享是指,用户搜索查询后得到的每一个地理位置结果将会对应一条短串(短链接),用户可以通过短信、邮件或第三方分享组件(如微博、微信等)把短串分享给其他用户从而实现地理位置信息的分享。当其他用户收到分享的短串后,点击短串即可打开手机上的百度地图客户端或者手机浏览器进行查看。
例如,用户搜索&百度大厦&后通过短信使用短串分享功能把该地点分享给好友,好友点击短信中的短串&http://j./BkmBk&后可以调起百度地图客户端或者手机浏览器查看&百度大厦&的地理位置信息。
目前短串分享功能暂时开放了&POI搜索结果分享&和&反向地理编码结果分享&,日后会开放更多的功能,欢迎广大开发者使用短串分享功能。
1、POI搜索结果分享
根据POI检索结果的UID,生成一个短连接,用于分享。方法为:- (BOOL)poiDetailShareUrl:(NSString*)参数uid为待分享POI点的UID,代码如下:
//发起短串搜索获取poi分享url
BOOL&flag&=&[_search&poiDetailShareUrl:poi.uid];&&
2、反向地理编码结果分享
根据反向地理编码结果,生成一个用于分享的短连接。方法为:-(BOOL)reverseGeoShareUrl:(CLLocationCoordinate2D)coorpoiName:(NSString*)namepoiAddress:(NSString*)参数location:共享点经纬度坐标;name:共享点的名称;address:共享点的地址。代码如下:
//发起短串搜索获取反geo分享url
BOOL&flag&=&[_search&reverseGeoShareUrl:pt&poiName:geoName&poiAddress:addr];&&&
3、获取短串分享结果
短串请求结果可以在BMKSearchDelegate的onGetShareUrl回调中获得,代码如下:
//返回短串分享url
)onGetShareUrl:(NSString*)&url&withType:(BMK_SHARE_URL_TYPE)&urlType&errorCode:(
&&&&shortUrl&=&&&
&(error&==&BMKErrorOk)&&
(showmeg!=nil)&&
&&&&&&&&{&&
&&&&&&&&&&&&[showmeg&release];&&
&&&&&&&&&&&&showmeg&=&&&
&&&&&&&&}&&
&&&&&&&&showmeg&=&[[NSString&stringWithFormat:@
&这里是:%@\r\n%@\r\n%@&
,geoName,addr,
&&&&&&&&Url]&retain];&&
&&&&&&&&UIAlertView&*myAlertView&=&[[UIAlertView&alloc]&initWithTitle:@
&短串分享&
&message&&
&&&&&&&&:showmeg&delegate:self&cancelButtonTitle:nil&otherButtonTitles:@
&&&&&&&&myAlertView.tag&=&1000;&&
&&&&&&&&[myAlertView&show];&&
&&&&&&&&[myAlertView&release];&&
&&&&}&&&&&&
调启百度导航
百度地图iOS SDK自v2.1.1版本起,为用户提供调启百度导航的能力。调启导航,分为两种:调启百度地图客户端导航和调启百度地图Web导航,用户只需很小的工作量,就可实现驾车路线导航的全套功能。
导航的核心代码如下,详细使用方法请参考Demo:
//调启百度地图客户端导航
-&(IBAction)nativeNavi&&
//初始化调启导航时的参数管理类
NaviPara*&para&=&[[NaviPara&alloc]init];&&
//指定导航类型
para.naviType&=&NAVI_TYPE_NATIVE;&&
//初始化终点节点
BMKPlanNode*&end&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
//指定终点经纬度
CLLocationCoordinate2D&coor2;&&
coor2.latitude&=&_nativeEndLatitude.text.floatV&&
coor2.longitude&=&_nativeEndLongitude.text.floatV&&
end.pt&=&coor2;&&
//指定终点名称
end.name&=&_nativeEndName.&&
//指定终点
para.endPoint&=&&&
//指定返回自定义scheme,具体定义方法请参考常见问题
para.appScheme&=&@
&baidumapsdk://&
//调启百度地图客户端导航
[BMKNavigation&openBaiduMapNavigation:para];&&
[para&release];&&
//调启web导航
-&(IBAction)webNavi&&
//初始化调启导航时的参数管理类
NaviPara*&para&=&[[NaviPara&alloc]init];&&
//指定导航类型
para.naviType&=&NAVI_TYPE_WEB;&&
//初始化起点节点
BMKPlanNode*&start&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
//指定起点经纬度
CLLocationCoordinate2D&coor1;&&
coor1.latitude&=&_webStartLatitude.text.floatV&&
coor1.longitude&=&_webStartLongitude.text.floatV&&
start.pt&=&coor1;&&
//指定起点名称
start.name&=&_webStartName.&&
//指定起点
para.startPoint&=&&&
//初始化终点节点
BMKPlanNode*&end&=&[[[BMKPlanNode&alloc]init]&autorelease];&&
CLLocationCoordinate2D&coor2;&&
coor2.latitude&=&_webEndLatitude.text.floatV&&
coor2.longitude&=&_webEndLongitude.text.floatV;&&
end.pt&=&coor2;&&
para.endPoint&=&&&
//指定终点名称
end.name&=&_webEndName.&&
//指定调启导航的app名称
para.appName&=&[NSString&stringWithFormat:@
&testAppName&
//调启web导航
[BMKNavigation&openBaiduMapNavigation:para];&&
[para&release];&&
效果如下图:
已发表评论数()
已收藏到推刊!
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
排版有问题
没有分页内容
视频无法显示
图片无法显示&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!}

我要回帖

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信