osrm
This commit is contained in:
@ -12,6 +12,9 @@
|
||||
/* .leaflet-overlay-pane svg {
|
||||
transform: none !important;
|
||||
} */
|
||||
.leaflet-routing-container {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -98,9 +101,6 @@
|
||||
</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>
|
||||
$(document).ready(function(){
|
||||
$('.time').each(function () {
|
||||
@ -131,14 +131,24 @@
|
||||
.map((point) => [point.latitude, point.longitude])
|
||||
|
||||
// // 4) Add polyline
|
||||
const polyline = L.polyline(points, {
|
||||
color: "blue",
|
||||
weight: 5,
|
||||
opacity: 0.7,
|
||||
smoothFactor: 0,
|
||||
noClip: true,
|
||||
const polyline = L.polyline(points)
|
||||
const lines = L.Routing.control({
|
||||
waypoints: points,
|
||||
router: L.Routing.osrmv1({
|
||||
serviceUrl: "https://brilianapps.britimorleste.tl:5001/route/v1",
|
||||
}),
|
||||
show: false,
|
||||
itinerary: null, // 👈 completely removes the panel
|
||||
addWaypoints: false, // ❌ prevent adding points by clicking
|
||||
draggableWaypoints: false, // ❌ prevent dragging markers
|
||||
routeWhileDragging: false, // optional: don’t reroute while dragging
|
||||
createMarker: () => null,
|
||||
lineOptions:{
|
||||
styles: [{ color: "#2980B9", weight: 4, opacity: 0.8 }],
|
||||
},
|
||||
}).addTo(map)
|
||||
|
||||
|
||||
|
||||
// start and finish point
|
||||
const startIcon = L.icon({
|
||||
iconUrl: "{{ asset('images/start.png') }}",
|
||||
|
||||
@ -197,12 +197,8 @@
|
||||
<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://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 src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||
<script src="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user