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

    <bdo id='XG2Ng'></bdo><ul id='XG2Ng'></ul>

    1. <i id='XG2Ng'><tr id='XG2Ng'><dt id='XG2Ng'><q id='XG2Ng'><span id='XG2Ng'><b id='XG2Ng'><form id='XG2Ng'><ins id='XG2Ng'></ins><ul id='XG2Ng'></ul><sub id='XG2Ng'></sub></form><legend id='XG2Ng'></legend><bdo id='XG2Ng'><pre id='XG2Ng'><center id='XG2Ng'></center></pre></bdo></b><th id='XG2Ng'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XG2Ng'><tfoot id='XG2Ng'></tfoot><dl id='XG2Ng'><fieldset id='XG2Ng'></fieldset></dl></div>
      1. <small id='XG2Ng'></small><noframes id='XG2Ng'>

        <tfoot id='XG2Ng'></tfoot><legend id='XG2Ng'><style id='XG2Ng'><dir id='XG2Ng'><q id='XG2Ng'></q></dir></style></legend>

        顯示離線 OSM 映射文件.建議:一個帶有 Js.library 的

        Showing an offline OSM map file. Suggestion: an MB Tiles file with Js.library(顯示離線 OSM 映射文件.建議:一個帶有 Js.library 的 MB Tiles 文件)
        • <small id='pvR1A'></small><noframes id='pvR1A'>

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

              <bdo id='pvR1A'></bdo><ul id='pvR1A'></ul>

                1. 本文介紹了顯示離線 OSM 映射文件.建議:一個帶有 Js.library 的 MB Tiles 文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當無法在線訪問互聯網時,我希望(離線)HTML5 應用程序通過 OSM 文件顯示 OSM 地圖.

                  When online access to the internet is not possible, I would like the (offline) HTML5 app show an OSM map via an OSM file.

                  您能否舉例說明如何在離線 Html5 應用程序中顯示從離線 OSM 地圖文件(如 Mapsforge/Geofabrik 等)加載的 OSM 切片?

                  Can you give an example of how I can show in an offline Html5 app OSM tiles that are loaded from an offline OSM map file like Mapsforge / Geofabrik etc?

                  示例:我首先通過 openstreetmap.org 導出了一小部分地圖.如何在 Html5 離線 webapp 中顯示這個下載的 OSM 地圖.

                  Example: via the openstreetmap.org I first exported a small part of a map. How can I show this downloaded OSM map in the Html5 offline webapp.

                  推薦答案

                  我們如何使用 Leaflet 顯示地圖?默認情況下,Leaflet 適用于光柵圖像.通常,這些圖塊是通過 Internet 檢索的.

                  How can we show a map using Leaflet? By default Leaflet works with raster images. Normally these tiles are retrieved via the internet.

                  我們如何使用離線文件顯示地圖?例如.因為沒有互聯網連接是可能的?

                  How can we show a map using an offline file? E.g. because no internet connection is possible?

                  1. 層次結構中的局部圖塊.例如通過使用這樣的腳本.缺點是這不是一種緊湊的格式.它需要一些準備工作:

                  1. Local tiles in an hierarchy structure. For example by using such a script. The disadvantage is that this is not a compact format. It requires some preparational work:

                  L.tileLayer('/map-tiles/{z}/map_{x}_{y}.png', {attribution: '地圖數據 ©???',}).addTo(地圖);

                  L.tileLayer('/map-tiles/{z}/map_{x}_{y}.png', { attribution: 'Map data © ???', }).addTo(map);

                  帶有光柵圖塊的 MBTiles 文件.這樣的文件可以通過 Leaflet.TileLayer.MBTiles.js 插件顯示.下面顯示了一個示例腳本.

                  MBTiles file with raster tiles. Such a file can be shown via the Leaflet.TileLayer.MBTiles.js plugin. An example script is shown below.

                  VectorGrid 是閱讀的緊湊候選MBTiles 文件中的矢量數據.另請參閱此說明.

                  Mapbox GL JS 離線.在這種情況下,您將矢量文件放在本地.請參閱 演示.

                  Mapbox GL JS offline. In that case you put locally your vector files. See the demo.

                  mobac.sourceforge.net 正如@JaakL 所建議的那樣.

                  mobac.sourceforge.net as suggested below by @JaakL.

                  廣告選項 3:OpenMapTiles.com 生成非常緊湊的矢量格式 MBTiles 文件.因此,此解決方案對選項 3 很有用.

                  Ad option 3: OpenMapTiles.com generates very compact MBTiles file with the Vector format. So, this solution is useful for option 3.

                  廣告選項 2:當您有 MBTILES/Raster 文件時,以下代碼將正常工作.因此,它不適用于上述 MBTiles 矢量文件.

                  Ad option 2: When you have an MBTILES/Raster file, then the following code will work correctly. So, it is not working with the above MBTiles vector file.

                  • 獲取 TileLayer,包括演示:https://www.npmjs.com/package/Leaflet.TileLayer.MBTiles
                  • 獲取一個示例 MBTile 文件:例如https://openmaptiles.org/downloads/#city ...然后選擇阿姆斯特丹
                  • Get the TileLayer including demo: https://www.npmjs.com/package/Leaflet.TileLayer.MBTiles
                  • Get an example MBTile file: e.g. https://openmaptiles.org/downloads/#city ... and select Amsterdam

                  在使用 npm 大約 1 分鐘安裝包后,我運行了演示.演示位于node_modulesLeaflet.TileLayer.MBTilesdemo"文件夾下.工作正常.

                  After installing in about 1 minute with npm the package I ran the demo. The demo is under the 'node_modulesLeaflet.TileLayer.MBTilesdemo' folder. Works fine.

                  然后我嘗試展示阿姆斯特丹地圖.唉,我無法讓這個(作為新手)工作.我正在為 POC 調查此問題.

                  Then I tried to show the Amsterdam map. Alas, I couldn't get this (as a newbie) working. I am investigating this for a POC.

                  如何更新此來源以顯示阿姆斯特丹地圖?完成它將給予+50賞金.

                  How can I update this source to get the Amsterdam map shown? Getting it done will give the +50 bounty.

                  <!DOCTYPE html>
                  <html>
                  <head>
                  <link  rel="stylesheet" type="text/css" />
                  <script src="https://unpkg.com/leaflet@1.0.0/dist/leaflet-src.js"></script>
                  <script src="https://unpkg.com/sql.js@0.3.2/js/sql.js"></script>
                  <script src="../Leaflet.TileLayer.MBTiles.js"></script>
                    <meta charset="utf-8">
                    <title>Leaflet.TileLayer.MBTiles demo</title>
                    <style>
                      #map {
                        width:600px;
                        height:400px;
                      }
                    </style>
                  </head>
                  <body>
                    <div id='map'></div>
                    <script>
                      var map = new L.Map('map');
                      map.setView(new L.LatLng(52.361367, 4.923083), 18);
                      var mb = L.tileLayer.mbTiles('./amsterdam_netherlands.mbtiles', {
                          minZoom: 16,
                          maxZoom: 20
                      }).addTo(map);
                      mb.on('databaseloaded', function(ev) {
                          console.info('MBTiles DB loaded', ev);
                      });
                      mb.on('databaseerror', function(ev) {
                          console.info('MBTiles DB error', ev);
                      });
                    </script>
                  </body>
                  </html>
                  

                  這篇關于顯示離線 OSM 映射文件.建議:一個帶有 Js.library 的 MB Tiles 文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)

                    <legend id='JA5YK'><style id='JA5YK'><dir id='JA5YK'><q id='JA5YK'></q></dir></style></legend>
                    <tfoot id='JA5YK'></tfoot>

                        <tbody id='JA5YK'></tbody>
                        <bdo id='JA5YK'></bdo><ul id='JA5YK'></ul>

                        1. <small id='JA5YK'></small><noframes id='JA5YK'>

                            <i id='JA5YK'><tr id='JA5YK'><dt id='JA5YK'><q id='JA5YK'><span id='JA5YK'><b id='JA5YK'><form id='JA5YK'><ins id='JA5YK'></ins><ul id='JA5YK'></ul><sub id='JA5YK'></sub></form><legend id='JA5YK'></legend><bdo id='JA5YK'><pre id='JA5YK'><center id='JA5YK'></center></pre></bdo></b><th id='JA5YK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JA5YK'><tfoot id='JA5YK'></tfoot><dl id='JA5YK'><fieldset id='JA5YK'></fieldset></dl></div>
                            主站蜘蛛池模板: 国产美女自拍视频 | 欧美亚洲成人网 | 日本三级电影在线看 | 国产精品久久久久久久久久妞妞 | 日韩视频免费看 | 日韩免费高清视频 | 天天操天天插 | 在线看av网址 | 国产不卡一区 | 91精品久久久久久久久中文字幕 | 国产成人一区二区三区 | 一区二区久久 | 精品久久久久久亚洲精品 | 久久精品一级 | 亚洲欧美综合精品久久成人 | 国产成人精品午夜 | 国产成人免费视频 | 亚洲91精品 | 欧美日韩国产在线观看 | 国产成人一区在线 | 欧美日韩在线一区二区三区 | 一区二区三区精品视频 | 国产一级毛片视频 | 欧美啪啪 | 国产精品久久久久久一区二区三区 | 在线观看黄色大片 | 岛国av免费看 | 特一级毛片 | 亚洲一区av在线 | 日本中文字幕在线视频 | 成年人在线观看视频 | 欧美一区二区三区视频 | 伊人久久综合 | 在线成人www免费观看视频 | 国产精品明星裸体写真集 | 视频一区在线播放 | 国产精品国产精品国产专区不卡 | 亚洲精品一区国产精品 | 羞羞视频网站免费观看 | 91精品国产高清一区二区三区 | 一区二区三区高清不卡 |