-
Notifications
You must be signed in to change notification settings - Fork 19
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
Microsoft.Maps.NetworkCallbacks.f_logCallbackRequest is not a function #56
Comments
Possible solution, that seems working for me. For So if you change the props of When my component loads, it makes several API requests to my servers and Bing maps. At the same time, I'm initializing the bing maps in my component. When my API request's response arrives back before the bing maps initialize and changes the state, that eventually changes the pushPins prop of the bing maps. This throws an error as below.
and
To fix this error, I made very simple changes.
This seems working for me, for now. let me know whether this fixes your issue. Good luck! |
I am having the same issue. Just started this week. Thanks for your suggestion but it is still not working for me. Would love any suggestions. What version are you on? |
@bnewman20 did you take a look at @selcuktoklucu 's solution? Is your situation similar? |
@CynicalDuck any luck with @selcuktoklucu 's suggestion? |
@milespratt The 2 Types of errors I am seeing: mapcontrol?callback=makeMap:11 My code is:
|
Thanks for the info @bnewman20! Would you mind sharing a bit more of your code? I'd like to see how you're rendering the bingmaps component. |
Of course! Thank you!
|
I'm experiencing the same issue. Any update on this? |
@kyleduvall Can you please share your code? Hoping to take a look this week. @bnewman20 sorry for the delay, I'll get back to you soon. |
Unfortunately, I can't share the code as I no longer have access to it. I was able to work around the issue by using the solution suggested in this SO post instead of using this package. Though, I did note that I kept seeing this callback error in my console, however, the map rendered properly. |
I'm expreiencing the same issue when I use more than one instance of Bingmapsreact. Unfortunately the workaround proposed by @selcuktoklucu doesn't work Code looks like:
|
This commit addresses the asynchronous nature of the Bing Maps API, which may lead to issues when location-related functionality is invoked before the map has finished its initial load. To mitigate this, we have implemented a solution that ensures all location-related actions wait for the map to become ready. Changes made: - Added a check using the 'bingMapReady' state variable to determine if the map has finished loading. - Updated the 'useEffect' to call 'getLocationAndSendOnMapReady' only when 'bingMapReady' is true, ensuring that location-related actions wait for the map to be fully initialized. We recommend that all teams follow this structure to prevent potential issues with map-related functionality until Microsoft updates the underlying method. Please note that this solution aligns with the recommendations mentioned in the following GitHub issue and article: - GitHub Issue: milespratt/bingmaps-react#56 - Article: https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/asynchronous-requests Let's continue to monitor the behavior and performance of our application and make any necessary adjustments as our project evolves.
Hi,
I have come over this issue when using this package.
Any idea why?
Code:
The text was updated successfully, but these errors were encountered: