導航:首頁 > 操作系統 > android百度地圖選點

android百度地圖選點

發布時間:2022-07-02 09:19:54

android百度地圖怎麼查看指定地點的經緯度

  1. 先打開網路地圖首頁,本人身處在廣州,就以熟悉的廣州為例,查找廣州火車站的經緯度!

  2. 輸入廣州火車站,搜索一下廣州火車站的位置,這里就標記出廣州火車站以及進出口這類的,大致了解所要查詢地方的地理位置!

  3. 在地圖的左下角位置,找到地圖開放平台,並點擊進入!

  4. 進到地圖的開放平台後,將網頁向下拉,在插件與工具中, 可以看到「坐標拾取工具",點擊選用這個工具!

  5. 這時進入到網路地圖的拾取坐標系統的頁面,該頁面有詳細的功能說明與使用說明!

  6. 再次搜索我們需要查詢的地方名,定位後同樣會顯示我們需要查詢的地方!

  7. 將滑鼠移動到該地理位置上,就會顯示該地方的地址與坐標了!

  8. 同樣的,網路地圖也提供了經緯坐標的反查功能,即通過輸入坐標,就能查詢該地理位置,這時就需要勾選坐標反查!且輸入的經緯坐標用英文狀態下」,「隔開!

⑵ 請問怎麼在百度地圖安卓APP上設置多個途徑點,然後給出路線另外如何用這個軟體根據經緯度查找地點

目前版本的網路地圖安卓版不支持手動設置途徑點。必須設置途徑點時,可以在PC版上設置,同步到手機版上使用。
目前版本的網路地圖也不支持經緯度查找地點。

⑶ 新人求助,Android百度地圖開發,怎麼設置新的中心點

最新版本設置方法:
MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(point);
mBaiMap.animateMapStatus(u);
point為LatLng類型

⑷ Android 如何實現單擊百度地圖獲取單擊點經緯度

轉載自http://www.open-open.com/lib/view/open1346982366162.html 程序有點過時但是 改改還能用
使用Android自帶的LocationManager和Location獲取位置的時候,經常會有獲取的location為null的情況,並且操作起來也不是很方便,在這個Demo里我使用了網路地圖API中的定位SDK,可以一次性獲取當前位置經緯度以及詳細地址信息,還可以獲取周邊POI信息,同時可以設定位置通知點,當到達某一位置時,發出通知信息等方式來告知用戶。jar包下載以及官方文檔請參照:網路定位SDK,前提是需要注冊網路開發者賬號。
下面來看看定位的基本原理,目前,定位SDK可以通過GPS、基站、Wifi信號進行定位。基本定位流程如下圖所示,當應用程序向定位SDK發起定位請求時,定位SDK會根據當前的GPS、基站、Wifi信息生成相對應的定位依據。然後定位SDK會根據定位依據來進行定位。如果需要,定位SDK會向定位伺服器發送網路請求。定位伺服器會根據請求的定位依據推算出對應的坐標位置,然後根據用戶的定製信息,生成定位結果返回給定位SDK。

到官方下載jar文件後添加到工程,工程目錄截圖如下:

注意要把locSDK_2.4.jar添加到當天工程,右鍵jar文件-Build path-Add to。。。

上代碼
布局文件:

01 <?xml version="1.0" encoding="utf-8"?>
02 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
03 android:layout_width="fill_parent"
04 android:layout_height="fill_parent"
05 android:orientation="vertical" >
06
07 <Button
08 android:id="@+id/btn_start"
09 android:layout_width="fill_parent"
10 android:layout_height="wrap_content"
11 android:layout_marginTop="20dp"
12 android:text="Start"/>
13
14 <TextView
15 android:id="@+id/tv_loc_info"
16 android:layout_width="fill_parent"
17 android:layout_height="wrap_content"
18 android:textSize="18sp" />
19
20 </LinearLayout>

配置文件:

01 <?xml version="1.0" encoding="utf-8"?>
02 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
03 package="com.ericssonlabs"
04 android:versionCode="1"
05 android:versionName="1.0" >
06
07 <uses-sdk android:minSdkVersion="8" />
08
09 <permission android:name="android.permission.BAIDU_LOCATION_SERVICE" >
10 </permission>
11
12 <uses-permission android:name="android.permission.BAIDU_LOCATION_SERVICE" >
13 </uses-permission>
14 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
15 </uses-permission>
16 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
17 </uses-permission>
18 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
19 </uses-permission>
20 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
21 </uses-permission>
22 <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" >
23 </uses-permission>
24 <uses-permission android:name="android.permission.READ_PHONE_STATE" >
25 </uses-permission>
26 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
27 </uses-permission>
28 <uses-permission android:name="android.permission.INTERNET" />
29 <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" >
30 </uses-permission>
31 <uses-permission android:name="android.permission.READ_LOGS" >
32 </uses-permission>
33
34 <application
35 android:icon="@drawable/ic_launcher"
36 android:label="@string/app_name" >
37 <activity
38 android:name=".LocationDemoActivity"
39 android:label="@string/app_name" >
40 <intent-filter>
41 <action android:name="android.intent.action.MAIN" />
42
43 <category android:name="android.intent.category.LAUNCHER" />
44 </intent-filter>
45 </activity>
46
47 <service
48 android:name="com..location.f"
49 android:enabled="true"
50 android:permission="android.permission.BAIDU_LOCATION_SERVICE"
51 android:process=":remote" >
52 <intent-filter>
53 <action android:name="com..location.service_v2.4" />
54 </intent-filter>
55 </service>
56 </application>
57
58 </manifest>

實現代碼:

001 public class LocationDemoActivity extends Activity {
002 private TextView locationInfoTextView = null;
003 private Button startButton = null;
004 private LocationClient locationClient = null;
005 private static final int UPDATE_TIME = 5000;
006 private static int LOCATION_COUTNS = 0;
007
008 @Override
009 public void onCreate(Bundle savedInstanceState) {
010 super.onCreate(savedInstanceState);
011 setContentView(R.layout.main);
012
013 locationInfoTextView = (TextView) this.findViewById(R.id.tv_loc_info);
014 startButton = (Button) this.findViewById(R.id.btn_start);
015
016
017 locationClient = new LocationClient(this);
018 //設置定位條件
019 LocationClientOption option = new LocationClientOption();
020 option.setOpenGps(true); //是否打開GPS
021 option.setCoorType("bd09ll"); //設置返回值的坐標類型。
022 option.setPriority(LocationClientOption.NetWorkFirst); //設置定位優先順序
023 option.setProdName("LocationDemo"); //設置產品線名稱。強烈建議您使用自定義的產品線名稱,方便我們以後為您提供更高效准確的定位服務。
024 option.setScanSpan(UPDATE_TIME); //設置定時定位的時間間隔。單位毫秒
025 locationClient.setLocOption(option);
026
027 //注冊位置監聽器
028 locationClient.registerLocationListener(new BDLocationListener() {
029
030 @Override
031 public void onReceiveLocation(BDLocation location) {
032 // TODO Auto-generated method stub
033 if (location == null) {
034 return;
035 }
036 StringBuffer sb = new StringBuffer(256);
037 sb.append("Time : ");
038 sb.append(location.getTime());
039 sb.append("\nError code : ");
040 sb.append(location.getLocType());
041 sb.append("\nLatitude : ");
042 sb.append(location.getLatitude());
043 sb.append("\nLontitude : ");
044 sb.append(location.getLongitude());
045 sb.append("\nRadius : ");
046 sb.append(location.getRadius());
047 if (location.getLocType() == BDLocation.TypeGpsLocation){
048 sb.append("\nSpeed : ");
049 sb.append(location.getSpeed());
050 sb.append("\nSatellite : ");
051 sb.append(location.getSatelliteNumber());
052 } else if (location.getLocType() == BDLocation.TypeNetWorkLocation){
053 sb.append("\nAddress : ");
054 sb.append(location.getAddrStr());
055 }
056 LOCATION_COUTNS ++;
057 sb.append("\n檢查位置更新次數:");
058 sb.append(String.valueOf(LOCATION_COUTNS));
059 locationInfoTextView.setText(sb.toString());
060 }
061
062 @Override
063 public void onReceivePoi(BDLocation location) {
064 }

⑸ android百度地圖怎麼設置目標

網路地圖菜單里邊有位置共享,點擊位置共享,按提示操作,
並給你要定位的朋友發一個邀請,
如果對方手機等有可以進行定位的客戶端。對方同意就能就能夠實現定位。
或者,騰訊地圖、谷歌地圖(或者其他定位)軟體有GPS定位系統的,
下載並在對方同意下,也可以准確定位對方的位置了。

⑹ android怎麼使用百度地圖定位

打開應用商店,搜索網路地圖,下載安裝

安裝完成,雙擊打開網路地圖

打開界面,會提示你,打開GPS開關,這樣就可以更好的定位

打開定位後,點我的-離線包下載-下載離線地圖-選擇城市列表-所在城市下載,離線地圖的用處就是可以不用開流量也可以定位

點圖標,會自動定位,你所在位置

⑺ 求助 在Android中如何使用百度地圖API檢索任意地點地圖

很簡單你只要重寫MKSearch中的這個方法 他會自動返回符合條件的結果

⑻ Android百度地圖如何獲得點擊一點的經緯度

java">packagecom.ericssonlabs;

importcom..location.BDLocation;
importcom..location.BDLocationListener;
importcom..location.LocationClient;
importcom..location.LocationClientOption;
importcom..mapapi.BMapManager;
importcom..mapapi.map.MapController;
importcom..mapapi.map.MapView;
importcom..mapapi.search.MKAddrInfo;
importcom..platform.comapi.basestruct.GeoPoint;
importcom..platform.comapi.map.base.p;
importcom.ericssonlabs.R;

importandroid.location.Location;
importandroid.os.Bundle;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.Button;
importandroid.widget.TextView;
importandroid.app.Activity;

{
=null;
privateButtonstartButton=null;
=null;
privatestaticfinalintUPDATE_TIME=5000;
privatestaticintLOCATION_COUTNS=0;

@Override
publicvoidonCreate(BundlesavedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

locationInfoTextView=(TextView)this.findViewById(R.id.tv_loc_info);
startButton=(Button)this.findViewById(R.id.btn_start);

locationClient=newLocationClient(this);
//設置定位條件
LocationClientOptionoption=newLocationClientOption();
option.setOpenGps(true);//是否打開GPS
option.setCoorType("bd09ll");//設置返回值的坐標類型。
option.setPriority(LocationClientOption.NetWorkFirst);//設置定位優先順序
option.setProdName("LocationDemo");//設置產品線名稱。強烈建議您使用自定義的產品線名稱,方便我們以後為您提供更高效准確的定位服務。
option.setScanSpan(UPDATE_TIME);//設置定時定位的時間間隔。單位毫秒
option.setAddrType("all");
locationClient.setLocOption(option);

//注冊位置監聽器
locationClient.registerLocationListener(newBDLocationListener(){

@Override
publicvoidonReceiveLocation(BDLocationlocation){
//TODOAuto-generatedmethodstub
if(location==null){
return;
}
AddressFromGPSaddressFromGPS=newAddressFromGPS();
addressFromGPS.setProvinceName("ProvinceName:"+location.getProvince());
addressFromGPS.setCityName("cityName:"+location.getCity());
addressFromGPS.setCantonName("cantonName:"+location.getDistrict());
StringBuffersb=newStringBuffer(256);
sb.append("Time:");
sb.append(location.getTime());
sb.append(" Errorcode:");
sb.append(location.getLocType());
sb.append(" Latitude:");
sb.append(location.getLatitude());
sb.append(" Lontitude:");
sb.append(location.getLongitude());
sb.append(" Radius:");
sb.append(location.getRadius());
sb.append(" Province:");
sb.append(location.getProvince());
sb.append(" City:");
sb.append(location.getCity());
sb.append(" Canton:");
sb.append(location.getDistrict());
if(location.hasPoi()){
sb.append(" Poi:");
sb.append(location.getPoi());
}
if(location.getLocType()==BDLocation.TypeGpsLocation){
sb.append(" Speed:");
sb.append(location.getSpeed());
sb.append(" Satellite:");
sb.append(location.getSatelliteNumber());
}elseif(location.getLocType()==BDLocation.TypeNetWorkLocation){
sb.append(" Address:");
sb.append(location.getAddrStr());
}
LOCATION_COUTNS++;
sb.append(" 檢查位置更新次數:");
sb.append(String.valueOf(LOCATION_COUTNS));
locationInfoTextView.setText(sb.toString());
}

@Override
publicvoidonReceivePoi(BDLocationlocation){
}

});

startButton.setOnClickListener(newOnClickListener(){

@Override
publicvoidonClick(Viewv){
if(locationClient==null){
return;
}
if(locationClient.isStarted()){
startButton.setText("Start");
locationClient.stop();
}else{
startButton.setText("Stop");
locationClient.start();
/*
*當所設的整數值大於等於1000(ms)時,定位SDK內部使用定時定位模式。調用requestLocation(
*)後,每隔設定的時間,定位SDK就會進行一次定位。
*如果定位SDK根據定位依據發現位置沒有發生變化,就不會發起網路請求,
*返回上一次定位的結果;如果發現位置改變,就進行網路請求進行定位,得到新的定位結果。
*定時定位時,調用一次requestLocation,會定時監聽到定位結果。
*/
locationClient.requestLocation();
}
}
});

}

@Override
protectedvoidonDestroy(){
super.onDestroy();
if(locationClient!=null&&locationClient.isStarted()){
locationClient.stop();
locationClient=null;
}
}}

AndroidManifest.xml這樣寫(加入那一段)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ericssonlabs"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8" />

<permission android:name="android.permission.BAIDU_LOCATION_SERVICE" >
</permission>

<uses-permission android:name="android.permission.BAIDU_LOCATION_SERVICE" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" >
</uses-permission>
<uses-permission android:name="android.permission.READ_LOGS" >
</uses-permission>

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".LocationDemoActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<service
android:name="com..location.f"
android:enabled="true"
android:permission="android.permission.BAIDU_LOCATION_SERVICE"
android:process=":remote">
<intent-filter>
<actionandroid:name="com..location.service_v2.4"/>
</intent-filter>
</service>

</application>

</manifest>

然後需要加入網路地圖的包

⑼ 安卓百度手機地圖怎樣設置駕駛偏好,最小時間」、「最短路程」、「不走高速

點「線路「(最下面一行中間圖標)——輸入終點位置(可以語音輸入、地圖選點、收藏選點)——選好後點「搜索」(右上角),稍等選好的地圖就呈現出來了,可以點擊上面的公交、步行圖標,改變出行方式。——列表(右上角)——不走高速(右下角)——最後點地圖(右上角),返回地圖界面。
網路地圖有語音導航功能,很贊(不過要打開gps,比較耗電)。選好線路後,右上方有「導航」,可以進入語音導航線路。good。
這才是正解。。。。。。。。。。。。網路地圖4。6版本。其實網路地圖非常好用。
這里特別提示一下。輸入終點位置時候,最好選擇 收藏選點,這就要求用戶,提前要在網路注冊一個賬號,用同一個賬號登錄手機和電腦,在電腦上的網路地圖上選好點,收藏一下。就可以同步到手機網路地圖(當然手機必須能上網)。 這樣的話,選擇終點就非常方便。

⑽ 百度地圖在Android開發中如何根據所給地址在地圖中確定位置

網路api給的有介面吧,你又不是深度開發,直接調用就行了,用不著自己在重寫,網路地圖提供的有文檔,自己認真看吧

閱讀全文

與android百度地圖選點相關的資料

熱點內容
長安銀行信用卡app怎麼取現 瀏覽:633
dos命令cmd命令的 瀏覽:224
阿里雲存檔視頻文件的伺服器 瀏覽:192
ftp修改文件許可權命令 瀏覽:489
周易八卦梅花演算法 瀏覽:674
java組織機構 瀏覽:949
h5大轉盤游戲源碼 瀏覽:590
學校伺服器地址查詢 瀏覽:109
pythontutorial下載 瀏覽:524
pythonswampy示例 瀏覽:95
有沒有什麼語音講書看書的app 瀏覽:995
文件夾怎麼做標題 瀏覽:33
騰訊雲伺服器如何防止被攻擊 瀏覽:881
六稜柱的體積演算法 瀏覽:935
淘寶什麼雲伺服器好用 瀏覽:340
pythonoa項目 瀏覽:307
android杜比音效 瀏覽:341
殺手47為什麼連接不了伺服器 瀏覽:108
靜態路徑命令 瀏覽:533
一直編譯不過怎麼辦 瀏覽:829