/
circle.html
39 lines (34 loc) · 1.09 KB
/
circle.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Минимальный проект</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://api-maps.yandex.ru/2.1/?apikey=API-ключ&lang=ru_RU" type="text/javascript">
</script>
<script type="text/javascript">
ymaps.ready(init);
function init(){
let myMap = new ymaps.Map("map", {
center: [55.76, 37.64],
zoom: 9
});
// создаём первый прямоугольник
let myCircle1 = new ymaps.GeoObject({
geometry: {
type: "Circle",
coordinates: [55.96, 37.44],
radius: 5000
}
});
// создаём второй прямоугольник
let myCircle2 = new ymaps.Circle([[56.16, 37.64], 10000]);
// добавляем объекты на карту
myMap.geoObjects.add(myCircle1);
myMap.geoObjects.add(myCircle2);
}
</script>
</head>
<body>
<div id="map" style="width: 600px; height: 400px"></div>
</body>
</html>