HtmlForgeX

API Reference

Command

New-HtmlXLeafletMap

Namespace HtmlForgeX.PowerShell
Outputs
HtmlForgeX.LeafletMap

Creates a Leaflet map container.

Remarks

Part of the HtmlForgeX.PowerShell DSL.

Examples

Authored help example

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 optionalposition: 0pipeline: false
Scriptblock that adds overlays (markers, circles, lines).
CenterLatitude double optionalposition: namedpipeline: false
Center latitude.
CenterLongitude double optionalposition: namedpipeline: false
Center longitude.
DoubleClickZoom bool optionalposition: namedpipeline: false
Enable or disable double click zoom.
Dragging bool optionalposition: namedpipeline: false
Enable or disable dragging.
FitToContent bool optionalposition: namedpipeline: false
Fit view to all content (markers, shapes, geojson).
FitToMarkers bool optionalposition: namedpipeline: false
Fit view to markers.
GeoGroup string optionalposition: namedpipeline: false
Geo selection group id for cross-component sync.
GeoSelectionTableMode GeoSelectionTableMode optionalposition: namedpipeline: falsevalues: 2
Controls geo selection table sync mode. Possible values: All, SourceOnly
Possible values: All, SourceOnly
Height string optionalposition: namedpipeline: false
Map height (e.g., "360px").
ScrollWheelZoom bool optionalposition: namedpipeline: false
Enable or disable scroll wheel zoom.
Style LeafletMapStyle optionalposition: namedpipeline: falsevalues: 2
Base map style preset. Possible values: Default, Situation
Possible values: Default, Situation
TileProvider LeafletTileProvider optionalposition: namedpipeline: false
Optional tile provider preset.
Zoom int optionalposition: namedpipeline: false
Initial zoom level.
ZoomControl bool optionalposition: namedpipeline: false
Enable or disable zoom control buttons.

Outputs

HtmlForgeX.LeafletMap