FIX - вернул подгрузку точек при постройке маршрута
This commit is contained in:
parent
575cdcbd48
commit
205fb64180
|
|
@ -147,16 +147,14 @@ window.addEventListener('popstate', function(e)
|
|||
if (e.state.hasOwnProperty('pointId'))
|
||||
{
|
||||
showInfo(e.state.pointId, false, true);
|
||||
} else
|
||||
if (e.state.hasOwnProperty('zoom'))
|
||||
} else if (e.state.hasOwnProperty('zoom'))
|
||||
{
|
||||
lat = e.state.lat;
|
||||
lng = e.state.lng;
|
||||
zoom = e.state.zoom;
|
||||
|
||||
myMap.setView([lat, lng], zoom);
|
||||
} else
|
||||
if (e.state.hasOwnProperty('route'))
|
||||
} else if (e.state.hasOwnProperty('route'))
|
||||
{
|
||||
loadRouteJSON(e.state.route);
|
||||
}
|
||||
|
|
@ -251,9 +249,7 @@ function activateAddPoint()
|
|||
$('#map').css('cursor', 'crosshair');
|
||||
$('div#addHelper').slideDown(200);
|
||||
setStatus(statusHunting)
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$('div#addHelper').hide(150);
|
||||
$('#map').css('cursor', 'arrow');
|
||||
setStatus(statusReady)
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ function init(lat, lng) {
|
|||
|
||||
myMap.on('click', function (e) {
|
||||
if (!myMap._popup) {
|
||||
if (status == statusHunting)
|
||||
{
|
||||
if (status == statusHunting) {
|
||||
$('div#addHelper').hide(150);
|
||||
$('#addPointId').remove();
|
||||
$('#addPointForm input:text').val('');
|
||||
|
|
@ -99,8 +98,7 @@ function init(lat, lng) {
|
|||
|
||||
$('#myModalLabel').text('Добавление новой точки');
|
||||
$('#addPointModal').modal('show');
|
||||
} else if (status == statusReHunting)
|
||||
{
|
||||
} else if (status == statusReHunting) {
|
||||
resetStatus();
|
||||
|
||||
$('#addPointLat').val(e.latlng.lat);
|
||||
|
|
@ -109,8 +107,7 @@ function init(lat, lng) {
|
|||
$('#myModalLabel').text('Редактирование точки');
|
||||
$('#addPointModal').modal('show');
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
closePopup();
|
||||
}
|
||||
});
|
||||
|
|
@ -121,15 +118,13 @@ function init(lat, lng) {
|
|||
$("#extraParamsContainer").sortable();
|
||||
|
||||
myMap.on('moveend', function (e) {
|
||||
if (!myMap._popup && $('#boxRoute').css('display') == 'none' && status != statusMovingInHistory)
|
||||
{
|
||||
if (!myMap._popup && status != statusMovingInHistory) {
|
||||
document.title = 'Лучшие выходные — это выходные в путешествии! – wikipoints.ru';
|
||||
history.pushState({lat: myMap.getCenter().lat, lng: myMap.getCenter().lng, zoom: myMap.getZoom()}, document.title, "/?lat=" + myMap.getCenter().lat + "&lng=" + myMap.getCenter().lng + "&zoom=" + myMap.getZoom());
|
||||
loadPointsInBounds();
|
||||
}
|
||||
|
||||
if (status == statusMovingInHistory)
|
||||
{
|
||||
if (status == statusMovingInHistory) {
|
||||
resetStatus();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mainTextBlock">
|
||||
|
|
|
|||
Loading…
Reference in New Issue