Lumeo

Map

Interactive geographic map with declarative markers. Powered by MapLibre GL — open-source, no API key required. Ships with named tile presets including Auto, which follows the site theme automatically, and accepts raw style.json URLs.

Installation

dotnet add package Lumeo.Maps

One-time app setup (AddLumeo(), CSS & JS) is covered in the installation guide.

Usage

@using Lumeo

<Map />

When to Use

  • Locating addresses, stores, or events on a slippy map
  • Visualizing point data sets with up to a few hundred markers
  • Pickers that capture a lat/lon from a click anywhere on the map
  • Read-only embeds in dashboards, contact pages, and event details

API Reference

Map

Prop Type Default Description
Center(double Lat, double Lon)(51.0, 10.4)Map center. Two-way bindable.
Zoomint5MapLibre zoom level (0–22). Two-way bindable.
Heightstring"400px"CSS height applied to the container.
TileLayerstring"Auto"Tile preset or style URL. Auto (default) picks Positron (light) or DarkMatter (dark) based on the host page theme and swaps automatically when the user toggles dark mode. Other presets: Positron, DarkMatter, Voyager, CartoLight, CartoDark, OpenStreetMap, Satellite, Terrain. Also accepts a raw MapLibre style.json URL.
ZoomControlbooltrueShow MapLibre's +/− zoom buttons.
AttributionbooltrueShow the tile-provider attribution control. Tile providers' terms typically require attribution to stay visible — leave on.
ScrollWheelZoombooltrueEnable scroll-wheel zoom. Set to false in dense scrollable layouts to avoid trapping page scroll.
OnClickEventCallback<(double, double)>Fires with (lat, lon) when the user clicks the map.
ClusterboolfalseEnable MapLibre-native marker clustering. Markers merge into count circles when close together.
GeolocateboolfalseShow a "My location" button (browser Geolocation API).
FullscreenboolfalseShow a fullscreen toggle button.
ScaleboolfalseShow a metric scale bar in the bottom-left corner.
SearchboolfalseShow a Nominatim-backed geocoder search bar in the top-left.
Layersstring[]?nullPreset names or { name, url } objects rendered as a chip-style layer switcher in the top-right.
Projectionstring"mercator"MapLibre projection. "mercator" for a standard flat web map or "globe" for a 3-D spherical view (blends back to mercator above zoom 4).
AutoFitBoundsboolfalseWhen true, the map automatically fits its viewport to include all registered markers and shapes after the first render.
ChildContentRenderFragment?nullPlace MapMarker, MapPolyline, MapPolygon, MapCircle, MapArc, MapHeatmap, and MapPopup children here.
OverlayRenderFragment?nullContent rendered as an absolutely-positioned layer inside the map (z-index 10). Use absolute-position classes on the child to place chips, legends, or badges in any corner.
Classstring?nullExtra CSS classes on the root container.

MapMarker

Prop Type Default Description
Latdouble0Latitude in decimal degrees.
Londouble0Longitude in decimal degrees.
Titlestring?nullTooltip on hover and fallback popup body.
IconUrlstring?nullBitmap icon URL (32×32 anchored bottom-center). When set, overrides Variant / Color / Icon.
Variantstring"Default"Visual style of the auto-generated marker: Default (filled circle), Outline, Pin (classic teardrop), or Dot (minimal).
Colorstring?nullOverride the marker fill. Friendly names (red, green, yellow, blue, purple, pink, orange, teal, gray, slate) or any CSS color. Null = theme primary.
Labelstring?nullText label rendered above the marker. Always visible by default; set LabelHoverOnly to show only on hover.
LabelHoverOnlyboolfalseWhen true, the Label is hidden until the marker is hovered. Useful on dense maps to reduce visual noise.
IconRenderFragment?nullInline content inside the marker circle — a letter, number, or <Blazicon> SVG.
PopupRenderFragment?nullRich popup body. Falls back to Title when null. Styled as a shadcn card via map.css.
OnClickEventCallbackFires when the marker icon is clicked.
DraggableboolfalseAllow the user to drag the marker to a new position.
OnDragEndEventCallback<(double, double)>Fires with the new (lat, lon) after the user finishes dragging. Only fires when Draggable is true.

MapHeatmap

Prop Type Default Description
PointsIEnumerable<(double Lat, double Lon, double Intensity)>requiredHeat point collection. Intensity should be in 0–1; use 1 for uniform weight.
Radiusint20Pixel radius of each point at full zoom. Scales with zoom automatically.
Opacitydouble0.8Overall opacity of the heatmap layer (0–1).
ColorRampobject[]?nullCustom color ramp as alternating stop, cssColor values (e.g. new object[] { 0, "transparent", 1, "red" }). Defaults to a blue→cyan→yellow→red ramp.

MapPolyline

Prop Type Default Description
PointsIEnumerable<(double Lat, double Lon)>requiredOrdered list of coordinates the polyline visits.
Colorstring?nullStroke color. Friendly name or CSS color. Null = theme primary.
Weightdouble3Stroke width in pixels.
Opacitydouble0.9Stroke opacity (0–1).
DashedboolfalseConvenience toggle to render a standard "6 4" dash pattern. Ignored when DashArray is set explicitly.
DashArraystring?nullCustom SVG dash pattern (e.g. "6 4"). Null = solid.
HoverColorstring?nullStroke color applied on hover. Null = no hover highlight.
HoverWeightdouble?nullStroke width applied on hover. Null = same as Weight.
AnimateboolfalseAnimate the line drawing on first render (draws from start to end over ~1 s).
Tooltipstring?nullHover tooltip text.
PopupHtmlstring?nullHTML string rendered inside a click popup.

MapPolygon

Prop Type Default Description
PointsIEnumerable<(double Lat, double Lon)>requiredOrdered points forming the polygon ring. First and last are connected automatically.
Colorstring?nullBorder stroke color.
FillColorstring?nullFill color. Null = same as Color.
Weightdouble2Border stroke width in pixels.
Opacitydouble0.9Border stroke opacity (0–1).
FillOpacitydouble0.2Fill opacity (0–1).
Tooltipstring?nullHover tooltip text.
PopupHtmlstring?nullHTML string rendered inside a click popup.

MapCircle

Prop Type Default Description
Center(double Lat, double Lon)(0, 0)Circle center in decimal degrees.
RadiusMetersdouble100Radius in real-world meters. Pixel size scales with zoom.
Colorstring?nullBorder stroke color.
FillColorstring?nullFill color. Null = same as Color.
Weightdouble2Border stroke width in pixels.
Opacitydouble0.9Border stroke opacity (0–1).
FillOpacitydouble0.2Fill opacity (0–1).
Tooltipstring?nullHover tooltip text.
PopupHtmlstring?nullHTML string rendered inside a click popup.

MapArc

Prop Type Default Description
From(double Lat, double Lon)(0, 0)Arc start point.
To(double Lat, double Lon)(0, 0)Arc end point.
Curvaturedouble0.25Height of the arc above the straight chord as a fraction of chord length. 0 = straight line, 1 = full-semicircle bulge.
Colorstring?nullStroke color. Friendly name or CSS color. Null = theme primary.
Weightdouble2.5Stroke width in pixels.
Opacitydouble0.9Stroke opacity (0–1).
DashedbooltrueArcs are dashed by default. Set to false for a solid line. Ignored when DashArray is set explicitly.
DashArraystring?"5 6"Custom SVG dash pattern. Overrides Dashed.
HoverColorstring?nullStroke color applied on hover. Null = no hover highlight.
HoverWeightdouble?nullStroke width applied on hover. Null = same as Weight.
AnimateboolfalseAnimate the arc drawing on first render (draws from start to end over ~1 s).
Tooltipstring?nullHover tooltip text.
PopupHtmlstring?nullHTML string rendered inside a click popup.

MapPopup

Prop Type Default Description
Latdouble0Latitude of the popup anchor point.
Londouble0Longitude of the popup anchor point.
IsOpenboolfalseWhether the popup is visible. Two-way bindable via IsOpenChanged.
CloseButtonbooltrueShow a close (×) button inside the popup.
CloseOnClickbooltrueClose the popup when the user clicks the map background.
Htmlstring?nullHTML string for the popup body. Overrides ChildContent.
ChildContentRenderFragment?nullRich popup body as a Blazor render fragment.

MapLegend / MapLegendItem

Prop Type Default Description
MapLegend.Titlestring?nullOptional heading shown above the legend rows.
MapLegend.Positionstring"bottom-left"Corner shorthand: "top-left", "top-right", "bottom-left", "bottom-right". Or pass Tailwind classes via Class.
MapLegendItem.Colorstring?nullDot fill color. Friendly names (red, green, blue, teal, etc.) or any CSS color.
MapLegendItem.Labelstring?nullText label shown beside the colored dot.