@mapcreator/mapcreator-gl 5.2.3 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,128 +1,128 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dynamic map library test page</title>
5
- <meta charset="utf-8" />
6
- <link rel="stylesheet" href="./style.css" />
7
- <style>
8
- * {
9
- box-sizing: border-box;
10
- user-select: none;
11
- }
12
-
13
- html,
14
- body {
15
- margin: 0;
16
- padding: 0;
17
- width: 100%;
18
- height: 100%;
19
- }
20
-
21
- body {
22
- display: flex;
23
- flex-direction: column;
24
- }
25
-
26
- .ui {
27
- display: flex;
28
- width: 100%;
29
- height: 40px;
30
- padding: 10px 10px 0;
31
- font-family: Consolas, monospace;
32
- }
33
-
34
- .map-url-label {
35
- line-height: 30px;
36
- margin-right: 10px;
37
- }
38
-
39
- .map-url-input {
40
- font-family: Consolas, monospace;
41
- outline: none;
42
- appearance: none;
43
- -webkit-appearance: none;
44
- flex-grow: 1;
45
- border: 1px solid #aaaaaa;
46
- border-radius: 3px;
47
- }
48
-
49
- .map-url-input.invalid {
50
- border-color: #ff5c5c;
51
- }
52
-
53
- .load-button {
54
- text-align: center;
55
- line-height: 30px;
56
- width: 100px;
57
- margin-left: 10px;
58
- color: #ffffff;
59
- background-color: #ff5c5c;
60
- border-radius: 3px;
61
- cursor: pointer;
62
- }
63
-
64
- .load-button.disabled {
65
- pointer-events: none;
66
- background-color: #aaa;
67
- }
68
-
69
- .map-container {
70
- position: relative;
71
- width: 100%;
72
- flex-grow: 1;
73
- padding: 0 50px;
74
- margin-top: 50px;
75
- margin-bottom: 50px;
76
- }
77
-
78
- .map {
79
- position: absolute;
80
- background-color: #eeeeee;
81
- width: calc(100% - 100px);
82
- height: 100%;
83
- }
84
- </style>
85
- </head>
86
- <body>
87
- <div class="ui">
88
- <div class="map-url-label">Dynamic map URL (LIVE only):</div>
89
- <input type="text" class="map-url-input" />
90
- <div class="load-button disabled">Load</div>
91
- </div>
92
- <div class="map-container"><div class="map"></div></div>
93
-
94
- <script src="./lib.js"></script>
95
- <script>
96
- const input = document.querySelector('.map-url-input');
97
- const container = document.querySelector('.map');
98
- const button = document.querySelector('.load-button');
99
-
100
- let jobId;
101
- let accessToken;
102
- let map;
103
-
104
- input.addEventListener('input', e => {
105
- const url = e.target.value;
106
- const queryString = url.split('?')[1];
107
- const searchParams = new URLSearchParams(queryString);
108
-
109
- jobId = searchParams.get('id');
110
- accessToken = searchParams.get('access-token');
111
-
112
- if (jobId !== null && accessToken !== null) {
113
- input.classList.remove('invalid');
114
- button.classList.remove('disabled');
115
- } else {
116
- input.classList.add('invalid');
117
- button.classList.add('disabled');
118
- }
119
- });
120
-
121
- button.addEventListener('click', async () => {
122
- container.innerHTML = '';
123
-
124
- map = await mapcreatorgl.init({ jobId, accessToken, container });
125
- });
126
- </script>
127
- </body>
128
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dynamic map library test page</title>
5
+ <meta charset="utf-8" />
6
+ <link rel="stylesheet" href="./style.css" />
7
+ <style>
8
+ * {
9
+ box-sizing: border-box;
10
+ user-select: none;
11
+ }
12
+
13
+ html,
14
+ body {
15
+ margin: 0;
16
+ padding: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ }
20
+
21
+ body {
22
+ display: flex;
23
+ flex-direction: column;
24
+ }
25
+
26
+ .ui {
27
+ display: flex;
28
+ width: 100%;
29
+ height: 40px;
30
+ padding: 10px 10px 0;
31
+ font-family: Consolas, monospace;
32
+ }
33
+
34
+ .map-url-label {
35
+ line-height: 30px;
36
+ margin-right: 10px;
37
+ }
38
+
39
+ .map-url-input {
40
+ font-family: Consolas, monospace;
41
+ outline: none;
42
+ appearance: none;
43
+ -webkit-appearance: none;
44
+ flex-grow: 1;
45
+ border: 1px solid #aaaaaa;
46
+ border-radius: 3px;
47
+ }
48
+
49
+ .map-url-input.invalid {
50
+ border-color: #ff5c5c;
51
+ }
52
+
53
+ .load-button {
54
+ text-align: center;
55
+ line-height: 30px;
56
+ width: 100px;
57
+ margin-left: 10px;
58
+ color: #ffffff;
59
+ background-color: #ff5c5c;
60
+ border-radius: 3px;
61
+ cursor: pointer;
62
+ }
63
+
64
+ .load-button.disabled {
65
+ pointer-events: none;
66
+ background-color: #aaa;
67
+ }
68
+
69
+ .map-container {
70
+ position: relative;
71
+ width: 100%;
72
+ flex-grow: 1;
73
+ padding: 0 50px;
74
+ margin-top: 50px;
75
+ margin-bottom: 50px;
76
+ }
77
+
78
+ .map {
79
+ position: absolute;
80
+ background-color: #eeeeee;
81
+ width: calc(100% - 100px);
82
+ height: 100%;
83
+ }
84
+ </style>
85
+ </head>
86
+ <body>
87
+ <div class="ui">
88
+ <div class="map-url-label">Dynamic map URL (LIVE only):</div>
89
+ <input type="text" class="map-url-input" />
90
+ <div class="load-button disabled">Load</div>
91
+ </div>
92
+ <div class="map-container"><div class="map"></div></div>
93
+
94
+ <script src="./lib.js"></script>
95
+ <script>
96
+ const input = document.querySelector('.map-url-input');
97
+ const container = document.querySelector('.map');
98
+ const button = document.querySelector('.load-button');
99
+
100
+ let jobId;
101
+ let accessToken;
102
+ let map;
103
+
104
+ input.addEventListener('input', e => {
105
+ const url = e.target.value;
106
+ const queryString = url.split('?')[1];
107
+ const searchParams = new URLSearchParams(queryString);
108
+
109
+ jobId = searchParams.get('id');
110
+ accessToken = searchParams.get('access-token');
111
+
112
+ if (jobId !== null && accessToken !== null) {
113
+ input.classList.remove('invalid');
114
+ button.classList.remove('disabled');
115
+ } else {
116
+ input.classList.add('invalid');
117
+ button.classList.add('disabled');
118
+ }
119
+ });
120
+
121
+ button.addEventListener('click', async () => {
122
+ container.innerHTML = '';
123
+
124
+ map = await mapcreatorgl.init({ jobId, accessToken, container });
125
+ });
126
+ </script>
127
+ </body>
128
+ </html>