Skip to content

Commit fe3e106

Browse files
committed
Website updates
1 parent 7f069af commit fe3e106

20 files changed

+92
-58
lines changed

dist/en/main/examples/device-orientation.html

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ <h5 class="modal-title" id="tag-example-title"></h5>
121121
</div>
122122
<div id="map" class="map"></div>
123123
<p>
124+
<div id="unsupported" style="background-color: lightcoral; text-align: center;"></div>
124125
<div>α : <code id="alpha"></code></div>
125126
<div>β : <code id="beta"></code></div>
126127
<div>γ : <code id="gamma"></code></div>
@@ -165,24 +166,30 @@ <h5 class="source-heading">main.js</h5>
165166

166167
const gn &#x3D; new GyroNorm();
167168

168-
gn.init().then(function () {
169-
gn.start(function (event) {
170-
const center &#x3D; view.getCenter();
171-
const resolution &#x3D; view.getResolution();
172-
const alpha &#x3D; toRadians(event.do.alpha);
173-
const beta &#x3D; toRadians(event.do.beta);
174-
const gamma &#x3D; toRadians(event.do.gamma);
169+
gn.init().then(
170+
function () {
171+
gn.start(function (event) {
172+
const center &#x3D; view.getCenter();
173+
const resolution &#x3D; view.getResolution();
174+
const alpha &#x3D; toRadians(event.do.alpha);
175+
const beta &#x3D; toRadians(event.do.beta);
176+
const gamma &#x3D; toRadians(event.do.gamma);
175177

176-
el(&#x27;alpha&#x27;).innerText &#x3D; alpha + &#x27; [rad]&#x27;;
177-
el(&#x27;beta&#x27;).innerText &#x3D; beta + &#x27; [rad]&#x27;;
178-
el(&#x27;gamma&#x27;).innerText &#x3D; gamma + &#x27; [rad]&#x27;;
178+
el(&#x27;alpha&#x27;).innerText &#x3D; alpha + &#x27; [rad]&#x27;;
179+
el(&#x27;beta&#x27;).innerText &#x3D; beta + &#x27; [rad]&#x27;;
180+
el(&#x27;gamma&#x27;).innerText &#x3D; gamma + &#x27; [rad]&#x27;;
179181

180-
center[0] -&#x3D; resolution * gamma * 25;
181-
center[1] +&#x3D; resolution * beta * 25;
182+
center[0] -&#x3D; resolution * gamma * 25;
183+
center[1] +&#x3D; resolution * beta * 25;
182184

183-
view.setCenter(center);
184-
});
185-
});
185+
view.setCenter(center);
186+
});
187+
},
188+
function (e) {
189+
el(&#x27;unsupported&#x27;).innerText &#x3D;
190+
typeof e &#x3D;&#x3D;&#x3D; &#x27;string&#x27; ? e : &#x27;Could not initialize sensors&#x27;;
191+
},
192+
);
186193
</code></pre>
187194
</div>
188195

@@ -204,6 +211,7 @@ <h5 class="source-heading">index.html</h5>
204211
&lt;body&gt;
205212
&lt;div id&#x3D;&quot;map&quot; class&#x3D;&quot;map&quot;&gt;&lt;/div&gt;
206213
&lt;p&gt;
214+
&lt;div id&#x3D;&quot;unsupported&quot; style&#x3D;&quot;background-color: lightcoral; text-align: center;&quot;&gt;&lt;/div&gt;
207215
&lt;div&gt;α : &lt;code id&#x3D;&quot;alpha&quot;&gt;&lt;/code&gt;&lt;/div&gt;
208216
&lt;div&gt;β : &lt;code id&#x3D;&quot;beta&quot;&gt;&lt;/code&gt;&lt;/div&gt;
209217
&lt;div&gt;γ : &lt;code id&#x3D;&quot;gamma&quot;&gt;&lt;/code&gt;&lt;/div&gt;

dist/en/main/examples/device-orientation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/device-orientation.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/filter-points-webgl.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,17 @@ <h5 class="source-heading">main.js</h5>
286286
minYear: parseInt(minYearInput.value),
287287
maxYear: parseInt(maxYearInput.value),
288288
},
289-
style: {
290-
style,
291-
filter: [
292-
&#x27;between&#x27;,
293-
[&#x27;get&#x27;, &#x27;year&#x27;],
294-
[&#x27;var&#x27;, &#x27;minYear&#x27;],
295-
[&#x27;var&#x27;, &#x27;maxYear&#x27;],
296-
],
297-
},
289+
style: [
290+
{
291+
style,
292+
filter: [
293+
&#x27;between&#x27;,
294+
[&#x27;get&#x27;, &#x27;year&#x27;],
295+
[&#x27;var&#x27;, &#x27;minYear&#x27;],
296+
[&#x27;var&#x27;, &#x27;maxYear&#x27;],
297+
],
298+
},
299+
],
298300
source: vectorSource,
299301
disableHitDetection: true,
300302
});

dist/en/main/examples/filter-points-webgl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)