<commit_before>
# Mapsui MAUI getting started

### Step 1
Start a new MAUI application in Visual Studio.

### Step 2
In the package manager console type:
```console
PM> Install-Package Mapsui.Maui -pre
```

### Step 3
In MauiProgram.cs add .UseSkiaSharp() to the builder like this:
```csharp
builder
  .UseMauiApp<App>()
  .UseSkiaSharp()
  .ConfigureFonts(fonts =>  
```
This is because Mapsui depends on SkiaSharp which needs this call. We hope that this will not be necessary in a future version of Mapsui.Maui. Without this line the app will crash with this exception: "Catastrophic failure (0x8000FFFF (E_UNEXPECTED))".

### Step 4
In MainPage.xaml.cs replace the constuctor with this code:

```csharp
public MainPage()
{
  InitializeComponent();
  
  var mapControl = new Mapsui.UI.Maui.MapControl();
  mapControl.Map?.Layers.Add(Mapsui.Tiling.OpenStreetMap.CreateTileLayer());
  Content = mapControl;
}
```

### Step 5
Run it and you should see a map of the world.<commit_msg>Update getting-started-maui.md<commit_after>
# Mapsui MAUI getting started

### Step 1
Start a new MAUI application in Visual Studio.

### Step 2
In the package manager console type:
```console
PM> Install-Package Mapsui.Maui -pre
```

### Step 3
In MauiProgram.cs add .UseSkiaSharp() to the builder like this:
```csharp
builder
  .UseMauiApp<App>()
  .UseSkiaSharp()
  .ConfigureFonts(fonts =>  
```csharp
and add namespace 'SkiaSharp.Views.Maui.Controls.Hosting':

```
using SkiaSharp.Views.Maui.Controls.Hosting;
```

This is because Mapsui depends on SkiaSharp which needs this call. We hope that this will not be necessary in a future version of Mapsui.Maui. Without this line the app will crash with this exception: "Catastrophic failure (0x8000FFFF (E_UNEXPECTED))".

### Step 4
In MainPage.xaml.cs replace the constuctor with this code:

```csharp
public MainPage()
{
  InitializeComponent();
  
  var mapControl = new Mapsui.UI.Maui.MapControl();
  mapControl.Map?.Layers.Add(Mapsui.Tiling.OpenStreetMap.CreateTileLayer());
  Content = mapControl;
}
```

### Step 5
Run it and you should see a map of the world.
{'fraction_non_alphanumeric': 0.10794103661436044, 'fraction_numerical': 0.009510223490252021, 'mean_word_length': 4.493472584856397, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4881562', 'n_tokens_mistral': 736, 'n_tokens_neox': 676, 'n_words': 241}