Commit 60b51f7b authored by Tomas Pettersson's avatar Tomas Pettersson 🏸
Browse files

readme

parent d56d70e9
......@@ -6,22 +6,65 @@
A L.TimeDimension.Player extension with uikit look and feel. Can be part of leaflet-container-control
## Installation
You will need node.js and bower
### bower
`bower install https://git.smhi.se/stw/leaflet-player-control.git --save`
## Demo
Start server in demo folder
> node server.js
Server started on http://localhost:8080...
Open browser on http://localhost:8080/demo
## Usage example
var language = 'en';
var langData = {
"tTitle" : "Player"
};
var player = new L.Control.Player({
"lang" : language,
"langdata" : langData,
"position": 'bottomleft',
"display" : 'horizontal'
});
map.addControl(player);
var timeDimension = player.getTimeDimension();
var wmsLayer1 = L.tileLayer.wms('http://wts.smhi.se/tile/', {
layers: "hiromb-BS01:oceancurrent-arrows_n-europe_4326_",
transparent: true,
crs: L.CRS.EPSG900913,
format: 'image/png',
zIndex: 900,
attribution: 'Current forecasts from <a href="http://www.smhi.se" alt="Swedish Meteorological Hydrological Institute">SMHI</a>'
});
var weatherLayer1 = L.timeDimension.layer.wms.picasso(wmsLayer1, {
proxy: 'proxy',
cache: 10,
timeDimension : timeDimension
});
weatherLayer1.on('metadataload', function(){
console.log('metadata loaded 1');
player.refresh();
});
map.addLayer(weatherLayer1);
## Usage
v;
m;
### options
### options
| Option | Default | Description |
| -------------|------------|-------------|
| `display` | vertical | horizontal or vertival layout |
### Methods
## Copyright and License
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment