namazu-ts 1.1.1 → 1.1.3
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 +21 -3
- package/dist/node/index.js +21 -3
- package/dist/types.d.ts +1 -0
- package/docs/classes/SismoMap.html +5 -5
- package/docs/enums/SortType.html +2 -2
- package/docs/types/Answer.html +2 -2
- package/docs/types/CleanedEventQueryOptions.html +1 -1
- package/docs/types/ContourFeature.html +2 -2
- package/docs/types/ContourGeoJSON.html +2 -2
- package/docs/types/EventCity.html +2 -2
- package/docs/types/EventFeature.html +2 -2
- package/docs/types/EventGeoJSON.html +2 -2
- package/docs/types/EventGeoJSONProperties.html +2 -2
- package/docs/types/EventGeojsonDescriptionProperty.html +2 -2
- package/docs/types/EventPhases.html +1 -1
- package/docs/types/EventQueryOptions.html +2 -2
- package/docs/types/EventTestimony.html +2 -2
- package/docs/types/EventTestimonyGeoJSON.html +2 -2
- package/docs/types/FDSNQueryOptions.html +2 -2
- package/docs/types/FilterQuery.html +2 -2
- package/docs/types/Form.html +2 -2
- package/docs/types/FormCity.html +2 -2
- package/docs/types/GeoJSON.html +1 -1
- package/docs/types/Intensity.html +2 -2
- package/docs/types/IntensityGeoJSON.html +2 -2
- package/docs/types/Magnitude.html +2 -2
- package/docs/types/NamazuEvent.html +2 -2
- package/docs/types/Origin.html +2 -2
- package/docs/types/Phase.html +2 -2
- package/docs/types/Quality.html +2 -2
- package/docs/types/Question.html +2 -2
- package/docs/types/QuestionChoice.html +2 -2
- package/docs/types/QuestionCondition.html +1 -1
- package/docs/types/QuestionGroup.html +2 -2
- package/docs/types/Station.html +2 -2
- package/docs/types/StationFeature.html +1 -1
- package/docs/types/StationGeoJSON.html +2 -2
- package/docs/types/Street.html +2 -2
- package/docs/types/Survey.html +2 -2
- package/docs/types/Testimony.html +2 -2
- package/docs/types/Uncertainty.html +2 -2
- package/docs/types/Zone.html +2 -2
- package/docs/types/ZoneDesc.html +2 -2
- package/docs/types/Zones.html +2 -2
- package/docs/variables/EventRadius.html +1 -1
- package/docs/variables/EventTypes.html +1 -1
- package/docs/variables/IntensitiesColors.html +1 -1
- package/docs/variables/Intervals.html +1 -1
- package/docs/variables/MagnitudesColors.html +1 -1
- package/docs/variables/SortFilters.html +1 -1
- package/docs/variables/ZoneNames.html +1 -1
- package/package.json +1 -1
- package/src/sismomap.ts +27 -5
- package/src/types.ts +1 -0
package/dist/browser/index.js
CHANGED
|
@@ -31258,7 +31258,11 @@ class SismoMap {
|
|
|
31258
31258
|
"circle-stroke-opacity": 0.9
|
|
31259
31259
|
}
|
|
31260
31260
|
});
|
|
31261
|
-
const titles = [
|
|
31261
|
+
const titles = [
|
|
31262
|
+
"events" /* EVENTS */,
|
|
31263
|
+
"stations" /* STATIONS */,
|
|
31264
|
+
"int_contours" /* CONTOURS */
|
|
31265
|
+
];
|
|
31262
31266
|
titles.forEach((title) => {
|
|
31263
31267
|
map.on("mouseenter", title, (e) => {
|
|
31264
31268
|
if (this._showDescription) {
|
|
@@ -31266,8 +31270,13 @@ class SismoMap {
|
|
|
31266
31270
|
if (e.features === undefined)
|
|
31267
31271
|
return;
|
|
31268
31272
|
const text = JSON.parse(e.features[0].properties.description);
|
|
31269
|
-
|
|
31270
|
-
|
|
31273
|
+
let lng, lat;
|
|
31274
|
+
if (["symbol", "circle"].includes(e.features[0].layer.type)) {
|
|
31275
|
+
const feature = e.features[0];
|
|
31276
|
+
[lng, lat] = feature.geometry.coordinates;
|
|
31277
|
+
} else {
|
|
31278
|
+
[lng, lat] = [e.lngLat.lng, e.lngLat.lat];
|
|
31279
|
+
}
|
|
31271
31280
|
this._descPopups[0].setLngLat([lng, lat]).setHTML(text[lang]).addTo(map);
|
|
31272
31281
|
this._descPopups[0].getElement().style.color = "black";
|
|
31273
31282
|
this._descPopups[0].getElement().style.pointerEvents = "none !important";
|
|
@@ -31470,6 +31479,15 @@ class SismoMap {
|
|
|
31470
31479
|
moveView = false,
|
|
31471
31480
|
clear = false
|
|
31472
31481
|
}) {
|
|
31482
|
+
for (let i = 0;i < contours.features.length; i++) {
|
|
31483
|
+
const props = contours.features[i].properties;
|
|
31484
|
+
if (props.description === undefined) {
|
|
31485
|
+
props.description = {
|
|
31486
|
+
fr: props.value + " " + props.units,
|
|
31487
|
+
en: props.value + " " + props.units
|
|
31488
|
+
};
|
|
31489
|
+
}
|
|
31490
|
+
}
|
|
31473
31491
|
this.displayGeoJSON({
|
|
31474
31492
|
geojson: contours,
|
|
31475
31493
|
sourceName: "int_contours" /* CONTOURS */,
|
package/dist/node/index.js
CHANGED
|
@@ -43796,7 +43796,11 @@ class SismoMap {
|
|
|
43796
43796
|
"circle-stroke-opacity": 0.9
|
|
43797
43797
|
}
|
|
43798
43798
|
});
|
|
43799
|
-
const titles = [
|
|
43799
|
+
const titles = [
|
|
43800
|
+
"events" /* EVENTS */,
|
|
43801
|
+
"stations" /* STATIONS */,
|
|
43802
|
+
"int_contours" /* CONTOURS */
|
|
43803
|
+
];
|
|
43800
43804
|
titles.forEach((title) => {
|
|
43801
43805
|
map.on("mouseenter", title, (e) => {
|
|
43802
43806
|
if (this._showDescription) {
|
|
@@ -43804,8 +43808,13 @@ class SismoMap {
|
|
|
43804
43808
|
if (e.features === undefined)
|
|
43805
43809
|
return;
|
|
43806
43810
|
const text = JSON.parse(e.features[0].properties.description);
|
|
43807
|
-
|
|
43808
|
-
|
|
43811
|
+
let lng, lat;
|
|
43812
|
+
if (["symbol", "circle"].includes(e.features[0].layer.type)) {
|
|
43813
|
+
const feature = e.features[0];
|
|
43814
|
+
[lng, lat] = feature.geometry.coordinates;
|
|
43815
|
+
} else {
|
|
43816
|
+
[lng, lat] = [e.lngLat.lng, e.lngLat.lat];
|
|
43817
|
+
}
|
|
43809
43818
|
this._descPopups[0].setLngLat([lng, lat]).setHTML(text[lang]).addTo(map);
|
|
43810
43819
|
this._descPopups[0].getElement().style.color = "black";
|
|
43811
43820
|
this._descPopups[0].getElement().style.pointerEvents = "none !important";
|
|
@@ -44008,6 +44017,15 @@ class SismoMap {
|
|
|
44008
44017
|
moveView = false,
|
|
44009
44018
|
clear = false
|
|
44010
44019
|
}) {
|
|
44020
|
+
for (let i = 0;i < contours.features.length; i++) {
|
|
44021
|
+
const props = contours.features[i].properties;
|
|
44022
|
+
if (props.description === undefined) {
|
|
44023
|
+
props.description = {
|
|
44024
|
+
fr: props.value + " " + props.units,
|
|
44025
|
+
en: props.value + " " + props.units
|
|
44026
|
+
};
|
|
44027
|
+
}
|
|
44028
|
+
}
|
|
44011
44029
|
this.displayGeoJSON({
|
|
44012
44030
|
geojson: contours,
|
|
44013
44031
|
sourceName: "int_contours" /* CONTOURS */,
|