From 10e5a941eff89bc22c0641ca0d727743d0f4c3b5 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Tue, 23 Feb 2016 22:33:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B8?= =?UTF-8?q?=D0=BB=20mapquest-=D0=BA=D0=B0=D1=80=D1=82=D1=8B=20-=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=85=D0=BE=D0=B6=D0=B5=20=D0=B7=D0=B0=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B8=20=D0=B8=D1=85?= =?UTF-8?q?=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/map.js | 9 +++++++-- public/js/mapPoint.js | 6 +++--- views/indexTemplate.php | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/public/js/map.js b/public/js/map.js index e17e5c7..79294cc 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -58,14 +58,19 @@ function init(lat, lng) { markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 30}); markersPlus = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 25}); - layers['quest'] = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox | Points data © WIKIPOINTS.RU', maxZoom: 18}); +// layers['quest'] = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox | Points data © WIKIPOINTS.RU', maxZoom: 18}); // layers['quest'] = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Points data © WIKIPOINTS.RU', maxZoom: 18}); layers['osm'] = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Points data © WIKIPOINTS.RU', maxZoom: 18}); layers['topo'] = L.tileLayer('http://topo.wikipoints.ru/?z={z}&x={x}&y={y}', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Маршруты.ру | Points data © WIKIPOINTS.RU', maxZoom: 15}); layers['google'] = new L.Google('HYBRID'); layers['yandexMap'] = new L.Yandex(); layers['yandex'] = new L.Yandex('hybrid'); - setLayer($.cookie('mapLayer') ? $.cookie('mapLayer') : 'quest'); + + if ($.cookie('mapLayer') == 'quest') { + $.cookie('mapLayer', 'osm'); + } + + setLayer($.cookie('mapLayer') ? $.cookie('mapLayer') : 'osm'); initCategories(); // getPoints внутри diff --git a/public/js/mapPoint.js b/public/js/mapPoint.js index 1872541..fb0fd82 100644 --- a/public/js/mapPoint.js +++ b/public/js/mapPoint.js @@ -45,10 +45,10 @@ function init(lat, lng) { myMap = L.map('map', {zoomControl: true}).setView([lat, lng], defaultZoom); markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 45}); - layers['quest'] = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox | Points data © WIKIPOINTS.RU', maxZoom: 18}); -// layers['quest'] = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Points data © WIKIPOINTS.RU', maxZoom: 18}); +// layers['quest'] = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox | Points data © WIKIPOINTS.RU', maxZoom: 18}); + layers['osm'] = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Points data © WIKIPOINTS.RU', maxZoom: 18}); - setLayer('quest'); + setLayer('osm'); initPoints() diff --git a/views/indexTemplate.php b/views/indexTemplate.php index 9a2fdec..2278028 100644 --- a/views/indexTemplate.php +++ b/views/indexTemplate.php @@ -62,11 +62,11 @@ if (App::$user) {

Карты

-
map Quest
+
Open Street Map
+
Генштаб от маршруты.ру
Google maps
Яндекс.Карты
-
Open Street Map
Яндекс.Карты (схема)