智慧物聯網(AIoT)
這是一個介紹智慧物聯網相關技術及產業訊息交流的園地
2013年5月3日 星期五
Android程式設計 - Google Maps API v2 地圖定位
使用My location
圖層是最簡便的定位方式,其概念像是在地圖上覆蓋透明圖層,
當我們啟用
my-location
圖層後,定位點內容自然會疊覆到地圖上。
程式中可使用
GoogleMap.setMyLocationEnabled()
方法來開啟或關閉
My location
圖層。例如:
GoogleMap
m_map
= ((SupportMapFragment)
getSupportFragmentManager().findFragmentById(R.id.
map
)).getMap();
m_map
.setMyLocationEnabled(
true
);
‹
›
首頁
查看網路版