第18行: | 第18行: | ||
<div class="video-wrap infor"> | <div class="video-wrap infor"> | ||
<div class="video-control"></div><!-- 安卓视频位置 (不写协议)--> | <div class="video-control"></div><!-- 安卓视频位置 (不写协议)--> | ||
− | <pre></pre> | + | <pre>//mapopen-website-wiki.bj.bcebos.com/demos/AndroidVideos/签到.mp4</pre> |
− | + | </div><div class="video-icon-and"><div class="play play-and"></div><div class="stop stop-and"></div></div></div><div class="progressWrap-hide-and"></div><div id="videoControls-and"><div id="progressWrap-and"><div id="playProgress-and"></div></div></div></div><div class="left-qrCode"><!-- 安卓二维码位置 --><div class="qrCode-and">1590746640|//mapopen-website-wiki.bj.bcebos.com/demos/qrcodes/签到.png</div><div>扫码体验</div></div></div><div class="wrap_right"><div class="wrap_right_nav"><div class="wrap_right_nav_l"><div>使用产品</div><div><!-- 安卓使用产品下选项,可有多个 --><!-- 产品1|/index.php?title=test --><div class="documentA">产品1|/index.php?title=test</div><div>></div><div class="documentA">产品2|/index.php?title=test</div></div></div><div class="wrap_right_nav_r">下载源码</div><!-- 安卓源码地址 --><div class="github-url-and">//mapopen-pub-androidsdk.cdn.bcebos.com/map/sample/BaiduLBS_AndroidSDK_Sample.zip</div></div><div class="wrap_table"><div class="table_nav"><div class="left-icon"></div><div>核心接口</div></div><div class="table_wrap"><div class="table_wrap_title"><div>类</div><div>接口</div><div>描述</div><div>备注</div></div><!-- 表格接口,可有多个 --><div class="table_wrap_con"><div class="table_wrap_w"><div><div class="table-wrap-className">ReverseGeoCodeOption</div></div><div><div>newVersion(int latestAdmin)</div></div><div><div>设置是否返回新数据1返回0不返回</div></div><div><div>地图SDK</div></div></div><!-- --><div class="table_wrap_w"><div><div class="table-wrap-className">ReverseGeoCodeOption</div></div><div><div>radius(500)</div></div><div><div>POI召回半径,允许设置区间为0-1000米,超过1000米按1000米召回。默认值为1000</div></div><div><div>地图SDK</div></div></div><div class="table_wrap_w"><div><div class="table-wrap-className">SpatialRelationUtil</div></div><div><div>isCircleContainsPoint(LatLng center, int radius, LatLng point)</div></div><div><div>判断圆形是否包含传入的经纬度点</div></div><div><div>地图SDK</div></div></div><div class="table_wrap_w"><div><div class="table-wrap-className">LocationClient</div></div><div><div>start()</div></div><div><div>启动定位sdk</div></div><div><div>定位SDK</div></div></div><div class="table_wrap_w"><div><div class="table-wrap-className">LocationClient</div></div><div><div>setLocOption(LocationClientOption locOption)</div></div><div><div>给定位客户端设置参数</div></div><div><div>定位SDK</div></div></div><div class="table_wrap_w"><div><div class="table-wrap-className">BDAbstractLocationListener</div></div><div><div>BDAbstractLocationListener</div></div><div><div>监听定位结果回调函数</div></div><div><div>定位SDK</div></div></div></div></div></div></div></div> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <div class="pre-nav"><div class="left-icon"></div><div>重点关注</div></div><div class="pre-nav" style="margin-left: 10px;"><div>签到场景的核心难点在于解决定位不准的情况下纠正用户位置,示例中提供用户手动纠正位置功能来解决这一问题。</div></div><div class="pre-nav" style="margin-left: 10px;"><div>当正常通过定位确定用户位置之后,会给出周边POI列表供用户选择准确位置;</div></div><div class="pre-nav" style="margin-left: 10px;"><div>当定位发生微小漂移时,用户通过手动移动地图做位置调整,当前微调范围被限定在500米以内(可自定义),超过500米时弹出toast告知用户“微调距离不可超过500米”。</div></div><!-- <div class="more-nav"> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<div class="left-icon"></div> | <div class="left-icon"></div> | ||
<div>更多功能</div> | <div>更多功能</div> | ||
</div> | </div> | ||
− | <div class="more-wrap"> --> | + | <div class="more-wrap"> --><!-- 安卓更多功能下选项 --><!-- 点标记动画|/index.php?title=test --><!-- <div> |
− | + | ||
− | + | ||
− | + | ||
<div class="point"></div> | <div class="point"></div> | ||
<div class="documentA">点标记动画|/index.php?title=test</div> | <div class="documentA">点标记动画|/index.php?title=test</div> | ||
第193行: | 第39行: | ||
</div> --> | </div> --> | ||
− | + | </div><div class="ios-wrap wrap" style="display: none;"><div class="wrap-wp"><div class="wrap_left"><div class="left-video"><div class="img-bg-ios"></div><div class="phone-ios"><div class="video-wrap infor"><div class="video-control"></div><!-- ios视频位置 --><pre>//mapopen-website-wiki.bj.bcebos.com/demos/iostest.MP4 | |
− | + | </pre> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</div> | </div> | ||
<div class="video-icon-ios"> | <div class="video-icon-ios"> | ||
第231行: | 第67行: | ||
<!-- IOS使用产品下选项,可有多个 --> | <!-- IOS使用产品下选项,可有多个 --> | ||
<!-- 产品1|/index.php?title=test --> | <!-- 产品1|/index.php?title=test --> | ||
− | <div class="documentA"> | + | <div class="documentA">Android地图SDK|/index.php?title=androidsdk</div> |
− | + | <div class="documentA">Android定位SDK|/index.php?title=android-locsdk</div> | |
− | <div class="documentA"> | + | |
</div> | </div> | ||
</div> | </div> | ||
第266行: | 第101行: | ||
<div>V4.0.0起</div> | <div>V4.0.0起</div> | ||
</div> | </div> | ||
− | |||
</div><!-- --> | </div><!-- --> | ||
<div class="table_wrap_w"> | <div class="table_wrap_w"> | ||
第281行: | 第115行: | ||
<div>V4.0.0起</div> | <div>V4.0.0起</div> | ||
</div> | </div> | ||
− | |||
</div> | </div> | ||
− | |||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
− | |||
</div> | </div> | ||
</div> | </div> | ||
第300行: | 第131行: | ||
<div>Objective-C</div> | <div>Objective-C</div> | ||
</div> | </div> | ||
− | |||
<div class="pre-wrap-w pre-wrap-w-ios code_container"> | <div class="pre-wrap-w pre-wrap-w-ios code_container"> | ||
<!-- ios示例代码位置 --> | <!-- ios示例代码位置 --> | ||
− | <pre class="prettyprint prettyprinted pre-ios"> | + | <pre class="prettyprint prettyprinted pre-ios">1 |
− | 1 | + | |
/** 更新标注展示. */ | /** 更新标注展示. */ | ||
- (void)updateClusters { | - (void)updateClusters { | ||
第354行: | 第183行: | ||
<div>Objective-C</div> | <div>Objective-C</div> | ||
</div> | </div> | ||
− | |||
<div class="pre-wrap-w pre-wrap-w-ios code_container"> | <div class="pre-wrap-w pre-wrap-w-ios code_container"> | ||
<!-- ios示例代码位置 --> | <!-- ios示例代码位置 --> | ||
− | <pre class="prettyprint prettyprinted pre-ios"> | + | <pre class="prettyprint prettyprinted pre-ios">2 |
− | 2 | + | |
/** 更新标注展示. */ | /** 更新标注展示. */ | ||
- (void)updateClusters { | - (void)updateClusters { | ||
第408行: | 第235行: | ||
<div>Objective-C</div> | <div>Objective-C</div> | ||
</div> | </div> | ||
− | |||
<div class="pre-wrap-w pre-wrap-w-ios code_container"> | <div class="pre-wrap-w pre-wrap-w-ios code_container"> | ||
<!-- ios示例代码位置 --> | <!-- ios示例代码位置 --> | ||
− | <pre class="prettyprint prettyprinted pre-ios"> | + | <pre class="prettyprint prettyprinted pre-ios">3 |
− | 3 | + | |
/** 更新标注展示. */ | /** 更新标注展示. */ | ||
- (void)updateClusters { | - (void)updateClusters { |
2020年6月1日 (一) 17:49的版本
签到场景
功能场景
本示例展示了如何在附近位置场所进行签到
Android
//mapopen-website-wiki.bj.bcebos.com/demos/AndroidVideos/签到.mp4
1590746640|//mapopen-website-wiki.bj.bcebos.com/demos/qrcodes/签到.png
扫码体验
使用产品
产品1|/index.php?title=test
>
产品2|/index.php?title=test
下载源码
//mapopen-pub-androidsdk.cdn.bcebos.com/map/sample/BaiduLBS_AndroidSDK_Sample.zip
核心接口
类
接口
描述
备注
ReverseGeoCodeOption
newVersion(int latestAdmin)
设置是否返回新数据1返回0不返回
地图SDK
ReverseGeoCodeOption
radius(500)
POI召回半径,允许设置区间为0-1000米,超过1000米按1000米召回。默认值为1000
地图SDK
SpatialRelationUtil
isCircleContainsPoint(LatLng center, int radius, LatLng point)
判断圆形是否包含传入的经纬度点
地图SDK
LocationClient
start()
启动定位sdk
定位SDK
LocationClient
setLocOption(LocationClientOption locOption)
给定位客户端设置参数
定位SDK
BDAbstractLocationListener
BDAbstractLocationListener
监听定位结果回调函数
定位SDK
重点关注
签到场景的核心难点在于解决定位不准的情况下纠正用户位置,示例中提供用户手动纠正位置功能来解决这一问题。
当正常通过定位确定用户位置之后,会给出周边POI列表供用户选择准确位置;
当定位发生微小漂移时,用户通过手动移动地图做位置调整,当前微调范围被限定在500米以内(可自定义),超过500米时弹出toast告知用户“微调距离不可超过500米”。