Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 0 additions & 221 deletions docs/specs/XamlXCode.md

This file was deleted.

1 change: 0 additions & 1 deletion eng/pipelines/ci-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ extends:
onlyAndroidPlatformDefaultApis: true
skipAndroidEmulatorImages: true
skipAndroidCreateAvds: true
skipSimulatorSetup: true
skipProvisioning: true
skipXcode: false
base64Encode: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
Text="Add Pin"
Clicked="OnAddPinClicked" />
<Button
Text="Move Pin"
Clicked="OnMovePinClicked"/>
<Button
Text="Remove Pin"
Clicked="OnRemovePinClicked" />
<Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using System;
using Microsoft.Maui.Controls.Maps;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Maps;
using Position = Microsoft.Maui.Devices.Sensors.Location;

namespace Maui.Controls.Sample.Pages.MapsGalleries
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MapPinsGallery
{
const double DefaultMapRadiusKm = 5.0;
readonly Random _locationRandomSeed = new();
int _locationIncrement = 0;

Expand Down Expand Up @@ -83,11 +81,6 @@ void OnAddPinClicked(object sender, EventArgs e)
AddPin();
}

void OnMovePinClicked(object sender, EventArgs e)
{
MovePin();
}

void OnRemovePinClicked(object sender, EventArgs e)
{
if (pinsMap.Pins.Count > 0)
Expand All @@ -107,34 +100,13 @@ void OnAdd10PinsClicked(object sender, EventArgs e)

void AddPin()
{
var randomLocation = GetRandomLocation();
var pin = new Pin
pinsMap.Pins.Add(new Pin()
{
Label = $"Location {_locationIncrement++}",
Location = randomLocation,
};
pinsMap.Pins.Add(pin);
MoveMapTo(randomLocation);
}

void MovePin()
{
if (pinsMap.Pins.Count == 0)
{
return;
}

var randomLocation = GetRandomLocation();
pinsMap.Pins[0].Location = randomLocation;
MoveMapTo(randomLocation);
Location = _randomLocations[_locationRandomSeed.Next(0, _randomLocations.Length)],
});
}

Position GetRandomLocation() =>
_randomLocations[_locationRandomSeed.Next(_randomLocations.Length)];

void MoveMapTo(Position location) =>
pinsMap.MoveToRegion(MapSpan.FromCenterAndRadius(location, Distance.FromKilometers(DefaultMapRadiusKm)));

void OnMapClicked(object sender, MapClickedEventArgs e)
{
DisplayAlertAsync("Map", $"Map {e.Location.Latitude}, {e.Location.Longitude} clicked.", "Ok");
Expand Down
Loading
Loading