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.3 #185

Merged
merged 7 commits into from
Dec 14, 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid

- name: Upload artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: nuget
path: ${{ env.OUTPUT_PATH }}
4 changes: 2 additions & 2 deletions Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ internal class LegacyMap
[DataMember(Name = "address")]
[JsonProperty("address")]
[JsonPropertyName("address")]
internal LegacyAddress Address { get; set; }
public LegacyAddress Address { get; set; }

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

}
}
41 changes: 40 additions & 1 deletion Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,47 @@
[JsonPropertyName("mapcenter")]
public string MapCenter { get; set; }

[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public new string Zoom { get; set; }

[JsonProperty("zoom")]
[JsonPropertyName("zoom")]
public new string Zoom { get; set; }
public object _zoom
{
get
{
if (int.TryParse(Zoom, out var intValue)) return intValue;
return this.Zoom;
}
set { this.Zoom = value.ToString(); }
}

[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public new MapType MapType { get; set; }

[JsonProperty("maptype")]
[JsonPropertyName("maptype")]
public new object _mapType

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.

Check warning on line 34 in Our.Umbraco.GMaps.Core/Models/Legacy/LegacyMapConfig.cs

View workflow job for this annotation

GitHub Actions / build (7.x)

The member 'LegacyMapConfig._mapType' does not hide an accessible member. The new keyword is not required.
{
get
{
return this.MapType;
//return base.MapType?.ToString().ToLower();
}
set {
this.MapType = value switch
{
"roadmap" => Models.MapType.Roadmap,
"satellite" => Models.MapType.Satellite,
"hybrid" => Models.MapType.Hybrid,
"terrain" => Models.MapType.Terrain,
"styled_map" => Models.MapType.StyledMap,
"styled map" => Models.MapType.StyledMap,
_ => Models.MapType.Roadmap,
};
}
}
}
}
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps.Core/Models/MapType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public enum MapType
[EnumMember(Value = "terrain")]
Terrain,
[EnumMember(Value = "styled_map")]
StyledMap
StyledMap
}
}
4 changes: 2 additions & 2 deletions Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>

<Version>3.0.2</Version>
<Version>3.0.3</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 @@ -54,6 +54,10 @@ public override object ConvertIntermediateToObject(IPublishedElement owner, IPub
{
model.MapConfig.Zoom = string.IsNullOrEmpty(intermediate.MapConfig.Zoom) ? 17 : Convert.ToInt32(intermediate.MapConfig.Zoom);
}
if (model.MapConfig.MapType == null)
{
model.MapConfig.MapType = intermediate.MapConfig.MapType;
}
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms" Version="13.0.1" />
<PackageReference Include="Umbraco.Cms" Version="13.5.2" />

<!-- Force Windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older Windows 10 and most, if not all, Windows Server editions will run NLS -->
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
Expand Down
4 changes: 2 additions & 2 deletions Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<StaticWebAssetBasePath>App_Plugins/Our.Umbraco.GMaps</StaticWebAssetBasePath>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<ContentTargetFolders>.</ContentTargetFolders>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<Version>3.0.2</Version>
<Version>3.0.3</Version>
<Authors>Arnold Visser</Authors>
<Company>Arnold Visser</Company>
<Description>Basic Google Maps with autocomplete property editor for Umbraco 8+</Description>
Expand Down
3 changes: 2 additions & 1 deletion Our.Umbraco.GMaps/wwwroot/js/maps.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ angular.module('umbraco').controller('GMapsMapsController', ['$scope', '$element

var mapOptions = {
zoom: vm.zoomLevel,
mapId: 'DEMO_MAP_ID',
center: latLngMapCenter,
streetViewControl: false, // Fix for #15
gestureHandling: 'cooperative',
Expand All @@ -281,7 +282,7 @@ angular.module('umbraco').controller('GMapsMapsController', ['$scope', '$element

vm.map.setMapTypeId(mapTypeId)

vm.marker = new google.maps.Marker({
vm.marker = new google.maps.marker.AdvancedMarkerElement({
position: latLng,
title: 'Marker',
map: vm.map,
Expand Down
2 changes: 1 addition & 1 deletion Our.Umbraco.GMaps/wwwroot/js/maps.factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

return {
initialize: function (apiKey) {
var url = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey + '&libraries=places&callback=googleMapsInitialized';
var url = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey + '&libraries=places&libraries=marker&callback=googleMapsInitialized&v=weekly';
if (!scriptExists(url)) {
var script = document.createElement('script');
script.async = true;
Expand Down
Loading