Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.0.2 #170

Merged
merged 2 commits into from
Feb 9, 2024
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
6 changes: 4 additions & 2 deletions Our.Umbraco.GMaps.Core/Models/Legacy/LegacyAddress.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;
using Newtonsoft.Json;

namespace Our.Umbraco.GMaps.Models.Legacy
{
internal class LegacyAddress : Address
{
[JsonProperty("latlng")]
internal string LatLng { get; set; }
[JsonPropertyName("latlng")]
public string LatLng { get; set; }
}
}
3 changes: 3 additions & 0 deletions Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMap.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using Newtonsoft.Json;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;

namespace Our.Umbraco.GMaps.Models.Legacy
{
internal class LegacyMap
{
[DataMember(Name = "address")]
[JsonProperty("address")]
[JsonPropertyName("address")]
internal LegacyAddress Address { get; set; }

[DataMember(Name = "mapconfig")]
[JsonProperty("mapconfig")]
[JsonPropertyName("mapconfig")]
internal LegacyMapConfig MapConfig { get; set; }

}
Expand Down
9 changes: 6 additions & 3 deletions Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;
using Newtonsoft.Json;

namespace Our.Umbraco.GMaps.Models
{
internal class LegacyMapConfig : MapConfig
{
[JsonProperty("mapcenter")]
internal string MapCenter { get; set; }
[JsonPropertyName("mapcenter")]
public string MapCenter { get; set; }

[JsonProperty("zoom")]
internal new string Zoom { get; set; }
[JsonPropertyName("zoom")]
public new string Zoom { get; set; }
}
}
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>

<Version>3.0.1</Version>
<Version>3.0.2</Version>
<Authors>Arnold Visser</Authors>
<Company>Arnold Visser</Company>
<Description>Basic Google Maps with autocomplete property editor for Umbraco 8+. This package contains the Core DLL only.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
// Map the LatLng property.
model.Address.Coordinates = Location.Parse(intermediate.Address.LatLng);
model.MapConfig.CenterCoordinates = Location.Parse(intermediate.MapConfig.MapCenter);
model.MapConfig.Zoom = string.IsNullOrEmpty(intermediate.MapConfig.Zoom) ? 17 : Convert.ToInt32(intermediate.MapConfig.Zoom);
if (model.MapConfig.Zoom == 0)
{
model.MapConfig.Zoom = string.IsNullOrEmpty(intermediate.MapConfig.Zoom) ? 17 : Convert.ToInt32(intermediate.MapConfig.Zoom);
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<Version>3.0.1</Version>
<Version>3.0.2</Version>
<Authors>Arnold Visser</Authors>
<Company>Arnold Visser</Company>
<Description>Basic Google Maps with autocomplete property editor for Umbraco 8+</Description>
Expand Down
Loading