Commit 1ea4c501 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

readme

parent e8c8fdda
......@@ -3,25 +3,53 @@
## Description
TimeDimension layer for displaying L.TileLayers with time dimension. Syncs with leaflet-player-control
L.TimeDimension layer for displaying L.TileLayers with time dimension. Syncs with leaflet-player-control
## Installation
You will need node.js and bower
### bower
`bower install https://git.smhi.se/stw/L.TimeDimension.layer.weather.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
## Usage example
v;
m;
var map = L.map('map', {
timeDimension: true,
timeDimensionControl: true
}).setView([ 58.5, 19.0 ], 5);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom : 18,
attribution : '&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors</a>'
}).addTo(map);
var wmsLayer = 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',
attribution: 'Current forecasts from <a href="http://www.smhi.se" alt="Swedish Meteorological Hydrological Institute">SMHI</a>'
});
var weatherLayer = L.timeDimension.layer.wms.picasso(wmsLayer, {
proxy: 'proxy',
cache: 10
});
map.addLayer(weatherLayer);
### options
### Methods
## Copyright and License
......
Markdown is supported
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