Skip to content

Commit

Permalink
Merge pull request #331 from vamsitp/advanced-marker-list
Browse files Browse the repository at this point in the history
Implementing AdvancedMarkerList based on MarkerList.
  • Loading branch information
valentasm1 authored Jun 10, 2024
2 parents 9290bae + 189aa9d commit 05e4ee7
Show file tree
Hide file tree
Showing 7 changed files with 723 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GoogleMapsComponents/GoogleMapsComponents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorGoogleMaps</PackageId>
<Version>4.3.0</Version>
<Version>4.3.1</Version>
<Authors>Rungwiroon</Authors>
<Company>QueueStack Solution</Company>
<Product>BlazorGoogleMaps</Product>
Expand Down
6 changes: 5 additions & 1 deletion GoogleMapsComponents/Maps/AdvancedMarkerView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.JSInterop;

using System.Threading.Tasks;

namespace GoogleMapsComponents.Maps;
Expand All @@ -9,9 +10,12 @@ namespace GoogleMapsComponents.Maps;
/// </summary>
public class AdvancedMarkerView : ListableEntityBase<AdvancedMarkerViewOptions>
{
// https://developers.google.com/maps/documentation/javascript/reference/3.55/advanced-markers
public const string GoogleMapAdvancedMarkerName = "google.maps.marker.AdvancedMarkerElement";

public static async Task<Marker> CreateAsync(IJSRuntime jsRuntime, AdvancedMarkerViewOptions? opts = null)
{
var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, "google.maps.marker.AdvancedMarkerView", opts);
var jsObjectRef = await JsObjectRef.CreateAsync(jsRuntime, GoogleMapAdvancedMarkerName, opts);
var obj = new Marker(jsObjectRef);
return obj;
}
Expand Down
Loading

0 comments on commit 05e4ee7

Please sign in to comment.