rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
309 stars 99 forks source link

AdvancedMapMarker Microsoft.JSInterop.JSException: function not found #329

Closed IsmaelE77 closed 1 month ago

IsmaelE77 commented 1 month ago

hello , thank you for you efforts in this library i ran into a problem when i tried to implement the following example in my project: https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/AdvancedMarkerViewPage.razor but adding marker in : https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/MapMarker.razor.cs#L244 works , i only encountered the problem here but i get this error when press on add marker: blazor.web.js:1 [2024-05-31T07:33:07.680Z] Error: Microsoft.JSInterop.JSException: function not found Error: function not found at stringToFunction (http://localhost:5297/_content/BlazorGoogleMaps/js/objectManager.js:11:19) at Object.createObject (http://localhost:5297/_content/BlazorGoogleMaps/js/objectManager.js:365:35) at http://localhost:5297/_framework/blazor.web.js:1:3244 at new Promise (<anonymous>) at y.beginInvokeJSFromDotNet (http://localhost:5297/_framework/blazor.web.js:1:3201) at fn._invokeClientMethod (http://localhost:5297/_framework/blazor.web.js:1:62914) at fn._processIncomingData (http://localhost:5297/_framework/blazor.web.js:1:60389) at connection.onreceive (http://localhost:5297/_framework/blazor.web.js:1:54030) at i.onmessage (http://localhost:5297/_framework/blazor.web.js:1:82175) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at GoogleMapsComponents.Helper.MyInvokeAsync[TRes](IJSRuntime jsRuntime, String identifier, Object[] args) at GoogleMapsComponents.JsObjectRef.CreateAsync(IJSRuntime jsRuntime, Guid guid, String functionName, Object[] args) at GoogleMapsComponents.Maps.AdvancedMarkerView.CreateAsync(IJSRuntime jsRuntime, AdvancedMarkerViewOptions opts) at ecommWebApp.Components.Pages.AdvancedMapMarker.AddMarker() in /home/ismael/ecommwebapp/ecommWebApp/ecommWebApp/Components/Pages/AdvancedMapMarker.razor:line 46 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

advancedMapMarker:1 Uncaught (in promise) {message: 'A listener indicated an asynchronous response by r…age channel closed before a response was received'} message : "A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received" [[Prototype]] : Object

IsmaelE77 commented 1 month ago

i apologize, i did not notice that it only works in beta