> 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/da/powershell-kommandoer/new-udmap.md).

# New-UDMap

New-UDMap opretter en interaktiv kortkomponent i PowerShell Universal til visning af markører, linjer og polygoner med konfigurerbar zoom, centrum og kontrolelementer.

### Synopsis

Interaktive kort til visning af markører, linjer og polygoner.

### Syntaks

```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>]
```

### Beskrivelse

Interaktive kort til visning af markører, linjer og polygoner.

### Parametre

#### -Id

Id for komponenten. Standardværdien er et tilfældigt GUID.

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

#### -Longitude

Standardlængdegraden for kortet.

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

#### -Latitude

Standardbreddegraden for kortet.

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

#### -Zoom

Standardzoomniveauet for kortet.

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

#### -Height

Højden på kortet.

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

#### -Width

Bredden på kortet.

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

#### -Content

Den scriptblok, der skal kaldes for at hente kortdataene.

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

#### -ZoomControlPosition

Zoomkontrollens placering. Gyldige værdier er topright, topleft, bottomright, bottomleft.

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

#### -ScaleControlPosition

Skalakontrolelementets placering. Gyldige værdier er topright, topleft, bottomright, bottomleft, hide.

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

#### -Animate

Animer kortet, når det indlæses.

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

#### -MaxZoom

Det maksimale zoomniveau for kortet.

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

#### Fælles parametre

Denne cmdlet understøtter de fælles parametre: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable og OutVariable. Se [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216) for at få flere oplysninger.

### Output

### Eksempler

#### Eksempel 1: grundlæggende kort

```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'
```

Dette grundlæggende kort definerer et simpelt basislag ved hjælp af fliseserveren wmflabs.org. De kan bruge Deres egen brugerdefinerede fliseserver ved at angive en URL. Kortet er placeret over Hailey, Idaho.

#### Eksempel 2: lagkontrol

```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'
```

De kan aktivere lagkontrollen ved hjælp af cmdletten New-UDMapLayerControl. Dette kort definerer flere lag med komponenter, som De kan slå til og fra. De kan kun have ét basislag valgt ad gangen. Overlejringslag på kortet kan slås til og fra.

#### Eksempel 3: markører med 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'
```

De kan føje markører til kortet ved hjælp af cmdletten New-UDMapMarker.

#### Eksempel 4: vektorer

```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'
```

De kan tilføje vektorer til kortet ved hjælp af cmdletten 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/da/powershell-kommandoer/new-udmap.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
