I have this issue: I load a page with a radzenmap and the click on the marker works ok. If I change page and return to the map click doesn't work anymore and the icon on the right are "silly". Reloading the page (F5), it works again.
Repo:
(put a valid apikey in appsettings.json)
Page:
@page "/map"
@using Radzen4Support.Models
@using System.Text.Json
@rendermode InteractiveServer
@* @rendermode @(new InteractiveServerRenderMode(prerender:false)) *@
@inject IJSRuntime JSRuntime
@inject IConfiguration Configuration
<h3>Map</h3>
<p>@Configuration["GoogleApiKey"]</p>
@if (Stations != null)
{
<RadzenGoogleMap @ref="map" style="height: 600px" Options=@(new Dictionary<string, object> { { "disableDoubleClickZoom", true } }) MarkerClick="MarkerClick"
Zoom="9" Center="@(new GoogleMapPosition() { Lat = 46.49868414506874, Lng = 11.353422303037982 })" ApiKey="@Configuration["GoogleApiKey"]">
<Markers>
@foreach (var item in Stations)
{
<RadzenGoogleMapMarker Title="@($"{item.Id} - {item.Name}")" Position=@(new GoogleMapPosition() { Lat = (double)item.Latitude, Lng = (double)item.Longitude }) />
This file has been truncated. show original
Moreover on another project sometimes I have this message from devconsole; the apikey is correct and managed like in the above repo (but I tried also putting directly in the control)
(Meteo-AltoAdige.it - Rilevazioni metereologiche attuali e storiche della Provincia di Bolzano )
Video that reproduce the issue:
https://drive.google.com/file/d/1AO0-Z0RZBmFLFbxNJvXaHT8LOKzWwibU/view?usp=sharing
enchev
December 28, 2023, 11:26pm
2
This indicates that there is JavaScript error - you can check your browser console for details.
Please check the video... I shot with developer console open to show you there aren't
enchev
December 29, 2023, 6:21am
4
I'm afraid that I'm unable to reproduce such problem on our demos and I don’t know what can cause it.
thanks anyway...
BTW your sample is broken
mumfie
December 29, 2023, 2:30pm
6
Have you tried using a standard webpage for the map?
Seems to work okay after navigation off page then back again when I tested it using net7 blazor server.
Not tried, because I need in a .net 8 webapp
in my case is a server page with prerender = false