Skip to content

Commit

Permalink
Updated the Limbo.Umbraco.MigrationsClient
Browse files Browse the repository at this point in the history
  • Loading branch information
abjerner committed Sep 11, 2023
1 parent af3ac13 commit 317164d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Limbo.Umbraco.MigrationsClient.Models.Terraform;
using Limbo.Umbraco.MigrationsClient.Models.Terratype;
using Newtonsoft.Json;

namespace Limbo.Umbraco.Migrations.Converters.Models.GMaps;
Expand All @@ -18,19 +18,19 @@ public class GoogleMapsModel {
[JsonProperty("mapconfig")]
public GoogleMapsConfig MapsConfig { get; set; } = new();

[return: NotNullIfNotNull("terraform")]
public static GoogleMapsModel? Convert(TerraformModel? terraform) {
[return: NotNullIfNotNull("terratype")]
public static GoogleMapsModel? Convert(TerratypeModel? terratype) {

if (terraform is null) return null;
if (terratype is null) return null;

GoogleMapsModel maps = new() {
Address = new GoogleMapsAddress {
FullAddress = terraform.Lookup
FullAddress = terratype.Lookup
},
MapsConfig = new GoogleMapsConfig {
Zoom = terraform.Zoom ?? 17,
Zoom = terratype.Zoom ?? 17,
MapType = GoogleMapsRoadType.Roadmap,
Coordinates = new GoogleMapsPoint(terraform.Position.Latitude, terraform.Position.Longitude)
Coordinates = new GoogleMapsPoint(terratype.Position.Latitude, terratype.Position.Longitude)
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<!-- Include NuGet dependencies -->
<ItemGroup>
<PackageReference Include="Limbo.Umbraco.MigrationsClient" Version="1.0.4" />
<PackageReference Include="Limbo.Umbraco.MigrationsClient" Version="1.0.5" />
<PackageReference Include="Skybrud.Essentials" Version="1.1.51" />
<PackageReference Include="Skybrud.Umbraco.GridData" Version="5.0.3" />
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0,12.0)" />
Expand Down

0 comments on commit 317164d

Please sign in to comment.