Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLMap

Namespace PSWriteHTML

Creates a new HTML map with specified settings.

Remarks

This function creates a new HTML map with customizable settings such as map type, legend options, colors, and titles.

Examples

Authored help example

EXAMPLE 1


New-HTMLMap -Map 'World_Countries' -AnchorName 'Map1' -ShowAreaLegend -AreaTitle 'Country Population' -PlotTitle 'Population Density' -FillColor 'blue' -StrokeColor 'black' -StrokeWidth 2
        

Creates a new HTML map displaying world countries with area legend showing country population and plot legend showing population density. The map areas are filled with blue color, have black borders, and a border width of 2.

EXAMPLE 2


$CustomSettings = {
    # Custom map settings here
}
New-HTMLMap -Map 'Usa_States' -AnchorName 'Map2' -ShowPlotLegend -PlotTitle 'Economic Data' -FillColor 'green' -StrokeColor 'gray' -StrokeWidth 1 -MapSettings $CustomSettings
        

Creates a new HTML map displaying USA states with plot legend showing economic data. The map areas are filled with green color, have gray borders, and a border width of 1. Custom map settings are applied using the script block $CustomSettings.

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-HTMLMap [-AnchorName <String>] [-AreaTitle <String>] [-FillColor <String>] -Map <Poland|Usa_States|World_Countries|European_Union> [-MapSettings <ScriptBlock>] [-PlotTitle <String>] [-ShowAreaLegend] [-ShowPlotLegend] [-StrokeColor <String>] [-StrokeWidth <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AnchorName String optionalposition: 2pipeline: False
Specifies the name of the HTML anchor element where the map will be rendered.
AreaTitle String optionalposition: 3pipeline: False
Specifies the title for the area legend.
FillColor String optionalposition: 5pipeline: Falsealiases: SliceColor
Specifies the color to fill the map areas.
Map String requiredposition: 1pipeline: Falsevalues: 4
Specifies the type of map to be displayed. Valid values are 'Poland', 'Usa_States', 'World_Countries', or 'European_Union'.
Possible values: Poland, Usa_States, World_Countries, European_Union
MapSettings ScriptBlock optionalposition: 0pipeline: False
A script block containing custom map settings to be applied.
PlotTitle String optionalposition: 4pipeline: False
Specifies the title for the plot legend.
ShowAreaLegend SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate whether to display the area legend on the map.
ShowPlotLegend SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate whether to display the plot legend on the map.
StrokeColor String optionalposition: 6pipeline: False
Specifies the color of the map area borders.
StrokeWidth Nullable`1 optionalposition: 7pipeline: False
Specifies the width of the map area borders.