基于openlayer的迁徙案例

基于openlayer的迁徙案例

展示路径图

源码地址

https://github.com/Liar0320/openlayer.track

演示地址

https://liar0320.github.io/openlayer.track/dist/index.html

依赖

  • openlayer OpenLayers is a high-performance, feature-packed library for creating interactive maps on the web. It can display map tiles, vector data and markers loaded from any source on any web page. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the BSD 2-Clause License.
  • arc Calculate great circles routes as lines in GeoJSON or WKT format.

使用

Clone the repo using Git:

git clone https://github.com/Liar0320/openlayer.track.git

Alternatively you can download this repository and then:

npm i 
npm run start 

配置项

  1. 路径座标文件 /asstes/route.topojson

    示例
    {
        "flights":[
            [
                [
                    "30.8312277712",
                    "120.9259679951"
                ],
                [
                    "43.7933993081",
                    "87.6270586992"
                ]
            ]
        ]
     }
    
  2. 从起始点到终点的时间间隔 /src/util.ol.js -> pointsPerMs

    /** 从起始点到终点的时间间隔 */
    const pointsPerMs = 2000;
    

TODO

待整理

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章