I surrender...why are my map markers not showing?

Hello,

Probably a really simple fix but I can't figure out why my map markers aren't loading dynamically.

Here is my razor code.

<RadzenGoogleMap Data=@libertyBizList Style="height:430px;" Zoom=@zoom Center=@startingPosition MapClick=@OnMapClick MarkerClick=@OnMarkerClick />

In code I THINK I am creating the markers list properly but clearly I'm doing something wrong.

//load map data
zoom = 4;
startingPosition = new GoogleMapPosition() { Lat = 40.0000, Lng = -95.0000 };
var den = new RadzenGoogleMapMarker { Title = "Denver", Label = "Denverz", Visible = true, Position = new GoogleMapPosition { Lat = 104.9903, Lng = 39.7392 } };
libertyBizList.Add(den);

I'm just trying to get a marker to load. Of course once this is working I will load hundreds of markers from a datasource.

BTW yes if I manually add a marker in razor it will show.

Any input would be greatly appreciated.

TIA

The following seems to work fine for me:

<RadzenGoogleMap style="height: 400px" Data=@markers></RadzenGoogleMap>

@code {
    IList<RadzenGoogleMapMarker> markers = new List<RadzenGoogleMapMarker>();

    protected override void OnInitialized()
    {
        markers.Add(new RadzenGoogleMapMarker {Position = new GoogleMapPosition() { Lat = 40.4168, Lng = -3.7038 }, Title="Madrid", Label="Madrid"});
        base.OnInitialized();
    }
}

@korchev

Yup after a nights sleep I see a couple things from your sample I had missed and now everything is working.

Thank You