cybersthang / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

repositionMap_ always panBy v panTo #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When you select a new marker then it always pans across the map to show the 
info window. This is not so good if the user can select the marker via a 
control outwith the map (e.g. a list) and the markers are far apart, as it 
will animate the pan between the two markers which could take a large 
amount of time.

This can be fixed using panBy if the marker is not within the bounds of the 
map:

if (this.map_.getBounds().containsLatLng(this.marker_.getPoint()))
{
    //usual repositionMap_ code
}
else
{
    this.map_.panTo(this.marker_.getPoint());
}

Cheers
-Calum

Original issue reported on code.google.com by calum.ri...@gmail.com on 29 May 2009 at 3:51

GoogleCodeExporter commented 8 years ago
this is for the ExtInfoWindow

Original comment by calum.ri...@gmail.com on 29 May 2009 at 3:59

GoogleCodeExporter commented 8 years ago
Think this is a duplicate of issue 110 and issue 111?

Commited fix:
http://code.google.com/p/gmaps-utility-library-dev/source/detail?r=996

The fix enables a maxPanning variable, you dont want to stop panning when its 
only a
small bit outside the viewport.

Original comment by bbr...@gmail.com on 29 May 2009 at 5:28

GoogleCodeExporter commented 8 years ago

Original comment by pamela.fox on 23 Jun 2009 at 9:19