> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-udmap.md).

# New-UDMap

New-UDMap crea un componente mappa interattiva in PowerShell Universal per visualizzare marcatori, linee e poligoni con zoom, centro e controlli configurabili.

### Sinossi

Mappe interattive per visualizzare marcatori, linee e poligoni.

### Sintassi

```powershell
New-UDMap [[-Id] <String>] [[-Longitude] <Single>] [[-Latitude] <Single>] [[-Zoom] <Int32>] [[-Height] <String>] [[-Width] <String>] [-Content] <Endpoint> [[-ZoomControlPosition] <String>] [[-ScaleControlPosition] <String>] [-Animate] [[-MaxZoom] <Int32>] [<CommonParameters>]
```

### Descrizione

Mappe interattive per visualizzare marcatori, linee e poligoni.

### Parametri

#### -Id

L'ID del componente. Per impostazione predefinita è un GUID casuale.

```
Required?                    false
Position?                    1
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Longitude

La longitudine predefinita della mappa.

```
Required?                    false
Position?                    2
Default value                0
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Latitude

La latitudine predefinita della mappa.

```
Required?                    false
Position?                    3
Default value                0
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Zoom

Il livello di zoom predefinito della mappa.

```
Required?                    false
Position?                    4
Default value                0
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Height

L'altezza della mappa.

```
Required?                    false
Position?                    5
Default value                500px
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Width

La larghezza della mappa.

```
Required?                    false
Position?                    6
Default value                100%
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Content

Il blocco di script da chiamare per ottenere i dati della mappa.

```
Required?                    true
Position?                    7
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ZoomControlPosition

La posizione del controllo dello zoom. I valori validi sono topright, topleft, bottomright, bottomleft.

```
Required?                    false
Position?                    8
Default value                topright
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ScaleControlPosition

La posizione del controllo della scala. I valori validi sono topright, topleft, bottomright, bottomleft, hide.

```
Required?                    false
Position?                    9
Default value                bottomleft
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Animate

Anima la mappa al momento del caricamento.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -MaxZoom

Il livello di zoom massimo della mappa.

```
Required?                    false
Position?                    10
Default value                18
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Parametri comuni

Questo cmdlet supporta i parametri comuni: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable e OutVariable. Per maggiori informazioni, veda [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

### Esempi

#### Esempio 1: mappa di base

```powershell
New-UDMap -Content {
    New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
} -Latitude 43.52107 -Longitude -114.31644 -Zoom 13 -Height '25vh' -Id 'map1'
```

Questa mappa di base definisce un semplice livello di base utilizzando il tile server wmflabs.org. Può utilizzare il suo tile server personalizzato specificando un URL. La mappa è posizionata su Hailey, Idaho.

#### Esempio 2: controllo dei livelli

```powershell
New-UDMap -Content {
   New-UDMapLayerControl -Content {
        New-UDMapBaseLayer -Name 'Color' -Content {
            New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
        } -Checked
        New-UDMapOverlay -Name 'Marker' -Content {
            New-UDMapMarker -Latitude 51.505 -Longitude -0.09
        } -Checked
        New-UDMapOverlay -Name 'Marker 2' -Content {
            New-UDMapMarker -Latitude 51.555 -Longitude -0.00
        } -Checked
    }
} -Latitude 51.505 -Longitude -0.09 -Zoom 13 -Height '25vh' -Id 'map2'
```

Può abilitare il controllo dei livelli utilizzando il cmdlet New-UDMapLayerControl. Questa mappa definisce diversi livelli con componenti che può attivare e disattivare. Può selezionare un solo livello di base alla volta. I livelli di sovrapposizione della mappa possono essere attivati e disattivati.

#### Esempio 3: marcatori con popup

```powershell
New-UDMap -Content {
   New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
   New-UDMapMarker -Latitude "51.105" -Longitude "-0.09" -Popup (
      New-UDMapPopup -Content {
         New-UDAlert -Text "Hello"
      } -MinWidth 200
   )
} -Latitude 51.505 -Longitude -0.09 -Zoom 13 -Height '25vh' -Id 'map3'
```

Può aggiungere marcatori alla mappa utilizzando il cmdlet New-UDMapMarker.

#### Esempio 4: vettori

```powershell
New-UDMap -Content {
   New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
   New-UDMapVectorLayer -Circle -Radius 1000 -Latitude 51.505 -Longitude -0.09 -Color 'red' -FillColor 'blue' -FillOpacity 0.5
} -Latitude 51.505 -Longitude -0.09 -Zoom 13 -Height '25vh' -Id 'map4'
```

Può aggiungere vettori alla mappa utilizzando il cmdlet New-UDMapVectorLayer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/it/comandi-powershell/new-udmap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
