Skip to content

Commit

Permalink
Merge pull request #623 from kabalin/map-review
Browse files Browse the repository at this point in the history
Review map layers.
  • Loading branch information
kabalin authored Sep 9, 2023
2 parents 053b744 + 281ee9d commit 283d3d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
24 changes: 9 additions & 15 deletions public/js/module/map/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ define([
* will be possible to zoom map up to maxZoom value. When
* current zoom > limitZoom, map will switch to maxAfter
* layer, keeping current zoom value. maxAfter value
* format is "<sys id>.<type id>", e.g. 'osm.mapnik'.
* format is "<sys id>.<type id>", e.g. 'osm.openstreetmap'.
*/
{
id: 'kosmosnimki',
Expand All @@ -173,12 +173,10 @@ define([
maxZoom: 18,
maxNativeZoom: 17,
},
limitZoom: 17,
maxAfter: 'osm.mapnik',
},
{
id: 'mapnik_ru',
desc: 'Mapnik',
id: 'openstreetmap',
desc: 'OpenStreetMap',
selected: ko.observable(false),
options: {
urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
Expand All @@ -200,7 +198,7 @@ define([
attribution: 'OSM Deutsch | &copy; участники сообщества <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
},
limitZoom: 18,
maxAfter: 'osm.mapnik',
maxAfter: 'osm.openstreetmap',
},
{
id: 'mapnik_fr',
Expand All @@ -214,7 +212,7 @@ define([
attribution: 'OSM Française | &copy; участники сообщества <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
},
limitZoom: 18,
maxAfter: 'osm.mapnik',
maxAfter: 'osm.openstreetmap',
},
{
id: 'opentopomap',
Expand All @@ -223,24 +221,20 @@ define([
options: {
urlTemplate: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
updateWhenIdle: false,
maxZoom: 18,
maxNativeZoom: 17,
maxZoom: 15,
maxNativeZoom: 14,
attribution: '&copy; участники сообщества <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> | <a href="http://viewfinderpanoramas.org">SRTM</a> | Стиль карты: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)',
},
limitZoom: 17,
maxAfter: 'osm.mapnik',
},
{
id: 'stamen_bw',
desc: 'Стамен ч/б',
selected: ko.observable(false),
options: {
urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.{ext}',
urlTemplate: 'https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png',
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> | &copy; участники сообщества <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
subdomains: 'abcd',
maxZoom: 19,
maxNativeZoom: 18,

This comment has been minimized.

Copy link
@mkgrgis

mkgrgis Sep 26, 2023

Contributor

Level 19 is also available from native URL, see. https://tiles.stadiamaps.com/tiles/stamen_toner/19/306509/153148.png

This comment has been minimized.

Copy link
@mkgrgis

This comment has been minimized.

Copy link
@kabalin

kabalin Sep 26, 2023

Author Member

Thanks @mkgrgis, I will update limits, although they might stop working soon https://maps.stamen.com/stadia-partnership/

See PR #624

This comment has been minimized.

Copy link
@mkgrgis

mkgrgis Sep 27, 2023

Contributor

When should I expect to lose service and how will I know?

If you do nothing, you may see disruptions in early August, depending on which tile set you are using, however most will initially see an improvement in coverage, data quality and performance through August and early September as services will have shifted to Stadia Maps. After October 2023, the redirects could stop working and those still pointing to stamen.com or fastly.com URLs will see a blank map.

Let's observe.

ext: 'png',
updateWhenIdle: false,
},
},
Expand Down Expand Up @@ -361,7 +355,7 @@ define([
maxNativeZoom: 18,
},
limitZoom: 18,
maxAfter: 'osm.mapnik',
maxAfter: 'osm.openstreetmap',
},
{
id: 'warfly',
Expand Down
4 changes: 2 additions & 2 deletions public/js/module/map/navSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ define([
}

if (!center) {
latlng = [55.751667, 37.617778];
latlng = [P.settings.locDef.lat, P.settings.locDef.lng];
}

if (!z) {
z = 10;
z = P.settings.locDef.z;
}

this.map.setView(new L.LatLng(latlng[0], latlng[1]), z, { animate: true });
Expand Down
2 changes: 1 addition & 1 deletion views/module/map/navSlider.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
span.glyphicon.glyphicon-arrow-left
.mhome.fringe.butt(data-bind="click: toHome" aria-describedby="tohome")
span.glyphicon.glyphicon-home
.tltp.tltp-right.tltp-animate-opacity(style="white-space:nowrap" id="tohome" role="tooltip" data-bind="text: 'Установить карту в домашний регион ' + (auth.loggedIn() ? auth.iAm.regionHome.title_local() : 'Москва')")
.tltp.tltp-right.tltp-animate-opacity(style="white-space:nowrap" id="tohome" role="tooltip" data-bind="text: 'Установить карту в домашний регион ' + (auth.loggedIn() ? auth.iAm.regionHome.title_local() : '')")
.zoomin.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(1) }}")
span.glyphicon.glyphicon-plus
.zoomout.fringe.butt.inout(data-bind="event: {'click': function () { changeZoom(-1) }}")
Expand Down

0 comments on commit 283d3d3

Please sign in to comment.