Use rentina r, wikimedia maps as default out of box, update lib momentjs & build tools

This commit is contained in:
Xaver Maierhofer 2020-05-31 09:48:41 +02:00
parent a0bbcdde48
commit 522908676c
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
5 changed files with 626 additions and 460 deletions

3
app.js
View File

@ -1,12 +1,11 @@
'use strict';
require.config({
baseUrl: 'lib',
paths: {
'polyglot': '../node_modules/node-polyglot/build/polyglot',
'Navigo': '../node_modules/navigo/lib/navigo',
'leaflet': '../node_modules/leaflet/dist/leaflet',
'moment': '../node_modules/moment/moment',
'moment': '../node_modules/moment/min/moment.min',
// d3 modules indirect dependencies
// by d3-zoom: d3-drag
'd3-ease': '../node_modules/d3-ease/dist/d3-ease',

View File

@ -49,65 +49,15 @@ module.exports = function () {
'siteName': 'Freifunk Regensburg',
'mapLayers': [
{
'name': 'Freifunk Regensburg',
'name': 'Wikimedia OSM Map',
// 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': {
'maxZoom': 20,
'subdomains': '1234',
'attribution': '<a href="http://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank">&copy; 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">&copy; OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank" rel="noopener">&copy; OpenStreetMap contributors</a>',
'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">&copy; OpenMapTiles</a> <a href="http://www.openstreetmap.org/about/" target="_blank">&copy; 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': '&copy; Openstreetmap France | &copy; <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 &copy; 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 &copy; Esri &mdash; 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 &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',
'subdomains': '1234',
'variant': 'hybrid.day',
'maxZoom': 20
}
}
],
// Set a visible frame

View File

@ -63,7 +63,7 @@ define(['map/clientlayer', 'map/labellayer', 'map/button', 'leaflet', 'map/activ
var layers = config.mapLayers.map(function (d) {
return {
'name': d.name,
'layer': L.tileLayer(d.url.replace('{retina}', L.Browser.retina ? '@2x' : ''), d.config)
'layer': L.tileLayer(d.url, d.config)
};
});

View File

@ -13,14 +13,14 @@
"babel-eslint": "^10.0.1",
"browser-sync": "^2.26.5",
"del": "^5.1.0",
"eslint": "^6.8.0",
"eslint": "^7.1.0",
"eslint-config-airbnb-es5": "^1.2.0",
"eslint-config-defaults": "^9.0.0",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react": "^7.20.0",
"gulp": "^4.0.1",
"gulp-autoprefixer": "^7.0.1",
"gulp-cache-bust": "^1.4.0",
"gulp-cli": "^2.2.0",
"gulp-cli": "^2.2.1",
"gulp-environments": "^1.0.0",
"gulp-eslint": "^6.0.0",
"gulp-htmlmin": "^5.0.1",
@ -30,11 +30,11 @@
"gulp-load-plugins": "^2.0.1",
"gulp-real-favicon": "^0.3.2",
"gulp-requirejs-optimize": "^1.3.0",
"gulp-sass": "^4.0.2",
"gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-stylelint": "^13.0.0",
"gulp-uglify": "^3.0.2",
"stylelint": "^13.3.2",
"stylelint": "^13.5.0",
"stylelint-config-standard": "^20.0.0"
},
"eslintConfig": {
@ -52,7 +52,7 @@
"d3-selection": "^1.4.0",
"d3-zoom": "^1.8.3",
"leaflet": "^1.5.1",
"moment": "^2.24.0",
"moment": "^2.26.0",
"navigo": "^7.1.2",
"node-polyglot": "2.2.2",
"promise-polyfill": "^8.1.3",

1013
yarn.lock

File diff suppressed because it is too large Load Diff