[問題] 資料庫經緯度資料標示在google map上

看板AndroidDev作者 (Nexus5566)時間10年前 (2015/06/07 16:54), 10年前編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/1
目前正在實作畢業專題 使用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

06/07 22:07, , 1F
可以使用 Spatialite 先把資料存成空間資料
06/07 22:07, 1F

06/07 22:08, , 2F
再用geometry的方式下SQL查詢,例如距離某點X公里的資料
06/07 22:08, 2F

06/07 22:08, , 3F
詳細可以參考 https://goo.gl/C0QwyF
06/07 22:08, 3F

06/07 23:50, , 4F
感謝tericky大,很有幫助^^
06/07 23:50, 4F
文章代碼(AID): #1LT0RNYU (AndroidDev)