Skip to content

Commit

Permalink
limit openaip to a maximum zoom lvl of 15, other maps to around 18
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Aug 9, 2020
1 parent 2e9ae20 commit e4a4ba1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion html/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function createBaseLayers() {
name: 'osm',
title: 'OpenStreetMap',
type: 'base',
maxZoom: 19,
}));

world.push(new ol.layer.Tile({
Expand All @@ -59,6 +60,7 @@ function createBaseLayers() {
name: 'esri',
title: 'ESRI Sat.',
type: 'base',
maxZoom: 19,
}));

/*
Expand Down Expand Up @@ -94,6 +96,7 @@ function createBaseLayers() {
name: 'gibs',
title: 'GIBS',
type: 'base',
maxZoom: 19,
}));
// carto.com basemaps, see the following URLs for details on them:
// http:https://basemaps.cartocdn.com
Expand All @@ -115,6 +118,7 @@ function createBaseLayers() {
name: "carto_" + basemap_id,
title: 'carto.com ' +basemap_id,
type: 'base',
maxZoom: 19,
}));
}

Expand Down Expand Up @@ -160,7 +164,9 @@ function createBaseLayers() {
name: 'chartbundle_' + type,
title: chartbundleTypes[type],
type: 'base',
group: 'chartbundle'}));
maxZoom: 18,
group: 'chartbundle',
}));
}
chartbundleTypes = {
tac: "Terminal Area Charts",
Expand All @@ -181,6 +187,7 @@ function createBaseLayers() {
name: 'chartbundle_' + type,
title: chartbundleTypes[type],
type: 'base',
maxZoom: 18,
group: 'chartbundle'}));
}
}
Expand All @@ -194,6 +201,7 @@ function createBaseLayers() {
name: 'osm_adsbx',
title: 'OSM by ADSBx',
type: 'base',
maxZoom: 19,
}));

world.push(new ol.layer.Tile({
Expand All @@ -207,6 +215,7 @@ function createBaseLayers() {
opacity: 0.7,
visible: false,
zIndex: 99,
maxZoom: 15,
}));

let nexrad = new ol.layer.Tile({
Expand All @@ -216,6 +225,7 @@ function createBaseLayers() {
opacity: 0.3,
visible: false,
zIndex: 99,
maxZoom: 16,
});

let refreshNexrad = function() {
Expand Down Expand Up @@ -245,6 +255,7 @@ function createBaseLayers() {
opacity: 0.3,
visible: false,
zIndex: 99,
maxZoom: 16,
});


Expand Down

0 comments on commit e4a4ba1

Please sign in to comment.