Skip to content

Extras

Map

Bit.BlazorUI.ExtrasGeoMapMaps

BitMap is a provider-pluggable interactive map. One API drives markers, vector shapes, GeoJSON and tile overlays across seven backends - Leaflet, MapLibre GL, Mapbox GL, OpenLayers, ArcGIS, Azure Maps and CesiumJS - and adds what they leave out, uniformly: two-way camera binding, marker clustering, Blazor-rendered popups, cooperative gestures, a keyboard and screen-reader story, loading states and theming that follows the app.

Camera & interaction

Moving the camera and the map's events, switching gestures off, custom controls over the map, and the geographic helpers.

Camera & events

FlyTo animates and SetZoom/SetView/PanTo move the camera; under a reduced-motion preference a flight jumps instead (RespectReducedMotion). Locate asks the browser for the visitor's position. OnClick, OnDoubleClick and OnContextMenu report a coordinate; OnViewChanged fires once a pan or zoom settles.

Use the arrow keys to pan the map, plus and minus to zoom, and Escape to leave the map.
Loading map…

Click, double-click or right-click the map, or pan it.

Interaction

The provider's toggles switch individual gestures off, add a scale bar or keep the view inside MaxBounds. Disabled makes the whole map inert - out of the tab order and away from the pointer - and dims it.

Use the arrow keys to pan the map, plus and minus to zoom, and Escape to leave the map.
Loading map…

Custom controls

ChildContent floats above the map; only its children take the pointer. Build controls from ZoomIn, ZoomOut, PanBy and ToggleFullscreen - the pan buttons are the single-pointer alternative to dragging WCAG 2.5.7 asks for, and fullscreen takes the overlay with it. The provider's own controls draw above the overlay, which starts its children below the ones in its top-start corner. This toolbar replaces Leaflet's zoom buttons, so it turns ZoomControl off, and sits on the end side with margin-inline-start: auto.

Use the arrow keys to pan the map, plus and minus to zoom, and Escape to leave the map.
Loading map…

Geographic helpers

BitMapLatLng measures (DistanceTo), travels (Offset) and frames a radius (ToBounds); BitMapLatLngBounds builds, tests, grows and pads boxes, across the antimeridian too. FitBounds takes a maxZoom ceiling, and Project gives a coordinate's pixel position in the map. Click the map to drop a probe.

Use the arrow keys to pan the map, plus and minus to zoom, and Escape to leave the map.
Loading map…

Click the map to drop a probe.

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.