-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
146 lines (145 loc) · 4.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yandex Maps API - Parser</title>
<style>
* {
padding: 0;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
box-sizing: border-box;
scroll-behavior: smooth;
transition: all 0.3s ease-out;
scrollbar-width: thin !important;
scrollbar-color: rgb(53, 53, 53) rgb(85, 85, 85) !important;
}
ymaps * {
transition: none;
}
.container>div, p, h1, h2, h3, h4, h5, h6, input, button {
margin-bottom: 0.5em;
}
pre {
background-color: rgb(85, 85, 85);
border: solid 2px rgb(53, 53, 53);
border-radius: 10px;
word-wrap: break-word;
white-space: pre-wrap;
overflow-x: auto;
margin-bottom: 1em;
padding: 0.5em;
}
pre code {
font-family: monospace;
color: whitesmoke;
}
input, button {
background-color: white;
padding: 0.5em;
border: solid 2px gray;
border-radius: 10px;
outline: none;
}
form > ymaps * {
border-radius: 10px;
}
form > ymaps {
margin-top: 0.5em;
}
input[type="text"] {
width: 50%;
}
input:hover,
button:hover {
border: solid 2px dodgerblue;
}
button:active {
background-color: rgb(230, 240, 255);
}
.parserStatus {
overflow-x: auto;
height: 38px;
}
.flex {
display: flex;
gap: 0.5em;
}
.flex-gap {
gap: 2em;
}
.flex-grow {
flex-grow: 1;
}
.flex > .f-half {
width: 50%;
}
.parserResult,
.mapParse .map {
height: 70vh;
}
.map {
border: solid 2px rgb(85, 85, 85);
background-color: gray;
border-radius: 10px;
}
.map > *, .map > * > *, .map > * > * > *, .map > * > * > * > * {
border-radius: 10px !important;
}
.container {
padding: 1em 10vw;
}
@media (max-width: 724px) {
.flex {
height: 100%;
flex-wrap: wrap;
}
.flex > .f-half {
width: 100%;
}
}
</style>
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey={YOUR_API_KEY}&suggest_apikey={YOUR API KEY}" type="text/javascript"></script>
</head>
<body>
<main>
<div class="container">
<h2>Поиск объектов инфраструктуры</h2>
<h3>Парсер объектов инфраструктуры по адресу, based on Yandex Maps JavaScript API</h3>
</div>
<div class="container address-form">
<form onsubmit="return false;">
<div>
<p>Адрес:</p>
</div>
<div class="flex">
<input class="flex-grow" type="text" id="infra-search-input-address" placeholder="Введите адрес...">
<button type="submit" id="infra-search-btn-search">Выполнить</button>
</div>
</form>
</div>
<div class="container flex flex-gap mapParse">
<div class="f-half">
<p>Статус:</p>
<pre id="infra-search-status-wrapper" class="parserStatus"><code id="infra-search-status"></code></pre>
<p>Карта:</p>
<div class="map" id="ymap"></div>
</div>
<div class="f-half">
<p>Кол-во объектов:</p>
<pre><code id="infra-search-obj-count">NaN</code></pre>
<p>Результат:</p>
<pre class="parserResult"><code id="infra-search-result">NaN</code></pre>
</div>
</div>
</main>
<footer>
<div class="container">
<small>Created by Gleb "xenongee" Rublev, 2022-2023</small>
</div>
</footer>
</body>
<script src="app.js" type="text/javascript"></script>
</html>