osm 搭建离线地图_使用离线OSM离线OpenLayers Web应用程序
我'm trying to create map based web app which user can set landmark on the provided map. Boundaries of map is limited to a small city, and the client computer is always offline, no internet access at all. After a whole day of googling I'已經發現OpenLayers和OpenStreetMap的組合是一個不錯的選擇 .
以下示例由 OpenLayers 網站提供:
.map {
height: 400px;
width: 100%;
}
OpenLayers 3 exampleMy Map
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.MapQuest({layer: 'sat'})
})
],
view: new ol.View({
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
zoom: 4
})
});
這很好,但需要連接互聯網的電腦 . 經過幾個小時的谷歌搜索,我發現另一個website提供 .osm 格式的離線 OpenStreetMap 數據 . 現在我不知道是否可以用這些 .osm 文件提供OpenLayers,就像本地 Map 服務器一樣?客戶端計算機正在運行 IIS 8
總結
以上是生活随笔為你收集整理的osm 搭建离线地图_使用离线OSM离线OpenLayers Web应用程序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机二级 java和web_2020年
- 下一篇: 移动端html搜索怎么写,移动端实现搜索