Use rentina r, wikimedia maps as default out of box, update lib momentjs & build tools
This commit is contained in:
parent
a0bbcdde48
commit
522908676c
3
app.js
3
app.js
|
@ -1,12 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
baseUrl: 'lib',
|
|
||||||
paths: {
|
paths: {
|
||||||
'polyglot': '../node_modules/node-polyglot/build/polyglot',
|
'polyglot': '../node_modules/node-polyglot/build/polyglot',
|
||||||
'Navigo': '../node_modules/navigo/lib/navigo',
|
'Navigo': '../node_modules/navigo/lib/navigo',
|
||||||
'leaflet': '../node_modules/leaflet/dist/leaflet',
|
'leaflet': '../node_modules/leaflet/dist/leaflet',
|
||||||
'moment': '../node_modules/moment/moment',
|
'moment': '../node_modules/moment/min/moment.min',
|
||||||
// d3 modules indirect dependencies
|
// d3 modules indirect dependencies
|
||||||
// by d3-zoom: d3-drag
|
// by d3-zoom: d3-drag
|
||||||
'd3-ease': '../node_modules/d3-ease/dist/d3-ease',
|
'd3-ease': '../node_modules/d3-ease/dist/d3-ease',
|
||||||
|
|
56
config.js
56
config.js
|
@ -49,65 +49,15 @@ module.exports = function () {
|
||||||
'siteName': 'Freifunk Regensburg',
|
'siteName': 'Freifunk Regensburg',
|
||||||
'mapLayers': [
|
'mapLayers': [
|
||||||
{
|
{
|
||||||
'name': 'Freifunk Regensburg',
|
'name': 'Wikimedia OSM Map',
|
||||||
// Please ask Freifunk Regensburg before using its tile server c- example with retina tiles
|
// Please ask Freifunk Regensburg before using its tile server c- example with retina tiles
|
||||||
'url': 'https://{s}.tiles.ffrgb.net/{z}/{x}/{y}{retina}.png',
|
'url': 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
|
||||||
'config': {
|
'config': {
|
||||||
'maxZoom': 20,
|
'maxZoom': 20,
|
||||||
'subdomains': '1234',
|
'subdomains': '1234',
|
||||||
'attribution': '<a href="http://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank">© OpenStreetMap contributors</a>',
|
'attribution': '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use" rel="noopener" target="_blank">Wikimedia maps</a><a href="http://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank" rel="noopener">© OpenStreetMap contributors</a>',
|
||||||
'start': 6
|
'start': 6
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'Freifunk Regensburg Night',
|
|
||||||
// Please ask Freifunk Regensburg before using its tile server - example with retina and dark tiles
|
|
||||||
'url': 'https://{s}.tiles.ffrgb.net/n/{z}/{x}/{y}{retina}.png',
|
|
||||||
'config': {
|
|
||||||
'maxZoom': 20,
|
|
||||||
'subdomains': '1234',
|
|
||||||
'attribution': ' <a href="http://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank">© OpenStreetMap contributors</a>',
|
|
||||||
'mode': 'night',
|
|
||||||
'start': 19,
|
|
||||||
'end': 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'OpenStreetMap.HOT',
|
|
||||||
'url': 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
||||||
'config': {
|
|
||||||
'maxZoom': 19,
|
|
||||||
'attribution': '© Openstreetmap France | © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'HERE',
|
|
||||||
// Please use your own API key - Free plan is on right side after the pay plans
|
|
||||||
'url': 'https://{s}.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?app_id=YOUR_KEY&app_code=YOUR_CODE&lg=deu',
|
|
||||||
'config': {
|
|
||||||
'attribution': 'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>',
|
|
||||||
'subdomains': '1234',
|
|
||||||
'maxZoom': 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'Esri.WorldImagery',
|
|
||||||
'url': '//server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
|
||||||
'config': {
|
|
||||||
'maxZoom': 20,
|
|
||||||
'attribution': 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'HERE.hybridDay',
|
|
||||||
// Please use your own API key - Free plan is on right side after the pay plans
|
|
||||||
'url': 'https://{s}.aerial.maps.api.here.com/maptile/2.1/maptile/newest/{variant}/{z}/{x}/{y}/256/png8?app_id=YOUR_KEY&app_code=YOUR_CODE&lg=deu',
|
|
||||||
'config': {
|
|
||||||
'attribution': 'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>',
|
|
||||||
'subdomains': '1234',
|
|
||||||
'variant': 'hybrid.day',
|
|
||||||
'maxZoom': 20
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// Set a visible frame
|
// Set a visible frame
|
||||||
|
|
|
@ -63,7 +63,7 @@ define(['map/clientlayer', 'map/labellayer', 'map/button', 'leaflet', 'map/activ
|
||||||
var layers = config.mapLayers.map(function (d) {
|
var layers = config.mapLayers.map(function (d) {
|
||||||
return {
|
return {
|
||||||
'name': d.name,
|
'name': d.name,
|
||||||
'layer': L.tileLayer(d.url.replace('{retina}', L.Browser.retina ? '@2x' : ''), d.config)
|
'layer': L.tileLayer(d.url, d.config)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
12
package.json
12
package.json
|
@ -13,14 +13,14 @@
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"browser-sync": "^2.26.5",
|
"browser-sync": "^2.26.5",
|
||||||
"del": "^5.1.0",
|
"del": "^5.1.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^7.1.0",
|
||||||
"eslint-config-airbnb-es5": "^1.2.0",
|
"eslint-config-airbnb-es5": "^1.2.0",
|
||||||
"eslint-config-defaults": "^9.0.0",
|
"eslint-config-defaults": "^9.0.0",
|
||||||
"eslint-plugin-react": "^7.17.0",
|
"eslint-plugin-react": "^7.20.0",
|
||||||
"gulp": "^4.0.1",
|
"gulp": "^4.0.1",
|
||||||
"gulp-autoprefixer": "^7.0.1",
|
"gulp-autoprefixer": "^7.0.1",
|
||||||
"gulp-cache-bust": "^1.4.0",
|
"gulp-cache-bust": "^1.4.0",
|
||||||
"gulp-cli": "^2.2.0",
|
"gulp-cli": "^2.2.1",
|
||||||
"gulp-environments": "^1.0.0",
|
"gulp-environments": "^1.0.0",
|
||||||
"gulp-eslint": "^6.0.0",
|
"gulp-eslint": "^6.0.0",
|
||||||
"gulp-htmlmin": "^5.0.1",
|
"gulp-htmlmin": "^5.0.1",
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
"gulp-load-plugins": "^2.0.1",
|
"gulp-load-plugins": "^2.0.1",
|
||||||
"gulp-real-favicon": "^0.3.2",
|
"gulp-real-favicon": "^0.3.2",
|
||||||
"gulp-requirejs-optimize": "^1.3.0",
|
"gulp-requirejs-optimize": "^1.3.0",
|
||||||
"gulp-sass": "^4.0.2",
|
"gulp-sass": "^4.1.0",
|
||||||
"gulp-sourcemaps": "^2.6.5",
|
"gulp-sourcemaps": "^2.6.5",
|
||||||
"gulp-stylelint": "^13.0.0",
|
"gulp-stylelint": "^13.0.0",
|
||||||
"gulp-uglify": "^3.0.2",
|
"gulp-uglify": "^3.0.2",
|
||||||
"stylelint": "^13.3.2",
|
"stylelint": "^13.5.0",
|
||||||
"stylelint-config-standard": "^20.0.0"
|
"stylelint-config-standard": "^20.0.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
"d3-selection": "^1.4.0",
|
"d3-selection": "^1.4.0",
|
||||||
"d3-zoom": "^1.8.3",
|
"d3-zoom": "^1.8.3",
|
||||||
"leaflet": "^1.5.1",
|
"leaflet": "^1.5.1",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.26.0",
|
||||||
"navigo": "^7.1.2",
|
"navigo": "^7.1.2",
|
||||||
"node-polyglot": "2.2.2",
|
"node-polyglot": "2.2.2",
|
||||||
"promise-polyfill": "^8.1.3",
|
"promise-polyfill": "^8.1.3",
|
||||||
|
|
Reference in New Issue