Spillgebees.Blazor.Map is a Blazor map component powered by MapLibre GL JS.
See the documentation and demos for guides, examples, and live components.
- Declarative Blazor API for sources, layers, markers, shapes, popups, controls, and overlays
- Performant entity tracking with smooth animation, clustering, decorations, and interactivity
- Composable map styles: multiple base styles, raster/WMS overlays, light/dark themes
<SgbMapCenter="@(new Coordinate(49.6117, 6.1319))"Zoom="12"Style="@MapStyle.OpenFreeMap.Liberty"Height="400px"Width="100%">
<MapControls>
<NavigationMapControl />
<ScaleMapControl />
</MapControls>
<MapSources>
<GeoJsonSourceId="railway"Data="@_railwayGeoJson">
<LineLayerId="tracks"Color="@("#475569")"Width="2" />
</GeoJsonSource>
</MapSources>
<MapFeatures>
<MapMarkerId="luxembourg-city"Position="@(new Coordinate(49.6117, 6.1319))"Title="Luxembourg City"Popup="@_luxembourgPopup" />
</MapFeatures>
</SgbMap>
@code{privatereadonlystring_railwayGeoJson=""" { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [6.1290, 49.5895], [6.1334, 49.6006], [6.1365, 49.6112], [6.1330, 49.6219] ] } } ] }""";
privatereadonlyPopupOptions_luxembourgPopup=PopupOptions.FromText("Luxembourg City");
}