在手機(jī)App上怎樣顯示地圖?調(diào)用百度地圖sdk就可以
版API(Android)開(kāi)發(fā)包要在Android應(yīng)用中使用百度地圖API,就需要在工程中引用百度地圖API開(kāi)發(fā)包,這個(gè)開(kāi)發(fā)包包含兩個(gè)文件:map.jar和libBMapApiEngine.so。下載地址:鏈接)申請(qǐng)API Key和使用Google map 一樣,在使用百度地圖API之前也需要獲取相應(yīng)的API Key。百度地圖API Key與你的百度賬戶(hù)相關(guān)聯(lián),因此您必須先有百度帳戶(hù),才能獲得API Key;并且,該Key與您引用API的程序名稱(chēng)有關(guān)。百度API Key的申請(qǐng)要比Google的簡(jiǎn)單多了,其實(shí)只要你有百度帳號(hào),應(yīng)該不超過(guò)30秒就能完成API Key的申請(qǐng)。申請(qǐng)地址:鏈接)創(chuàng)建一個(gè)Android工程這里需要強(qiáng)調(diào)一點(diǎn):百度地圖移動(dòng)版支持Android
1.5及以上系統(tǒng),因此我們創(chuàng)建的工程應(yīng)基于Android SDK
1.5及以上。工程創(chuàng)建完成后,將map.jar和libBMapApiEngine.so分別拷貝到工程的根目錄及l(fā)ibs/armeabi目錄下,并在工程屬性->Java Build Path->Libraries中選擇“Add JARs”,選定map.jar,這樣就可以在應(yīng)用中使用百度地圖API了。4)在布局文件中添加地圖控件(res/layout/main.xml)[x] view plaincopy?xml version="
1.0" encoding="utf-8"?> LinearLayout xmlns:="鏈接" :orientation="vertical" :layout_width="fill_parent" :layout_height="fill_parent" > com..map.MapView :id="@+id/map_View" :layout_width="fill_parent" :layout_height="fill_parent" :clickable="true" /> /LinearLayout> 5)創(chuàng)建Activity繼承com..map.MapActivity[java] view plaincopypackage com.liufeng.map; import .graphics.drawable.Drawable; import .os.Bundle; import com..map.BMapManager; import com..map.GeoPoint; import com..map.MapActivity; import com..map.MapController; import com..map.MapView; public class MainActivity extends MapActivity { private BMapManager mapManager; private MapView mapView; private MapController mapController; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // 初始化MapActivity mapManager = new BMapManager(getApplication()); // init方法的第一個(gè)參數(shù)需填入申請(qǐng)的API Key mapManager.init("285B415EBAB2A92293E85502150ADA7F03C777C4", null); super.initMapActivity(mapManager); mapView = (MapView) findViewById(R.id.map_View); // 設(shè)置地圖模式為交通地圖 mapView.setTraffic(true); // 設(shè)置啟用內(nèi)置的縮放控件 mapView.setBuiltInZoomControls(true); // 用給定的經(jīng)緯度構(gòu)造一個(gè)GeoPoint(緯度,經(jīng)度) GeoPoint point = new GeoPoint((int) (4
7.118440 * 1E6), (int) (8
7.493147 * 1E6)); // 創(chuàng)建標(biāo)記maker Drawable marker = this.getResources().getDrawable(R.drawable.iconmarka); // 為maker定義位置和邊界 marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight()); // 取得地圖控制器對(duì)象,用于控制MapView mapController = mapView.getController(); // 設(shè)置地圖的中心 mapController.setCenter(point); // 設(shè)置地圖默認(rèn)的縮放級(jí)別 mapController.setZoom(12); } @Override protected boolean isRouteDisplayed() { return false; } @Override protected void onDestroy() { if (mapManager != null) { mapManager.destroy(); mapManager = null; } super.onDestroy(); } @Override protected void onPause() { if (mapManager != null) { mapManager.stop(); } super.onPause(); } @Override protected void onResume() { if (mapManager != null) { mapManager.start(); } super.onResume(); } } 6)在AndroidManifest.xml中配置[x] view plaincopy?xml version="
1.0" encoding="utf-8"?> manifest xmlns:="鏈接" package="com.liufeng.map" :versionCode="1" :versionName="
1.0"> application :icon="@drawable/icon" :label="@string/app_name"> activity :name=".MainActivity" :label="@string/app_name"> intent-filter> action :name=".intent.action.MAIN" /> category :name=".intent.category.LAUNCHER" /> /intent-filter> /activity> /application> uses-sdk :minSdkVersion="4" /> uses-permission :name=".permission.ACCESS_NETWORK_STATE" /> uses-permission :name=".permission.ACCESS_FINE_LOCATION" /> uses-permission :name=".permission.INTERNET" /> uses-permission :name=".permission.WRITE_EXTERNAL_STORAGE" /> uses-permission :name=".permission.ACCESS_WIFI_STATE" /> uses-permission :name=".permission.CHANGE_WIFI_STATE" /> uses-permission :name=".permission.READ_PHONE_STATE" /> /manifest> 說(shuō)明:上面的應(yīng)用只是簡(jiǎn)單的展示了百度地圖(交通地圖),并將一個(gè)指定的點(diǎn)(根據(jù)經(jīng)緯度確定)展示在手機(jī)屏幕的中心。當(dāng)然,實(shí)際項(xiàng)目中涉及的map應(yīng)用不會(huì)這么簡(jiǎn)單,百度地圖API提供了豐富的功能接口。

百度地圖推廣在網(wǎng)頁(yè)上標(biāo)注了app上也顯示嗎?百度全網(wǎng)同步顯示的,需要百度地圖推廣服務(wù)請(qǐng)聯(lián)系千思傳媒 qq1961587097

如何在網(wǎng)頁(yè)上(百度谷歌或其他地圖網(wǎng)站)將地圖按自己設(shè)定的固定比例尺顯示?你想多了... 你知道為什么全中國(guó) 能出版標(biāo)準(zhǔn)地圖的印刷廠(chǎng) 都沒(méi)有幾個(gè)么 并不是因?yàn)榇蠹也荒苡∷?而是因?yàn)樽霾坏綐?biāo)準(zhǔn) 而顯示器 是以顯示像素為單位展示圖像的 并不是標(biāo)準(zhǔn)的度量尺寸為基礎(chǔ) 所以你在顯示器看到的比例 并不是準(zhǔn)確的毫米厘米長(zhǎng)度 也只是為了一種縮放效果而已 想要標(biāo)準(zhǔn)的 最好是購(gòu)買(mǎi)廠(chǎng)家地圖

百度地圖APP如何登錄?你這個(gè)地圖是不是太老了?我這安卓和蘋(píng)果系統(tǒng)都不是這樣的界面。
正常搜索左邊有個(gè)頭像,可以點(diǎn)進(jìn)去,就可以進(jìn)入自己的登錄狀態(tài)可是你沒(méi)有很奇怪。
目前版本的百度地圖無(wú)所謂退出離線(xiàn)地圖,也不提供如何退出離線(xiàn)地圖的操作。
百度地圖的設(shè)計(jì)是只要有本地?cái)?shù)據(jù)(包括離線(xiàn)地圖和緩存數(shù)據(jù)),就優(yōu)先使用本地?cái)?shù)據(jù),以保證最快的顯示速度。
當(dāng)沒(méi)有本地?cái)?shù)據(jù),且手機(jī)處于聯(lián)網(wǎng)狀態(tài)時(shí),會(huì)自動(dòng)進(jìn)入聯(lián)網(wǎng)運(yùn)行,自動(dòng)從網(wǎng)上下載數(shù)據(jù),無(wú)需人工干預(yù)。

如何調(diào)起百度地圖app?打開(kāi)百度地圖輸入你要到達(dá)的終點(diǎn),模糊搜索即可強(qiáng)大的搜索引擎會(huì)展現(xiàn)你心里想的那個(gè)地址點(diǎn)擊選取,就能出現(xiàn)你要到達(dá)的景點(diǎn),公司,市場(chǎng),超市等等的路線(xiàn)圖導(dǎo)航功能
