看板 AndroidDev 關於我們 聯絡資訊
目前正在實作畢業專題 使用google map顯示自己目前所在位置後 從sqlite資料庫找出附近的點,並顯示 但是目前資料庫約有7000筆資料 個別計算似乎有點費時 已經有google過,但可能關鍵字錯誤,所以沒有找到相關方法 不知道各位有沒有什麼好方法... 另外想請問一下,我想實作大概下方的畫面(以下為網路上的圖) http://imgur.com/SBmJu82 大概就是想要下方選單列選擇地圖之後,地圖會顯示在中間 目前查了一下看起來map是用fragment 但目前map的xml檔案如下... <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/map" tools:context="com.tsai.shepherd.telepathy.MapsActivity" android:name="com.google.android.gms.maps.SupportMapFragment" /> 爬了一下網路,看到官方文件寫說You cannot inflate a layout into a fragment when that layout includes a <fragment>. 請問還有什麼其他方法嗎 抱歉,問題有點多,先謝謝各位 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.127.42.121 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1433667287.A.89E.html ※ 編輯: Nexus5566 (59.127.42.121), 06/07/2015 16:55:15
tericky: 可以使用 Spatialite 先把資料存成空間資料 06/07 22:07
tericky: 再用geometry的方式下SQL查詢,例如距離某點X公里的資料 06/07 22:08
tericky: 詳細可以參考 https://goo.gl/C0QwyF 06/07 22:08
Nexus5566: 感謝tericky大,很有幫助^^ 06/07 23:50