небольшие тесты по упрощению трека
This commit is contained in:
parent
b7184ad02b
commit
cc113d08b2
|
|
@ -719,15 +719,15 @@ class JsonController extends Controller
|
|||
|
||||
$distance1 = Geo::distance($prevPoint, array('lat' => $trackPoint->lat, 'lng' => $trackPoint->lng));
|
||||
|
||||
if ($distance1 < 30) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// if ($distance1 < 100) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// $distance2 = Geo::distance($nextPoint, array('lat' => $trackPoint->lat, 'lng' => $trackPoint->lng));
|
||||
// $distance3 = Geo::distance($prevPoint, $nextPoint);
|
||||
//
|
||||
//
|
||||
// if (($distance3 / ($distance1+$distance2)) > 0.982) {
|
||||
// if (($distance3 / ($distance1+$distance2)) > 0.999) {
|
||||
// continue;
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ function loadSimpleTrack(id)
|
|||
url: "/json/simpletrack/id/" + id,
|
||||
success: function (data) {
|
||||
trips[id] = L.featureGroup();
|
||||
console.log(data.totCnt);
|
||||
|
||||
if (typeof (data.tracks) != 'undefined') {
|
||||
for (var i = 0; i < data.tracks.length; i++) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (App::$user) {
|
|||
<div class="glyphicon _t" id="addPointButton" title="Добавить точку" onclick="<?= $addWithoutConfirm ? 'activateAddPoint()' : 'showPointagreement()'; ?>"><img src="/img/buttons/addPoint.png" style="margin-top: -10px; height: 30px;" /></div>
|
||||
<div class="glyphicon _c glyphicon-star boxButtonFavorites" onclick="openBox('Favorites')" title="Хочу посетить"></div>
|
||||
<div class="glyphicon _c glyphicon-cloud-download boxButtonRoutes" onclick="openBox('Routes')" title="Мои маршруты"></div>
|
||||
<div class="glyphicon _b glyphicon-road boxButtonTracks" onclick="openBox('Tracks')" title="Мои маршруты"></div>
|
||||
<div class="glyphicon _b glyphicon-road boxButtonTracks" onclick="openBox('Tracks')" title="Мои треки"></div>
|
||||
<?php else: ?>
|
||||
<div class="glyphicon" id="addPointButton" onclick="$('#loginModal').modal('show');" title="Добавить точку"><img src="/img/buttons/addPoint.png" style="margin-top: -10px; height: 30px;" /></div>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue