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 7811267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:05:53+00:00 2026-06-02T04:05:53+00:00

Is there any way to implement the same bounce functionality from Google Earth when

  • 0

Is there any way to implement the same “bounce” functionality from Google Earth when shifting from one point to another in Google Maps? e.g. If you switch between the listed earthquakes at:
http://earthquakeproject.com/?earth
the gui “bounces” you between the locations on the globe
if you do the same thing at http://earthquakeproject.com/?maps it simply slides between those locations. I’d like the functionality to feel the same between the two.

  • 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-06-02T04:05:55+00:00Added an answer on June 2, 2026 at 4:05 am

    So.. couldn’t find a solution so tis is what I ended up doing, in case anyone else needs to do the same thing. and yes, I know it could be neater…

    first I found a function to determine the distance, and used that to come up with a relative jump amount ranging from 1 to 4

     function sloc(lat,lon){
                sloc_obj.lat1=sloc_obj.lat2;
                sloc_obj.lon1=sloc_obj.lon2;
                sloc_obj.lat2=lat;
                sloc_obj.lon2=lon;
                var R = 6371; // km
                var d = Math.acos(Math.sin(sloc_obj.lat1)*Math.sin(sloc_obj.lat2) + 
                    Math.cos(sloc_obj.lat1)*Math.cos(sloc_obj.lat2) *
                    Math.cos(sloc_obj.lon2-sloc_obj.lon1)) * R;
    
                if(d<1000){
                    return 1;
                }
                if(d<5000){
                    return 2;
                }
                if(d<10000){
                    return 3;
                }
                return(4);
            }
    

    then I used that to stagger out a set of time-delayed actions…

       var l1=$(this).data('lat');
                        var l2=$(this).data('lon');
                        //set up array for times actions
                        var cmd=[]
                        //get the zoom-level based on the distance between two lat/lon spots
                        var d=sloc(l1, l2);
                        //based on our max flyout level, populate our times commands
                        if(d>=1){cmd[cmd.length]="map.setZoom(5)";}
                        if(d>=2){cmd[cmd.length]="map.setZoom(4)";}
                        if(d>=3){cmd[cmd.length]="map.setZoom(3)";}
                        if(d>=4){cmd[cmd.length]="map.setZoom(2)";}
                        cmd[cmd.length]="map.panTo(new google.maps.LatLng("+l1+","+l2+"),"+(1+d)+");";
                        if(d>=4){cmd[cmd.length]="map.setZoom(3)";}
                        if(d>=3){cmd[cmd.length]="map.setZoom(4)";}
                        if(d>=2){cmd[cmd.length]="map.setZoom(5)";}
                        if(d>=1){cmd[cmd.length]="map.setZoom(6)";}
                        timer_offset=0;
    
                        //get the number of steps for our cmd iterator. subtract 1 so we get the middle step in our math since the number of steps will always be odd
                        steps=cmd.length-1
                        //iterate over ALL the steps.
                        for(x=0;x<=steps+1;x++){
                            //for the middle step, wait a bit more than normal
                            if(x>=steps/2){
                                timer_offset=(100*d);
                            }
                            //at the end of the middle action pan, wait a bit even more than that
                            if(x>=(steps/2)+1){
                                timer_offset=(100*d)+200;
                            }
                            //set our timeout
                            time=200+(x*100+timer_offset)
                            //load the command on the timeout
                            setTimeout(cmd[x],time);
                        }
    

    This way I get a reasonably smooth transition out, over and in that is reflective of the amount of distance actually traveled. I’ll try to do this more neatly, maybe with a more logarithmic ease in and out, but it’s better than flat panning.

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

Sidebar

Related Questions

Is there any other way in java to implement call backs apart from inner
Is there any way to implement a Google feedback like feature as shown here
Is there any way to implement a URL mechanisim in asp.net like it has
Is there any way to implement pop-ups similar to the system ones on iPhone?
Is there any way to implement something similar to Chatroulette without using Flash or
Is there any way to implement publish subscribe push notification in Android ? At
Is there any tricky way to implement a set data structure (a collection of
Is there any way to implement waiting for, say, 3 seconds in ActionScript, but
Is there any non-hacky way to determine wether a class' superclass implements a particular
Is there any way to update cookies across folders in PHP? For example, consider

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.