Daiko Posted June 22, 2021 Share Posted June 22, 2021 Hello community, I tried to pin a google map on scroll with generated markers on it. And when I load or update markers, I refresh the Scrolltrigger instance to calculate the new sizes from my updated list (content). Bt when I do a refresh or a resize window, my Google map is reset. I think it's when I make a refresh, the content inside the `pin-spacer` markup reloaded and Google map does reset. Any idea? Thank you Link to comment Share on other sites More sharing options...
OSUblake Posted June 22, 2021 Share Posted June 22, 2021 Hi Daiko, We try to keep these forums focused on GSAP specific questions, but anyone is free to jump and help. It's been years since I've messed with Google maps, so I wouldn't be of much of help. I would try to get the map functionality working without ScrollTrigger. So find a way to get resizes and adding markers to work by itself, then once you get that solved, it should be pretty straightforward on hooking it up to ScrollTrigger. 1 Link to comment Share on other sites More sharing options...
Daiko Posted June 28, 2021 Author Share Posted June 28, 2021 Hello @OSUblake, thank you for your answer. On resize was working. I think it was because of the Scrolltrigger update function. But anyway, I found another solution using position sticky. I will maybe take time to investigate about this bug. So thank you for your help. 1 Link to comment Share on other sites More sharing options...
Shrug ¯\_(ツ)_/¯ Posted June 28, 2021 Share Posted June 28, 2021 I look forward to seeing your outcome if you're able to share. For anyone else looking for similar but resulting in a less dynamic result, you could use your own map artwork like the below example. It may help someone in some way. ¯\_(ツ)_/¯ See the Pen jOryjNX by oliviale (@oliviale) on CodePen 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now