question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OK, now I want to use marker animation, but I can’t find some official example.

I found solution (https://stackoverflow.com/questions/44729776/how-can-animation-be-added-to-markers-in-react-google-maps) where I do it exacly like in vanilia javaScript. Just adding animation={google.maps.Animation.DROP} to marker:

                <Marker 
                    title={}
                    name={}
                    position={}
                    animation={google.maps.Animation.DROP}
                />

but then I have error

google is not defined

And, unfortunately, adding /global google/ at the top of my js won’t help.

So please, advice me how to add marker animation using google-maps-react.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
WilliamVelazquezcommented, Jul 5, 2018

I’m using the version “2.0.2” and it’s working! <Marker title={} name={} position={} animation={this.props.google.maps.Animation.DROP} /> Just like @vegtelenseg said!

2reactions
php7webmobcommented, Jul 30, 2019

Can I set trigger time for this because as soon as the Map component is loaded my animation is already complete and can not see the effects of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Marker Animations | Maps JavaScript API - Google Developers
This example creates a marker in Stockholm, Sweden that uses a DROP animation. Click on the marker to toggle the animation between a...
Read more >
Marker Animation - OpenLayers
Demonstrates how to move a feature along a line. This example shows how to use postrender events and a vector context to animate...
Read more >
Animated Markers - YouTube
Buy Animated Markers https://aejuice.com/product/ animated - markers ?utm_source=aejuice_youtube_channelI Want It All Bundle ...
Read more >
Animates the movement of Google Maps markers. - GitHub
Animated marker movement in Google Maps. For a much nicer and unobtrusive marker animation library based on this one, check out marker-animate-unobtrusive.
Read more >
Marker Classification & Animations [ZDSPB Tech]
Marker: Firing assembly: Animation: Firing valve: Air inlet shutoff: Sheridan Sheridan Animation Hammer spring‑firing valve inlet constriction WGP Sniper WGP Sniper Hammer spring‑firing valve inlet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found