-
Notifications
You must be signed in to change notification settings - Fork 10
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
"Unable to find marker" when loading map via Sprig #52
Comments
My Twig code, if it's relevant:
|
Hi @drifteaur, There have been some changes recently in that area... which version of the Google Maps plugin are you running? Also, feel free to DM me on Discord! I can help you get this sorted out in real-time. |
I've done some digging, and you are correct... there is currently a bug when using Sprig alongside of a map with info windows. This bug was introduced recently. And unfortunately, I won't be able to fix it before updating the plugin for Craft 4 compatibility. As a short term solution, pin your version of the plugin to "doublesecretagency/craft-googlemaps": "4.1.4", That should lock you to the last version before this bug was introduced. Once I've updated the plugin to Craft 4, I'll take another look at resolving this Sprig conflict. Thanks for bringing it up! 👍 |
@lindseydiloreto great, the workaround works, thanks :) |
This is fixed in v4.2.3. Go ahead and update when you get a chance, let me know if i missed anything. 👍 |
@lindseydiloreto Is 4.2.3 still compatible with Craft 3? Thanks for looking into this. |
@wesleygooch It's not, sorry. Since v4.2.0, the plugin requires Craft 4. |
For anyone looking to support Google Maps 4.2.5+ with Sprig this now requires the
|
Thanks for that note @zizther. 👍 Fortunately, the example component already includes To prevent other people from tripping over the same issue, I've added a note to the documentation... |
I followed the guide to set up a dynamic map using Sprig:
https://plugins.doublesecretagency.com/google-maps/guides/sprig/
The map loads fine on the initial page load, and the info windows show when clicking the markers. When the map is refreshed via sprig (in this case, the map is paginated, and going to the next page loads the next set of locations) - the map shows, but the info windows won't open.
On initial load:
On sprig request:
I assume
googleMaps._listInfoWindows
is not being refreshed on a Sprig request somehow. Any way to fix this?The text was updated successfully, but these errors were encountered: