API Reference
Command
New-HtmlXLeafletMap
Creates a Leaflet map container.
Remarks
Part of the HtmlForgeX.PowerShell DSL.
Examples
Example 1: Leaflet map with a few markers.
New-HtmlXLeafletMap -Height "360px" -CenterLatitude 52.2297 -CenterLongitude 21.0122 -Zoom 5 {
New-HtmlXLeafletMarker -Latitude 52.2297 -Longitude 21.0122 -Tooltip "Warsaw"
New-HtmlXLeafletMarker -Latitude 50.0647 -Longitude 19.9450 -Tooltip "Krakow"
}
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
New-HtmlXLeafletMap [-Content <ScriptBlock>] [-CenterLatitude <double>] [-CenterLongitude <double>] [-DoubleClickZoom <bool>] [-Dragging <bool>] [-FitToContent <bool>] [-FitToMarkers <bool>] [-GeoGroup <string>] [-GeoSelectionTableMode <All|SourceOnly>] [-Height <string>] [-ScrollWheelZoom <bool>] [-Style <Default|Situation>] [-TileProvider <LeafletTileProvider>] [-Zoom <int>] [-ZoomControl <bool>] [<CommonParameters>]#Parameters
- Content ScriptBlock
- Scriptblock that adds overlays (markers, circles, lines).
- CenterLatitude double
- Center latitude.
- CenterLongitude double
- Center longitude.
- DoubleClickZoom bool
- Enable or disable double click zoom.
- Dragging bool
- Enable or disable dragging.
- FitToContent bool
- Fit view to all content (markers, shapes, geojson).
- FitToMarkers bool
- Fit view to markers.
- GeoGroup string
- Geo selection group id for cross-component sync.
- GeoSelectionTableMode GeoSelectionTableMode
- Controls geo selection table sync mode. Possible values: All, SourceOnly
- Possible values:
All,SourceOnly - Height string
- Map height (e.g., "360px").
- ScrollWheelZoom bool
- Enable or disable scroll wheel zoom.
- Style LeafletMapStyle
- Base map style preset. Possible values: Default, Situation
- Possible values:
Default,Situation - TileProvider LeafletTileProvider
- Optional tile provider preset.
- Zoom int
- Initial zoom level.
- ZoomControl bool
- Enable or disable zoom control buttons.
Outputs
HtmlForgeX.LeafletMap