HOT FIX
This commit is contained in:
parent
6a8d0e9f7c
commit
872627fb97
|
|
@ -69,14 +69,18 @@ function init(lat, lng) {
|
||||||
|
|
||||||
L.control.scale({imperial: false}).addTo(myMap);
|
L.control.scale({imperial: false}).addTo(myMap);
|
||||||
|
|
||||||
layers['quest'] = L.tileLayer('https://otile1-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com" target="_blank">Mapbox</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 18});
|
// layers['quest'] = L.tileLayer('https://otile1-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com" target="_blank">Mapbox</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 18});
|
||||||
layers['osm'] = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 18});
|
layers['osm'] = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 18});
|
||||||
layers['topo'] = L.tileLayer('https://topo.wikipoints.ru/?z={z}&x={x}&y={y}&ver=0216', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>, Imagery © <a href="http://www.marshruty.ru/" target="_blank">Маршруты.ру</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 15});
|
layers['topo'] = L.tileLayer('https://topo.wikipoints.ru/?z={z}&x={x}&y={y}&ver=0216', {attribution: 'Map data © <a href="http://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>, Imagery © <a href="http://www.marshruty.ru/" target="_blank">Маршруты.ру</a> | Points data © <a href="http://wikipoints.ru" target="_blank">WIKIPOINTS.RU</a>', maxZoom: 15});
|
||||||
layers['google'] = new L.Google('HYBRID');
|
layers['google'] = new L.Google('HYBRID');
|
||||||
layers['yandexMap'] = new L.Yandex();
|
layers['yandexMap'] = new L.Yandex();
|
||||||
layers['yandex'] = new L.Yandex('hybrid');
|
layers['yandex'] = new L.Yandex('hybrid');
|
||||||
|
|
||||||
setLayer($.cookie('mapLayer') ? $.cookie('mapLayer') : 'quest');
|
if ($.cookie('mapLayer') && $.cookie('mapLayer') == 'quest') {
|
||||||
|
setLayer('osm');
|
||||||
|
}
|
||||||
|
|
||||||
|
setLayer($.cookie('mapLayer') ? $.cookie('mapLayer') : 'osm');
|
||||||
|
|
||||||
initCategories(); // getPoints внутри
|
initCategories(); // getPoints внутри
|
||||||
|
|
||||||
|
|
@ -186,6 +190,7 @@ function constructPoint(data)
|
||||||
} else {
|
} else {
|
||||||
history.pushState({pointId: id}, document.title, "/?point=" + e.target.options.id);
|
history.pushState({pointId: id}, document.title, "/?point=" + e.target.options.id);
|
||||||
document.title = e.target.options.title;
|
document.title = e.target.options.title;
|
||||||
|
yaCounter24682772.hit("/?point=" + e.target.options.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -371,6 +376,7 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
|
||||||
|
|
||||||
if (!doNotPushToHistory) {
|
if (!doNotPushToHistory) {
|
||||||
history.pushState({pointId: id}, document.title, "/?point=" + id);
|
history.pushState({pointId: id}, document.title, "/?point=" + id);
|
||||||
|
yaCounter24682772.hit("/?point=" + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = marker.options.title + ' – wikipoints.ru';
|
document.title = marker.options.title + ' – wikipoints.ru';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue