-
Notifications
You must be signed in to change notification settings - Fork 0
/
myModule.html
34 lines (33 loc) · 1.03 KB
/
myModule.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
<!DOCTYPE html>
<html>
<head>
<title>Создание собственного модуля</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&coordorder=longlat" type="text/javascript"></script>
<script src="myModule.js" type="text/javascript"></script>
<style>
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#map {
width: 700px;
height: 500px;
}
</style>
<script type="text/javascript">
ymaps.ready({
require: ['myNS.myModule'],
successCallback: function (api) {
// ymaps.myNS.myModule
console.log(api.myNS.myModule.coords);
}
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>