diff --git a/public/js/module/map/map.js b/public/js/module/map/map.js index a85cdaf2..2c202ae2 100644 --- a/public/js/module/map/map.js +++ b/public/js/module/map/map.js @@ -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 ".", e.g. 'osm.mapnik'. + * format is ".", e.g. 'osm.openstreetmap'. */ { id: 'kosmosnimki', @@ -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', @@ -200,7 +198,7 @@ define([ attribution: 'OSM Deutsch | © участники сообщества OpenStreetMap', }, limitZoom: 18, - maxAfter: 'osm.mapnik', + maxAfter: 'osm.openstreetmap', }, { id: 'mapnik_fr', @@ -214,7 +212,7 @@ define([ attribution: 'OSM Française | © участники сообщества OpenStreetMap', }, limitZoom: 18, - maxAfter: 'osm.mapnik', + maxAfter: 'osm.openstreetmap', }, { id: 'opentopomap', @@ -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: '© участники сообщества OpenStreetMap | SRTM | Стиль карты: © OpenTopoMap (CC-BY-SA)', }, - 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 Stamen Design, CC BY 3.0 | © участники сообщества OpenStreetMap', - subdomains: 'abcd', maxZoom: 19, maxNativeZoom: 18, - ext: 'png', updateWhenIdle: false, }, }, @@ -361,7 +355,7 @@ define([ maxNativeZoom: 18, }, limitZoom: 18, - maxAfter: 'osm.mapnik', + maxAfter: 'osm.openstreetmap', }, { id: 'warfly', diff --git a/public/js/module/map/navSlider.js b/public/js/module/map/navSlider.js index b835550a..d682bbc3 100644 --- a/public/js/module/map/navSlider.js +++ b/public/js/module/map/navSlider.js @@ -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 }); diff --git a/views/module/map/navSlider.pug b/views/module/map/navSlider.pug index 186d4b99..f8c356a2 100644 --- a/views/module/map/navSlider.pug +++ b/views/module/map/navSlider.pug @@ -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) }}")