Android 百度地图SDK 实现获取周边位置POI

绪论

好久没写博客了,最近比较忙,闲下来写写博客,把小编最近用过的东西跟大家分享一下,记得上次写过一篇百度地图实现定位功能的博客,今天给大家分享一下定位之后获取周边地理位置的实现。
如果你还不知道怎么定位,看一下这里:
Android 轻松实现百度地图定位
好了先看一下实现效果怎么样吧?
这里写图片描述

实现

1.布局文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/height_top_bar"
            android:background="@color/common_top_bar_dark"
            android:gravity="center_vertical">

        <Button
                android:id="@+id/btn_location_back"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:drawableLeft="@drawable/back"
                android:text="@string/top_back"
                style="@style/btn_title_bar"
                android:layout_alignParentLeft="true"
                android:onClick="back"
                />

        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="@string/location_message"
                style="@style/txt_titlebar_message"/>


        <Button
                android:id="@+id/btn_location_ok"
                android:layout_width="52dp"
                android:layout_height="match_parent"
                android:layout_alignParentRight&#
  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 19
    评论
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值