TShopping

 找回密碼
 註冊
搜索
TShopping 精選文章 Android 手機開發 查看內容

[Android智慧型手機設計_隱含意圖Google Map]

2013-7-10 19:53| 發佈者: woff| 查看: 2575| 評論: 0|原作者: woff

摘要: Google map座標工具:http://app.essoduke.org/gmap/ 模擬器:target=Google Inc.:Google APIs:17 1.顯示地圖定位 使用Intent.ACTION_VIEW,關聯資料格式如下: geo:latitude,longitude geo:latitude,longitude?z=zo ...
 

Google map座標工具:

http://app.essoduke.org/gmap/


模擬器:target=Google Inc.:Google APIs:17



1.顯示地圖定位


使用Intent.ACTION_VIEW,關聯資料格式如下:


geo:latitude,longitude
geo:latitude,longitude?z=zoom
latitude為緯度值,longitude為經度值,?z=zoom為地圖縮放設定值(1~23),設定值1時為顯示地球縮圖
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:23.978996,120.696672?z=18"));
startActivity(intent);

2.地圖查詢
使用Intent.ACTION_VIEW,關聯資料格式如下:
geo:0,0?q=my+street+address
geo:0,0?q=business+near+city
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=新竹市元培街306號"));
startActivity(intent);

3.顯示街景圖
使用Intent.ACTION_VIEW,關聯資料格式如下:
google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
lat為緯度值,lng為經度值,yaw表示街景圖中心點視角(與正北方之逆時針角度值),pitch表示街景圖中心點仰角(-90表示朝正上方,90表示朝正下方),zoom為街景圖放大倍率值(1表示原尺寸),mapZoom表示當使用者由街景圖切換為地圖時,地圖的縮放設定值(1~23)
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.streetview:cbll=23.978996,120.696672&cbp=1,0,,0,1.0"));
startActivity(intent);

4.路徑規劃
使用Intent.ACTION_VIEW,關聯資料格式如下:
http://maps.google.com/maps?f=d&saddr=startLat%2CstartLng&daddr=endLat%2CendLng&hl=tw"
startLat為路徑起點緯度值,startLng為路徑起點經度值;endLat為路徑終點緯度值,endLng為路徑終點經度值
Intent intent=newIntent(Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?f=d&saddr=23.979116%2C120.696788&daddr=24.05832%2C120.679065&hl=tw"));
startActivity(intent);



1.jpg




II.zip

最新評論



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-7-27 07:43 , Processed in 0.041097 second(s), 21 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回頂部