pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <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="ntorvbd" 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="ggybmsx" 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="3lhzkek" id='JA5YK'><tfoot id='JA5YK'></tfoot><dl id='JA5YK'><fieldset id='JA5YK'></fieldset></dl></div>
                            主站蜘蛛池模板: 学生作文网_中小学生作文大全与写作指导 | 科普仪器菏泽市教育教学仪器总厂 | 楼承板设备-楼承板成型机-免浇筑楼承板机器厂家-捡来 | 四川成都干燥设备_回转筒干燥机_脉冲除尘器_输送设备_热风炉_成都川工星科机电设备有限公司 | 上海冠顶工业设备有限公司-隧道炉,烘箱,UV固化机,涂装设备,高温炉,工业机器人生产厂家 | 伊卡洛斯软装首页-电动窗帘,别墅窗帘,定制窗帘,江浙沪1000+别墅窗帘案例 | 软膜天花_软膜灯箱_首选乐创品牌_一站式天花软膜材料供应商! | 聚合氯化铝价格_聚合氯化铝厂家_pac絮凝剂-唐达净水官网 | 并网柜,汇流箱,电控设备,中高低压开关柜,电气电力成套设备,PLC控制设备订制厂家,江苏昌伟业新能源科技有限公司 | 手板_手板模型制作_cnc手板加工厂-东莞天泓 | 沟盖板_复合沟盖板厂_电力盖板_树脂雨水篦子-淄博拜斯特 | 丙烷/液氧/液氮气化器,丙烷/液氧/液氮汽化器-无锡舍勒能源科技有限公司 | 活性氧化铝球|氧化铝干燥剂|分子筛干燥剂|氢氧化铝粉-淄博同心材料有限公司 | bng防爆挠性连接管-定做金属防爆挠性管-依客思防爆科技 | 低温柔性试验仪-土工布淤堵-沥青车辙试验仪-莱博特(天津)试验机有限公司 | 数显恒温培养摇床-卧式/台式恒温培养摇床|朗越仪器 | 家用净水器代理批发加盟_净水机招商代理_全屋净水器定制品牌_【劳伦斯官网】 | 西子馋火锅鸡加盟-太原市龙城酉鼎餐饮管理有限公司 | 硬度计_影像测量仪_维氏硬度计_佛山市精测计量仪器设备有限公司厂家 | 维泰克Veertek-锂电池微短路检测_锂电池腐蚀检测_锂电池漏液检测 | 上海电子秤厂家,电子秤厂家价格,上海吊秤厂家,吊秤供应价格-上海佳宜电子科技有限公司 | 有机肥设备生产制造厂家,BB掺混肥搅拌机、复合肥设备生产线,有机肥料全部加工设备多少钱,对辊挤压造粒机,有机肥造粒设备 -- 郑州程翔重工机械有限公司 | 应急灯_消防应急灯_应急照明灯_应急灯厂家-大成智慧官网 | 意大利Frascold/富士豪压缩机_富士豪半封闭压缩机_富士豪活塞压缩机_富士豪螺杆压缩机 | 钢结构厂房造价_钢结构厂房预算_轻钢结构厂房_山东三维钢结构公司 | 不锈钢螺丝 - 六角螺丝厂家 - 不锈钢紧固件 - 万千紧固件--紧固件一站式采购 | 「钾冰晶石」氟铝酸钾_冰晶石_氟铝酸钠「价格用途」-亚铝氟化物厂家 | 常州企业采购平台_常州MRO采购公司_常州米孚机电设备有限公司 | 脉冲布袋除尘器_除尘布袋-泊头市净化除尘设备生产厂家 | 浇钢砖,流钢砖_厂家价低-淄博恒森耐火材料有限公司 | 耳模扫描仪-定制耳机设计软件-DLP打印机-asiga打印机-fitshape「飞特西普」 | 直流电能表-充电桩电能表-导轨式电能表-智能电能表-浙江科为电气有限公司 | 挤奶设备过滤纸,牛奶过滤纸,挤奶机过滤袋-济南蓝贝尔工贸有限公司 | 共享雨伞_共享童车_共享轮椅_共享陪护床-共享产品的领先者_有伞科技 | 精密钢管,冷拔精密无缝钢管,精密钢管厂,精密钢管制造厂家,精密钢管生产厂家,山东精密钢管厂家 | 首页-浙江橙树网络技术有限公司 石磨面粉机|石磨面粉机械|石磨面粉机组|石磨面粉成套设备-河南成立粮油机械有限公司 | 杭州月嫂技术培训服务公司-催乳师培训中心报名费用-产后康复师培训机构-杭州优贝姆健康管理有限公司 | 平面钻,法兰钻,三维钻-山东兴田阳光智能装备股份有限公司 | 蜘蛛车-高空作业平台-升降机-高空作业车租赁-臂式伸缩臂叉装车-登高车出租厂家 - 普雷斯特机械设备(北京)有限公司 | 体检车_移动CT车_CT检查车_CT车_深圳市艾克瑞电气有限公司移动CT体检车厂家-深圳市艾克瑞电气有限公司 | 南京和瑞包装有限公司|