Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7158493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:04:32+00:00 2026-05-28T13:04:32+00:00

I’ve built a Google map where the markers bounce on rollover of some external

  • 0

I’ve built a Google map where the markers bounce on rollover of some external links. I’ve created this short function to bounce the marker:

function makeBounce(marker) {
        marker.setAnimation(google.maps.Animation.BOUNCE);
        setTimeout(function(){ marker.setAnimation(null); }, 750);
}

and I’m using this to execute it:

<a onmouseover="javascript:map.panToBounds(bounds);makeBounce(markersArray[1]);"  href="javascript:google.maps.event.trigger(markersArray[1], 'click');">Marker name</a>

What I’m noticing is that just before the markers bounce they flash. It’s almost imperceptible, but it’s enough to be really annoying (especially since Google’s own blog post launching bouncing markers is very smooth: http://googlegeodevelopers.blogspot.com/2010/12/map-markers-they-move.html).

I’ve created a JS Fiddle here which demonstrates it: http://jsfiddle.net/RmDuz/ (roll over the blue links to see the problem).

I’ve tried it in Firefox9 and Chrome 16 and the problem is there in both.

Any thoughts?

The problem seems to be that the marker image is dynamically (re)loaded just before the bounce, because in Chrome I see the ‘no image’ box just before the marker reappears then bounces.

EDIT: I’ve altered the code to make use of a maps API listener instead of a Javascript function, in the hope that the API code might be a bit more efficient, but no joy 🙁

    google.maps.event.addListener(marker, 'dblclick', (function(marker, i) {
        return function() {
            marker.setAnimation(google.maps.Animation.BOUNCE);
            setTimeout(function(){ marker.setAnimation(null); }, 750);
        }
    })(marker, i));

I’m using dblclick because I don’t want mouseover, which would mean the animation was triggered when the markers are rolled over. I only want the animation triggered when the external links are rolled over:

<a onmouseover="javascript:google.maps.event.trigger(markersArray[1], 'dblclick');">Link name</a>

I’ve updated the JS Fiddle to reflect this: http://jsfiddle.net/RmDuz/1/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:04:33+00:00Added an answer on May 28, 2026 at 1:04 pm

    I ran into this problem as well. It turns out setting MarkerOptions optimized: false or draggable: true will stop the markers from flashing before they animate.

    A non-optimized marker:

    // Create a non-optimized marker
    var marker = new google.maps.Marker({
        position: new google.maps.LatLng(39.107182, -123.501868),
        map: map,
        optimized: false // stops the marker from flashing
    });
    
    // Bounce once
    marker.setAnimation(google.maps.Animation.BOUNCE);
    marker.setAnimation(null);
    

    A draggable marker:

    // Create a draggable marker
    var draggableMarker = new google.maps.Marker({
        position: new google.maps.LatLng(39.107182, -123.501868),
        map: map,
        draggable: true // stops the marker from flashing
    });
    
    // Bounce once
    draggableMarker.setAnimation(google.maps.Animation.BOUNCE);
    draggableMarker.setAnimation(null);
    

    If you take a look at the Google example, you’ll see that they set draggable: true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.