Geoimpact SEP Map SDK
npm install @geoimpact/sep-map-sdkThe official React-based map SDK for Swiss Energy Planning (SEP) applications by geoimpact.
- πΊοΈ Interactive Map: Built on Leaflet with high-performance vector tiles.
- π Address Search: Integrated Swiss address search with autocomplete.
- π Perimeter Selection: Select and interact with building/land perimeters.
- π¨ Customizable: extensive styling options and layer management.
- π Web Component: Works in React, Vue, Angular, or Vanilla JS.
``bash`
npm install @geoimpact/sep-map-sdk
`tsx
import { SEPMapSDK } from '@geoimpact/sep-map-sdk';
import { useEffect, useRef } from 'react';
// Import CSS (required)
import '@geoimpact/sep-map-sdk/dist/sep-map-sdk.css';
function MapComponent() {
const containerRef = useRef(null);
useEffect(() => {
if (!containerRef.current) return;
const map = new SEPMapSDK({
container: containerRef.current,
token: 'YOUR_JWT_TOKEN', // Optional: if using authenticated layers
features: {
addressSearch: true,
perimeterSelection: true
}
});
return () => map.destroy();
}, []);
return
;$3
You can also use the SDK via a script tag or as a web component.
`html
href="https://sos-ch-gva-2.exo.io/geoimpact-cdn/sep-map-sdk/1.x/sep-map-sdk.css">
`CDN Versioning
The SDK is available via CDN with semantic versioning aliases:
| URL Pattern | Example | Description |
|------------------------|------------|----------------------------------------------------------------------|
|
/{version}/ | /1.2.3/ | Exact version - never changes (recommended for production) |
| /{major}.{minor}.x/ | /1.2.x/ | Auto-updates with patch releases (bug fixes) |
| /{major}.x/ | /1.x/ | Auto-updates with minor releases (new features, no breaking changes) |
| /latest/ | /latest/ | Always the newest version (for development only) |Recommended for production:
`html
`For development/testing:
`html
`Configuration
| Option | Type | Required | Description |
| ----------- | ------------------------------ | -------- | ----------------------------------------- |
|
container | HTMLElement \| string | Yes | DOM element or selector to mount the map. |
| token | string | Yes | JWT token for authenticated services. |
| language | 'de' \| 'fr' \| 'it' \| 'en' | No | Initial language (default: 'de'). |
| features | FeatureConfig` | No | Enable/disable specific features. |Proprietary - geoimpact AG