久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='5kCm5'></bdo><ul id='5kCm5'></ul>
    <legend id='5kCm5'><style id='5kCm5'><dir id='5kCm5'><q id='5kCm5'></q></dir></style></legend>
    <tfoot id='5kCm5'></tfoot>
    <i id='5kCm5'><tr id='5kCm5'><dt id='5kCm5'><q id='5kCm5'><span id='5kCm5'><b id='5kCm5'><form id='5kCm5'><ins id='5kCm5'></ins><ul id='5kCm5'></ul><sub id='5kCm5'></sub></form><legend id='5kCm5'></legend><bdo id='5kCm5'><pre id='5kCm5'><center id='5kCm5'></center></pre></bdo></b><th id='5kCm5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5kCm5'><tfoot id='5kCm5'></tfoot><dl id='5kCm5'><fieldset id='5kCm5'></fieldset></dl></div>

    <small id='5kCm5'></small><noframes id='5kCm5'>

    1. 舍入經緯度以在 Google 地圖中顯示大致位置

      Rounding Lat and Long to Show Approximate Location in Google Maps(舍入經緯度以在 Google 地圖中顯示大致位置)
        <tfoot id='KuiO4'></tfoot>
          <tbody id='KuiO4'></tbody>
        <i id='KuiO4'><tr id='KuiO4'><dt id='KuiO4'><q id='KuiO4'><span id='KuiO4'><b id='KuiO4'><form id='KuiO4'><ins id='KuiO4'></ins><ul id='KuiO4'></ul><sub id='KuiO4'></sub></form><legend id='KuiO4'></legend><bdo id='KuiO4'><pre id='KuiO4'><center id='KuiO4'></center></pre></bdo></b><th id='KuiO4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KuiO4'><tfoot id='KuiO4'></tfoot><dl id='KuiO4'><fieldset id='KuiO4'></fieldset></dl></div>

          <legend id='KuiO4'><style id='KuiO4'><dir id='KuiO4'><q id='KuiO4'></q></dir></style></legend>
            <bdo id='KuiO4'></bdo><ul id='KuiO4'></ul>

              • <small id='KuiO4'></small><noframes id='KuiO4'>

                本文介紹了舍入經緯度以在 Google 地圖中顯示大致位置的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在我的 Rails 應用程序視圖中顯示 Google 地圖,并將使用標記/覆蓋.

                I'm displaying a Google map in my Rails app's view and will be using a marker/overlay.

                坐標數據將來自手機 (GPS) 并存儲在我的 Rails 應用程序的數據庫中.

                The coordinate data will be coming from a phone (GPS) and stored in my Rails app's db.

                問題是,我不希望在我的網頁源中顯示精確的緯度/經度……也就是說,我想標記一個大概的位置,而不泄露真正的緯度/經度.

                The problem is, I don't want the precise lat/long visible in the source of my web page ... i.e. I want to mark an approximate location without giving away the true lat/long.

                如何舍入/截斷緯度/經度值,使它們仍然準確(例如,在一英里內),但又不太準確?

                How can I round/truncate the lat/long values so they are still accurate (say, within a mile)–but not too accurate?

                (例如:你將如何舍入 35.2827524, -120.6596156 ?)

                (Example: how would you round 35.2827524, -120.6596156 ?)

                推薦答案

                最簡單的做法是將兩個坐標四舍五入到一定的小數位,或者在坐標上添加隨機抖動:

                The easiest thing to do would be either to round both coordinates to a certain number of decimal places, or add a random dither to the coordinates:

                lat = Math.floor(lat*1000+0.5)/1000; (round within 0.001)
                

                dither=0.001;
                lat = lat + (Math.random()-0.5)*dither;
                

                如果你真的想在一定的英里數內,你需要做更復雜的數學,可能使用極坐標.

                If you really want to be within a certain number of miles, you'd need to do more-complex math, probably using polar coordinates.

                這篇關于舍入經緯度以在 Google 地圖中顯示大致位置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)

                <legend id='WmuSI'><style id='WmuSI'><dir id='WmuSI'><q id='WmuSI'></q></dir></style></legend>
                    <tbody id='WmuSI'></tbody>
                      • <i id='WmuSI'><tr id='WmuSI'><dt id='WmuSI'><q id='WmuSI'><span id='WmuSI'><b id='WmuSI'><form id='WmuSI'><ins id='WmuSI'></ins><ul id='WmuSI'></ul><sub id='WmuSI'></sub></form><legend id='WmuSI'></legend><bdo id='WmuSI'><pre id='WmuSI'><center id='WmuSI'></center></pre></bdo></b><th id='WmuSI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WmuSI'><tfoot id='WmuSI'></tfoot><dl id='WmuSI'><fieldset id='WmuSI'></fieldset></dl></div>
                        • <bdo id='WmuSI'></bdo><ul id='WmuSI'></ul>
                          <tfoot id='WmuSI'></tfoot>
                        • <small id='WmuSI'></small><noframes id='WmuSI'>

                        • 主站蜘蛛池模板: 三级黄色网 | 鲁鲁鲁鲁鲁鲁鲁777777 | 18精品爽国产白嫩精品 | 亚洲黄色大片 | 少妇av| 日韩精品久久久 | 一区二区三区黄色 | 91看片看淫黄大片 | 人与拘一级a毛片 | 日韩精品在线播放 | 国产伦精品一区二区三区免费视频 | 久久精品国产视频 | 最新中文字幕在线 | 羞羞网站入口 | 日日夜夜狠狠干 | 天天做天天干 | 欧美日韩中文在线 | 国产又色又爽又黄又免费 | 国内av在线| 老司机深夜福利视频 | 国产激情一区二区三区 | 欧美做爰xxxⅹ性欧美大片 | www操| 一区二区三区视频在线播放 | 亚洲成人a v | 亚洲一二区 | 秋霞一区二区三区 | av大片在线观看 | 手机在线免费av | 国内精品国产成人国产三级 | 欧美精品一区在线 | heyzo在线观看 | 亚洲一区二区免费看 | 欧美在线观看一区二区 | a视频在线免费观看 | 五月av | 91久久久久久久 | 97久久久久 | 国产精品91在线 | 成年人小视频 | 精品久久久久久久久久久久久 |