Migration data visualization on map
JavaScript CSS HTML
Latest commit 949fa61 Feb 7, 2017 @Sylvenas Sylvenas updata baseMapLayer
Permalink
Failed to load latest commit information.
dist delete console.log() Jan 17, 2017
lib 添加显示、隐藏、暂停、销毁等方法 Jan 15, 2017
src delete console.log() Jan 17, 2017
.gitignore Initial commit Jan 14, 2017
LICENSE Initial commit Jan 14, 2017
README.md update readme Jan 17, 2017
index.html updata baseMapLayer Feb 7, 2017

README.md

leaflet.migrationLayer

leafet.migrationLayer is used to show migration data such as population,flight,vehicle,traffic and so on.Data visualization on map.

supported browsers

Internet Explorer 10+
Google Chrome
Safari
Firefox

Demo online

A demo is available on the Github Pages webpage for leaflet.migrationLayer Check out demo!.

Usage

1.Include the JavaScript files located in \dist directory.

<script src="./dist/leaflet.migrationLayer.js"></script>

2.Create a new migrationLayer

var migrationLayer = new L.migrationLayer({
    map: map,
    data: data
})

3.update or set data to migrationLayer

migrationLayer.setData(newData);

4.hide migrationLayer

migrationLayer.hide();

5.show migrationLayer

migrationLayer.show();

6.pause migrationLayer animation

migrationLayer.pause();

7.play migrationLayer animation

migrationLayer.play();

8.destroy migrationLayer

migrationLayer.destroy();

API(options)

option Description Default Value Possible values Required
map the map obj null Map yes
data data for migrationLayer null Json yes
pulseRadius the pulse radius 25 any number>0 no
pulseBorderWidth pulse border width 3 any number>0 no
arcWidth arc width 1 any number>0 no
arcLabel show from and to label true Bool no
arcLabelFont label font and size '15px sans-serif' 'size font' no

Leaflet Version

Requires Leaflet 1.0.2 or newer

License

MIT.