namazu-ts 1.3.6 → 1.3.8
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.
- package/dist/browser/index.js +2 -1
- package/dist/node/index.js +2 -2
- package/dist/sismomap.d.ts +0 -1
- package/docs/classes/SismoMap.html +2 -2
- package/package.json +1 -10
- package/src/sismomap.ts +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -20110,7 +20110,8 @@ var SismoMap = class {
|
|
|
20110
20110
|
const readyEvent = new CustomEvent("namazu-ready");
|
|
20111
20111
|
map.getCanvas().dispatchEvent(readyEvent);
|
|
20112
20112
|
});
|
|
20113
|
-
|
|
20113
|
+
const min = Math.min(map.getCanvas().height, map.getCanvas().width);
|
|
20114
|
+
this._spinDezoom = min * 2e-3 + 0.6;
|
|
20114
20115
|
this.name = name;
|
|
20115
20116
|
this.changeLanguage(lang);
|
|
20116
20117
|
}
|
package/dist/node/index.js
CHANGED
|
@@ -864,7 +864,6 @@ var Client = class {
|
|
|
864
864
|
};
|
|
865
865
|
|
|
866
866
|
// src/sismomap.ts
|
|
867
|
-
import "maplibre-gl/dist/maplibre-gl.css";
|
|
868
867
|
import * as maplibregl from "maplibre-gl";
|
|
869
868
|
import { bbox } from "@turf/turf";
|
|
870
869
|
import { ok as ok2, err as err2 } from "neverthrow";
|
|
@@ -1127,7 +1126,8 @@ var SismoMap = class {
|
|
|
1127
1126
|
const readyEvent = new CustomEvent("namazu-ready");
|
|
1128
1127
|
map.getCanvas().dispatchEvent(readyEvent);
|
|
1129
1128
|
});
|
|
1130
|
-
|
|
1129
|
+
const min = Math.min(map.getCanvas().height, map.getCanvas().width);
|
|
1130
|
+
this._spinDezoom = min * 2e-3 + 0.6;
|
|
1131
1131
|
this.name = name;
|
|
1132
1132
|
this.changeLanguage(lang);
|
|
1133
1133
|
}
|
package/dist/sismomap.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
2
1
|
import * as maplibregl from 'maplibre-gl';
|
|
3
2
|
import { EventGeoJSON, NamazuEvent, GeoJSON, Station, StationGeoJSON, Phase, FilterQuery, EventTestimonyGeoJSON, IntensityGeoJSON, SortType, ContourGeoJSON } from './types';
|
|
4
3
|
import { NamazuSource, ContourType } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SismoMap | namazu-ts</title><meta name="description" content="Documentation for namazu-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">namazu-ts</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SismoMap</a></li></ul><h1>Class SismoMap</h1></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SismoMap | namazu-ts</title><meta name="description" content="Documentation for namazu-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">namazu-ts</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SismoMap</a></li></ul><h1>Class SismoMap</h1></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:39</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
2
2
|
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#_debug" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>debug</span></a>
|
|
3
3
|
<a href="#_descpopups" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>desc<wbr/>Popups</span></a>
|
|
4
4
|
<a href="#_distancepersecond" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>distance<wbr/>Per<wbr/>Second</span></a>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<a href="#showzoom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>Zoom</span></a>
|
|
46
46
|
<a href="#startspin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start<wbr/>Spin</span></a>
|
|
47
47
|
<a href="#stopspin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stop<wbr/>Spin</span></a>
|
|
48
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Constructors</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="constructorsismomap"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">SismoMap</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map$1</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">lang</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">legendClasses</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">bounds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">LngLatBoundsLike</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">SismoMap</a><a href="#constructorsismomap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">map</span>: <span class="tsd-signature-type">Map$1</span></span></li><li><span><span class="tsd-kind-parameter">lang</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">legendClasses</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">bounds</span>: <span class="tsd-signature-type">LngLatBoundsLike</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">SismoMap</a></h4><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:59</li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_debug"><span>_<wbr/>debug</span><a href="#_debug" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_debug</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:51</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_descpopups"><span>_<wbr/>desc<wbr/>Popups</span><a href="#_descpopups" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_descPopups</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Popup</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:43</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_distancepersecond"><span>_<wbr/>distance<wbr/>Per<wbr/>Second</span><a href="#_distancepersecond" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_distancePerSecond</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:49</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_lang"><span>_<wbr/>lang</span><a href="#_lang" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_lang</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:53</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_legendclasses"><span>_<wbr/>legend<wbr/>Classes</span><a href="#_legendclasses" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_legendClasses</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:57</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_maxspinzoom"><span>_<wbr/>max<wbr/>Spin<wbr/>Zoom</span><a href="#_maxspinzoom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_maxSpinZoom</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 4</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:46</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_secondsperrevolution"><span>_<wbr/>seconds<wbr/>Per<wbr/>Revolution</span><a href="#_secondsperrevolution" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_secondsPerRevolution</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 120</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:45</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_showdescription"><span>_<wbr/>show<wbr/>Description</span><a href="#_showdescription" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_showDescription</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:52</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spindezoom"><span>_<wbr/>spin<wbr/>Dezoom</span><a href="#_spindezoom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinDezoom</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:54</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinenabled"><span>_<wbr/>spin<wbr/>Enabled</span><a href="#_spinenabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinEnabled</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:44</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinrestartdelay"><span>_<wbr/>spin<wbr/>Restart<wbr/>Delay</span><a href="#_spinrestartdelay" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinRestartDelay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5000</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:56</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinrestarttimeoutid"><span>_<wbr/>spin<wbr/>Restart<wbr/>Timeout<wbr/>ID</span><a href="#_spinrestarttimeoutid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinRestartTimeoutID</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Timeout</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:55</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_usable"><span>_<wbr/>usable</span><a href="#_usable" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_usable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:47</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_userinteracting"><span>_<wbr/>user<wbr/>Interacting</span><a href="#_userinteracting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_userInteracting</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:48</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_zoomelem"><span>_<wbr/>zoom<wbr/>Elem</span><a href="#_zoomelem" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_zoomElem</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:50</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="map"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map$1</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:42</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="name"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:41</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="applyfilter"><span>apply<wbr/>Filter</span><a href="#applyfilter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="applyfilter-1"><span class="tsd-kind-call-signature">applyFilter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">filterQuery</span><span class="tsd-signature-symbol">:</span> <a href="../types/FilterQuery.html" class="tsd-signature-type tsd-kind-type-alias">FilterQuery</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Result</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">></span><a href="#applyfilter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Event Types :
|
|
48
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Constructors</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="constructorsismomap"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">SismoMap</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map$1</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">lang</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">legendClasses</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">bounds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">LngLatBoundsLike</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">SismoMap</a><a href="#constructorsismomap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">map</span>: <span class="tsd-signature-type">Map$1</span></span></li><li><span><span class="tsd-kind-parameter">lang</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">legendClasses</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">bounds</span>: <span class="tsd-signature-type">LngLatBoundsLike</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">SismoMap</a></h4><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:58</li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_debug"><span>_<wbr/>debug</span><a href="#_debug" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_debug</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:50</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_descpopups"><span>_<wbr/>desc<wbr/>Popups</span><a href="#_descpopups" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_descPopups</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Popup</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:42</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_distancepersecond"><span>_<wbr/>distance<wbr/>Per<wbr/>Second</span><a href="#_distancepersecond" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_distancePerSecond</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:48</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_lang"><span>_<wbr/>lang</span><a href="#_lang" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_lang</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:52</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_legendclasses"><span>_<wbr/>legend<wbr/>Classes</span><a href="#_legendclasses" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_legendClasses</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:56</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_maxspinzoom"><span>_<wbr/>max<wbr/>Spin<wbr/>Zoom</span><a href="#_maxspinzoom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_maxSpinZoom</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 4</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:45</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_secondsperrevolution"><span>_<wbr/>seconds<wbr/>Per<wbr/>Revolution</span><a href="#_secondsperrevolution" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_secondsPerRevolution</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 120</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:44</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_showdescription"><span>_<wbr/>show<wbr/>Description</span><a href="#_showdescription" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_showDescription</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:51</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spindezoom"><span>_<wbr/>spin<wbr/>Dezoom</span><a href="#_spindezoom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinDezoom</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:53</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinenabled"><span>_<wbr/>spin<wbr/>Enabled</span><a href="#_spinenabled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinEnabled</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:43</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinrestartdelay"><span>_<wbr/>spin<wbr/>Restart<wbr/>Delay</span><a href="#_spinrestartdelay" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinRestartDelay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 5000</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:55</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_spinrestarttimeoutid"><span>_<wbr/>spin<wbr/>Restart<wbr/>Timeout<wbr/>ID</span><a href="#_spinrestarttimeoutid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_spinRestartTimeoutID</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Timeout</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:54</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_usable"><span>_<wbr/>usable</span><a href="#_usable" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_usable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:46</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_userinteracting"><span>_<wbr/>user<wbr/>Interacting</span><a href="#_userinteracting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_userInteracting</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:47</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="_zoomelem"><span>_<wbr/>zoom<wbr/>Elem</span><a href="#_zoomelem" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_zoomElem</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:49</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="map"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map$1</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:41</li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="name"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/sismomap.ts:40</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="applyfilter"><span>apply<wbr/>Filter</span><a href="#applyfilter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="applyfilter-1"><span class="tsd-kind-call-signature">applyFilter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">filterQuery</span><span class="tsd-signature-symbol">:</span> <a href="../types/FilterQuery.html" class="tsd-signature-type tsd-kind-type-alias">FilterQuery</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Result</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">></span><a href="#applyfilter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Event Types :
|
|
49
49
|
-'event',
|
|
50
50
|
-'earthquake',
|
|
51
51
|
-'quarry blast',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namazu-ts",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/node/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -33,15 +33,6 @@
|
|
|
33
33
|
"maplibre-gl": "6.0.0-15",
|
|
34
34
|
"neverthrow": "^8.2.0"
|
|
35
35
|
},
|
|
36
|
-
"IGNOREscripts": {
|
|
37
|
-
"build": "bun run build:browser && bun run build:node && bun run build:declaration && bun run doc",
|
|
38
|
-
"build:browser": "bun build src/index.ts --target=browser --outdir=dist/browser",
|
|
39
|
-
"build:node": "bun build src/index.ts --target=node --format esm --outdir=dist/node",
|
|
40
|
-
"build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json",
|
|
41
|
-
"test": "bun test",
|
|
42
|
-
"postbuild": "rimraf tsconfig.types.tsbuildinfo",
|
|
43
|
-
"doc": "bunx typedoc --options typedoc.json"
|
|
44
|
-
},
|
|
45
36
|
"scripts": {
|
|
46
37
|
"build": "bun run build.mjs && bun run build:declaration && bun run doc",
|
|
47
38
|
"build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json",
|
package/src/sismomap.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
2
1
|
import * as maplibregl from 'maplibre-gl';
|
|
3
2
|
import type {
|
|
4
3
|
DataDrivenPropertyValueSpecification,
|
|
@@ -356,7 +355,8 @@ paint: {
|
|
|
356
355
|
map.getCanvas().dispatchEvent(readyEvent);
|
|
357
356
|
|
|
358
357
|
});
|
|
359
|
-
|
|
358
|
+
const min = Math.min(map.getCanvas().height, map.getCanvas().width);
|
|
359
|
+
this._spinDezoom = min * 0.002 + 0.6;
|
|
360
360
|
this.name = name;
|
|
361
361
|
this.changeLanguage(lang);
|
|
362
362
|
}
|