127 lines
5.8 KiB
HTML
127 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title>FreeMoto Web</title>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<!-- Bootstrap CSS -->
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
|
||
<style>
|
||
html, body, #map {
|
||
height: 100%;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
#map {
|
||
min-height: 100vh;
|
||
min-width: 100vw;
|
||
z-index: 1;
|
||
}
|
||
.controls-container {
|
||
position: absolute;
|
||
top: 24px;
|
||
left: 24px;
|
||
z-index: 1001;
|
||
background: rgba(255,255,255,0.98);
|
||
border-radius: 18px;
|
||
box-shadow: 0 2px 16px rgba(0,0,0,0.18);
|
||
padding: 28px 32px 22px 32px;
|
||
min-width: 300px;
|
||
max-width: 370px;
|
||
}
|
||
.leaflet-control-attribution {
|
||
z-index: 1002;
|
||
}
|
||
.input-group-text {
|
||
background: #f8f9fa;
|
||
}
|
||
.section-title {
|
||
font-size: 1.1rem;
|
||
font-weight: 600;
|
||
margin-bottom: 0.5rem;
|
||
margin-top: 1rem;
|
||
color: #495057;
|
||
}
|
||
hr {
|
||
margin: 1.2rem 0;
|
||
}
|
||
#sourceSuggestions,
|
||
#destSuggestions {
|
||
position: absolute;
|
||
top: 100%;
|
||
left: 0;
|
||
z-index: 2000;
|
||
width: 100%;
|
||
max-height: 220px;
|
||
overflow-y: auto;
|
||
border-radius: 0 0 0.5rem 0.5rem;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="map"></div>
|
||
<div class="controls-container shadow-lg">
|
||
<h4 class="mb-3 text-primary">FreeMoto Route Planner</h4>
|
||
<div class="mb-3">
|
||
<div class="section-title">Route</div>
|
||
<div class="input-group mb-2 position-relative">
|
||
<span class="input-group-text" title="Start"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#0d6efd" class="bi bi-geo-alt" viewBox="0 0 16 16"><path d="M8 16s6-5.686 6-10A6 6 0 1 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"/></svg></span>
|
||
<input type="text" class="form-control" id="sourceInput" placeholder="Enter start address" autocomplete="off">
|
||
<button class="btn btn-outline-secondary" type="button" id="useCurrentSource" title="Use current location">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#198754" class="bi bi-crosshair" viewBox="0 0 16 16"><path d="M8 15V1a7 7 0 1 1 0 14zm0-1a6 6 0 1 0 0-12 6 6 0 0 0 0 12z"/><path d="M8 8.5a.5.5 0 0 1-.5-.5V2.707l-2.146 2.147a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 2.707V8a.5.5 0 0 1-.5.5z"/></svg>
|
||
</button>
|
||
<div id="sourceSuggestions" class="list-group position-absolute w-100" style="z-index: 2000;"></div>
|
||
</div>
|
||
<div class="input-group mb-2 position-relative">
|
||
<span class="input-group-text" title="Destination"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#dc3545" class="bi bi-flag" viewBox="0 0 16 16"><path d="M14.778 2.222a.5.5 0 0 1 0 .707l-2.5 2.5a.5.5 0 0 1-.707 0l-2.5-2.5a.5.5 0 0 1 .707-.707L12 3.793l2.071-2.071a.5.5 0 0 1 .707 0z"/><path d="M2.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5z"/></svg></span>
|
||
<input type="text" class="form-control" id="destInput" placeholder="Enter destination address" autocomplete="off">
|
||
<button class="btn btn-outline-secondary" type="button" id="useCurrentDest" title="Use current location">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#198754" class="bi bi-crosshair" viewBox="0 0 16 16"><path d="M8 15V1a7 7 0 1 1 0 14zm0-1a6 6 0 1 0 0-12 6 6 0 0 0 0 12z"/><path d="M8 8.5a.5.5 0 0 1-.5-.5V2.707l-2.146 2.147a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 2.707V8a.5.5 0 0 1-.5.5z"/></svg>
|
||
</button>
|
||
<div id="destSuggestions" class="list-group position-absolute w-100" style="z-index: 2000;"></div>
|
||
</div>
|
||
<div class="d-grid gap-2 mb-3">
|
||
<button type="button" id="plotRouteBtn" class="btn btn-success btn-sm">Plot Route</button>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="section-title">Route Options</div>
|
||
<form>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="avoidHighways">
|
||
<label class="form-check-label" for="avoidHighways">Avoid freeways</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="useShortest">
|
||
<label class="form-check-label" for="useShortest">Use shortest route</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="avoidTollRoads">
|
||
<label class="form-check-label" for="avoidTollRoads">Avoid toll roads</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="avoidFerries">
|
||
<label class="form-check-label" for="avoidFerries">Avoid ferries</label>
|
||
</div>
|
||
<div class="form-check mb-3">
|
||
<input class="form-check-input" type="checkbox" id="avoidUnpaved">
|
||
<label class="form-check-label" for="avoidUnpaved">Avoid unpaved roads</label>
|
||
</div>
|
||
</form>
|
||
<div class="d-grid gap-2 mb-3">
|
||
<button onclick="resetMarkers()" class="btn btn-primary btn-sm">Reset Points</button>
|
||
</div>
|
||
<div class="btn-group mb-2 w-100" role="group" aria-label="Zoom controls">
|
||
<button type="button" class="btn btn-outline-secondary btn-sm" id="zoomInBtn" title="Zoom in">+</button>
|
||
<button type="button" class="btn btn-outline-secondary btn-sm" id="zoomOutBtn" title="Zoom out">−</button>
|
||
</div>
|
||
</div>
|
||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||
<script src="/main.js"></script>
|
||
<script src="/route.js"></script>
|
||
<script src="/geolocate.js"></script>
|
||
</body>
|
||
</html>
|