Map
CompleteA map drawn as plain SVG from GeoJSON. Regions can be coloured by a value, markers sit at coordinates, and the user can select a region, zoom and move. RayCraft ships no map data; the application supplies the GeoJSON.
Example

Parameters
| Parameter | Type | Description |
|---|---|---|
Class | string | Extra CSS classes added to the root element. |
Classes | int | Number of colour steps (1 to 9). |
Features | IEnumerable<MapFeature> | Shapes you built in code (instead of GeoJson). |
GeoJson | string | GeoJSON text with the shapes. |
Height | Double | Maximum height of the grid body, for example 24rem (default 28rem with VirtualScroll). |
KeyProperty | string | Property that holds the key of a region when the feature has no id. |
Label | string | Visible label text (charts: accessible name; IconButton: accessible name and tooltip). |
Markers | IEnumerable<MapMarker> | Points drawn as squares. |
MarkerSize | Double | Size of a marker in pixels of the drawing. |
NameProperty | string | Property that holds the name of a region. |
Projection | MapProjection | Mercator or Equirectangular. |
Selected | string | Key of the selected region. Use with @bind-Selected. |
ShowDataLabels | bool | Writes the value on each mark (bars, line points, pie slices). |
ShowExport | bool | Adds buttons that save the chart as a PNG or SVG image. |
ShowLegend | bool | Shows the clickable legend. |
Style | string | Inline style added to the root element. |
ValueFormat | string | Number format for axis and tooltips, e.g. N0 or P1. |
Values | IReadOnlyDictionary<string, Double> | Number per region key; colours the regions. |
Width | Double | Skeleton: any CSS length. Charts: drawing width in SVG units (the chart still scales to its container). |
Zoomable | bool | Adds zoom and move to the toolbar and the keyboard. |
Events
| Event | Type | Description |
|---|---|---|
OnFeatureClick | EventCallback<MapFeature> | Raised when a region is activated. |
OnMarkerClick | EventCallback<MapMarker> | Raised when a marker is activated. |
SelectedChanged | EventCallback<string> | Raised when a region is selected or cleared. |
Package
Map is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.
Send feedbackVersion 1.0.3