This commit is contained in:
Pringgosutono
2025-09-11 14:20:51 +07:00
parent f6d11ce5e9
commit d1f90af6f6
2 changed files with 22 additions and 16 deletions

View File

@ -12,6 +12,9 @@
/* .leaflet-overlay-pane svg { /* .leaflet-overlay-pane svg {
transform: none !important; transform: none !important;
} */ } */
.leaflet-routing-container {
display: none !important;
}
</style> </style>
@ -98,9 +101,6 @@
</div> </div>
</div> </div>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js" integrity="sha512-ozq8xQKq6urvuU6jNgkfqAmT7jKN2XumbrX1JiB3TnF7tI48DPI4Gy1GXKD/V3EExgAs1V+pRO7vwtS1LHg0Gw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
<!-- <script src="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.js"></script> -->
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$('.time').each(function () { $('.time').each(function () {
@ -131,14 +131,24 @@
.map((point) => [point.latitude, point.longitude]) .map((point) => [point.latitude, point.longitude])
// // 4) Add polyline // // 4) Add polyline
const polyline = L.polyline(points, { const polyline = L.polyline(points)
color: "blue", const lines = L.Routing.control({
weight: 5, waypoints: points,
opacity: 0.7, router: L.Routing.osrmv1({
smoothFactor: 0, serviceUrl: "https://brilianapps.britimorleste.tl:5001/route/v1",
noClip: true, }),
show: false,
itinerary: null, // 👈 completely removes the panel
addWaypoints: false, // ❌ prevent adding points by clicking
draggableWaypoints: false, // ❌ prevent dragging markers
routeWhileDragging: false, // optional: dont reroute while dragging
createMarker: () => null,
lineOptions:{
styles: [{ color: "#2980B9", weight: 4, opacity: 0.8 }],
},
}).addTo(map) }).addTo(map)
// start and finish point // start and finish point
const startIcon = L.icon({ const startIcon = L.icon({
iconUrl: "{{ asset('images/start.png') }}", iconUrl: "{{ asset('images/start.png') }}",

View File

@ -197,12 +197,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js" integrity="sha512-ozq8xQKq6urvuU6jNgkfqAmT7jKN2XumbrX1JiB3TnF7tI48DPI4Gy1GXKD/V3EExgAs1V+pRO7vwtS1LHg0Gw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> --> <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js" integrity="sha512-ozq8xQKq6urvuU6jNgkfqAmT7jKN2XumbrX1JiB3TnF7tI48DPI4Gy1GXKD/V3EExgAs1V+pRO7vwtS1LHg0Gw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
<!-- <script src="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.js"></script> --> <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<script <script src="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.js"></script>
src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>