Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
stw
leaflet-player-control
Commits
60b51f7b
Commit
60b51f7b
authored
Mar 18, 2016
by
Tomas Pettersson
🏸
Browse files
readme
parent
d56d70e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
60b51f7b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment