ADD вывод описания фрагмента трека на карте
This commit is contained in:
parent
d599374442
commit
b7184ad02b
|
|
@ -637,6 +637,7 @@ class JsonController extends Controller
|
||||||
|
|
||||||
$resTracks[] = array(
|
$resTracks[] = array(
|
||||||
'name' => (string) $track->name,
|
'name' => (string) $track->name,
|
||||||
|
'description' => $track->description,
|
||||||
'length' => 0,
|
'length' => 0,
|
||||||
'latlngs' => $resLatlngs,
|
'latlngs' => $resLatlngs,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ function loadTrack(id)
|
||||||
colorIndex = (colorIndex == colors.length-1) ? 0 : colorIndex+1;
|
colorIndex = (colorIndex == colors.length-1) ? 0 : colorIndex+1;
|
||||||
|
|
||||||
tracks[i] = L.polyline(data.tracks[i].latlngs, {color: color, width: 4, opacity: 0.8});
|
tracks[i] = L.polyline(data.tracks[i].latlngs, {color: color, width: 4, opacity: 0.8});
|
||||||
tracks[i].bindPopup(data.tracks[i].name);
|
tracks[i].bindPopup('<b>' + data.tracks[i].name + '</b><br/>' + data.tracks[i].description);
|
||||||
trips[id].addLayer(tracks[i])
|
trips[id].addLayer(tracks[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue