No description
  • TypeScript 100%
Find a file
2026-03-17 11:30:01 +01:00
src Layers directly removed from the tiles server (Fix #35) 2026-03-17 11:30:01 +01:00
.gitignore Added doc 2026-01-07 15:05:23 +01:00
.npmignore Fix files 2026-01-07 13:23:14 +01:00
.prettierignore Fix files 2026-01-07 13:23:14 +01:00
.prettierrc Fix files 2026-01-07 13:23:14 +01:00
bun.lock Removed useless dependencies 2026-03-12 10:01:14 +01:00
package.json bugfix 2026-03-16 15:44:18 +01:00
README.md Updated README.md 2026-02-09 15:57:50 +01:00
tsconfig.json Basic station display and a lot of refactoring for more robust code 2026-01-28 16:12:47 +01:00
tsconfig.tsbuildinfo Added 3D view 2026-01-30 09:33:38 +01:00
tsconfig.types.json Namazu is now root 2026-01-07 13:19:48 +01:00
typedoc.json Added doc 2026-01-07 15:05:23 +01:00

Namazu-ts

To install dependencies:

bun install

To build library:

bun run build

Small example


import 'maplibre-gl/dist/maplibre-gl.css';
import maplibregl from 'maplibre-gl';
import {
    SismoMap,
    type EventGeoJSON,
    Client,
    type EventQueryOptions,
} from 'namazu-ts';

const smap = new maplibregl.Map({
    container: 'map-container',
    style: /*Your tile server*/,
    center: [0, 0],
    maxPitch: 60,
    zoom: 1, // Low value at the start so we get a "zoom in" animation when loading
    attributionControl: false,
});
let map: SismoMap = new SismoMap('demo', smap, 'fr');

// All our requests will have api.franceseisme.fr as baseURL
let client: Client = new Client('https://api.franceseisme.fr');

let args: EventQueryOptions = {
    limit: 100,
    maximal_latitude: 52,
    maximal_longitude: 10,
    minimal_latitude: 40,
    minimal_longitude: -6,
    minimal_magnitude : 1,
    maximal_magnitude : 4,
};

client.getEvents(args).then((events: EventGeoJSON) => {
    map.displayEvents(events, true, true);
});