Skip to content

Commit

Permalink
add search html
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoyen05 committed Dec 23, 2024
1 parent 753d78c commit fd00fc9
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/main/resources/templates/MapSearch/map-search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Поиск по карте</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<!-- Leaflet Routing Machine CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet-routing-machine/dist/leaflet-routing-machine.css" />
<link rel="stylesheet" href="/css/map-search_styles.css">
</head>
<body>
<!-- Карта -->
<div id="map"></div>

<!-- Сайдбар -->
<div id="sidebar">
<!-- Контейнер поиска -->
<div id="searchContainer">
<button id="backButton" onclick="resetSearch()">
<img src="../assets/left-back-arrow.png" alt="Назад" class="back-icon">
</button>
<input type="text" id="searchQuery" placeholder="Введите название озера">
<button id="searchButton" onclick="searchOnMap()">Поиск</button>
</div>

<!-- Шаг 2 - Информация -->
<div id="step2" class="hidden">
<h2>Информация</h2>
<p id="locationInfo">Выбранный объект: </p>
<button id="routeButton" onclick="showRouteInputs()">Построить маршрут</button>
</div>

<!-- Шаг 3 - Маршрут -->
<div id="routeContainer" class="hidden">
<button id="backButtonRoute" onclick="clearRouteInputs()">
<img src="../assets/left-back-arrow.png" alt="Назад" class="back-icon">
</button>
<input type="text" id="routeStart" placeholder="Откуда">
<input type="text" id="routeEnd" placeholder="Куда">
<button id="buildRouteButton" onclick="buildRoute()">Построить маршрут</button>
</div>
</div>

<!-- Подключение JS -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-routing-machine/dist/leaflet-routing-machine.js"></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script src="/JavaScript/map-search_script.js"></script>
</body>
</html>

0 comments on commit fd00fc9

Please sign in to comment.