My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1567: map.set_center to a nearby location does not work.
13 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Aug 2009


Sign in to add a comment
 
Reported by [email protected], Aug 6, 2009
When trying to move the map using set_center to a location close to the
current location, only the markers move, and the map doesn't.

The location of the markers will become incorrect.

If the distance from the old center to the new center is large enough, the
bug does not occur.

A test case: http://bliin.com/util/test_setcenter.html

The javascript in there should be self explaning, but here is the relevant
code:

<a href="javascript:center(52.44,4.00);">A. SetCenter 52.44</a>
<a href="javascript:center(52.45,4.00);">B. SetCenter 52.45</a>

<script>
  function center(lat, lon) {
    map.set_center(new google.maps.LatLng(lat, lon));
  }
</script>
 
Hope this helps,
Tomas 
bliin.com



Aug 12, 2009
#1 dennis%[email protected]
Workaround, not perfect, but does the trick for me.

	var zoomlevel = map.get_zoom();
	map.set_zoom(zoomlevel -1);
	map.set_center(marker.get_position());
	map.set_zoom(zoomlevel);
Aug 13, 2009
#2 d.l%[email protected]
Thanks for reporting.  The error was easily reproducible.
Status: Confirmed
Labels: Internal-2053170
Aug 14, 2009
#3 d.l%[email protected]
(No comment was entered for this change.)
Status: FixedNotReleased
Aug 21, 2009
#4 d.l%[email protected]
(No comment was entered for this change.)
Status: Fixed
Labels: Fixed-12
Sign in to add a comment

Powered by Google Project Hosting