Commit 92849468 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸
Browse files

dependencies

parent a370c498
/node_modules/
**/node_modules/
/bower_components/
\ No newline at end of file
......@@ -15,7 +15,11 @@
},
"dependencies": {
"leaflet": "https://github.com/Leaflet/Leaflet.git#v1.0.0-beta.2",
"leaflet-tilelayer-wms-picasso": "https://git.smhi.se/stw/leaflet-tilelayer-wms-picasso.git",
"jquery": "latest",
"ion.rangeSlider": "latest",
"reqwest" : "https://github.com/ded/reqwest.git",
"leaflet-timedimension" : "https://github.com/socib/Leaflet.TimeDimension.git#v1.0.2",
"moment": "latest",
"uikit": "latest"
},
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="da" style="font-size: 100%">
<head>
<title>leaflet-player-control - Demo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv='x-dns-prefetch-control' content='on'>
<meta name='copyright' content='STW'>
<meta name='owner' content='STW'>
<link href="../bower_components/leaflet/dist/leaflet.css" rel="stylesheet">
<link href="../bower_components/ion.rangeSlider/css/ion.rangeSlider.css" rel="stylesheet">
<link href="../bower_components/ion.rangeSlider/css/ion.rangeSlider.skinNice.css" rel="stylesheet">
<link href="../bower_components/uikit/css/uikit.almost-flat.min.css" rel="stylesheet">
<link href="../src/leaflet-player-control.css" rel="stylesheet">
</head>
<body>
<div id="map" style="width: 800px; height: 600px"></div>
<script src="../bower_components/leaflet/dist/leaflet-src.js"></script>
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/moment/min/moment.min.js"></script>
<script src="../bower_components/ion.rangeSlider/js/ion.rangeSlider.min.js"></script>
<script src="../bower_components/iso8601-js-period/iso8601.min.js"></script>
<script src="../bower_components/leaflet-timedimension/dist/leaflet.timedimension.src.withlog.js"></script>
<script src="../bower_components/leaflet-tilelayer-wms-picasso/src/leaflet-tilelayer-wms-picasso.js"></script>
<script src="../src/leaflet-player-control.js"></script>
<script>
var map = L.map('map').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 metadata = {
proxy: 'proxy'
};
var wmsParams = {
layers: "hiromb-BS01:oceancurrent-arrows_n-europe_4326_",
transparent: true,
crs: L.CRS.EPSG900913
};
var options = {
attribution: 'Current forecasts from <a href="http://www.smhi.se" alt="Swedish Meteorological Hydrological Institute">SMHI</a>',
zIndex: 900
};
var layer = new L.TileLayer.WMS.Picasso(metadata, wmsParams, options);
layer.on('metadataload', function(){
map.addLayer(layer);
});
var language = 'en';
var langData = {
"tTitle" : "Player"
};
var playerControl = new L.Control.Player({
"lang" : language,
"langdata" : langData,
"position": 'bottomleft'
// ,"display" : 'horizontal'
});
map.addControl(playerControl);
</script>
</body>
</html>
{
"name": "noderest",
"description": "Demo REST API with Node",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "4.x",
"path": "latest",
"request" : "latest"
}
}
\ No newline at end of file
var express = require('express');
var path = require('path');
var request = require('request');
var app = express();
app.get('/demo/proxy', function (req, res) {
request(req.query.url, function (error, response, body) {
if (!error && response.statusCode == 200) {
res.send(body);
}
})
});
// app.use(express.static(__dirname + '/../bower_components'));
//console.log(__dirname + '/../bower_components');
app.use('/bower_components', express.static(path.join(__dirname, '../bower_components')));
app.use('/src', express.static(path.join(__dirname, '../src')));
app.use('/demo', express.static(__dirname));
app.listen(8080);
console.log('Server started on http://localhost:8080...');
\ No newline at end of file
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