Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
@@ -24,18 +24,18 @@ import proj4 from 'proj4';
|
||||
// projection's validity extent can be found at https://epsg.io/.
|
||||
|
||||
proj4.defs('EPSG:21781',
|
||||
'+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 ' +
|
||||
'+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 ' +
|
||||
'+x_0=600000 +y_0=200000 +ellps=bessel ' +
|
||||
'+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs');
|
||||
register(proj4);
|
||||
|
||||
var projection = new Projection({
|
||||
const projection = new Projection({
|
||||
code: 'EPSG:21781',
|
||||
extent: [485869.5728, 76443.1884, 837076.5648, 299941.7864]
|
||||
});
|
||||
|
||||
var extent = [420000, 30000, 900000, 350000];
|
||||
var layers = [
|
||||
const extent = [420000, 30000, 900000, 350000];
|
||||
const layers = [
|
||||
new ImageLayer({
|
||||
extent: extent,
|
||||
source: new ImageWMS({
|
||||
@@ -63,7 +63,7 @@ var layers = [
|
||||
})
|
||||
];
|
||||
|
||||
var map = new Map({
|
||||
const map = new Map({
|
||||
controls: defaultControls().extend([
|
||||
new ScaleLine()
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user