My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1443: extend() and union() should return the LatLngBounds object
4 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Jan 2010


Sign in to add a comment
 
Reported by [email protected], Jul 4, 2009
Currently, extend() and union() don't return a value, so we have to write:

myBounds.extend(myPoint);
myBounds.union(yourBounds);
map.fitBounds(myBounds);

If these functions returned the modified object, we could chain these calls, and write:

map.fitBounds(myBounds.extend(myPoint).union(yourBounds));

Much nicer.
Jul 5, 2009
#1 pamela.fox
Interesting idea - I've shared your request with the team.
Status: Acknowledged
Labels: Internal-1961349
Jul 5, 2009
#2 [email protected]
Hey, thanks for considering this.

Of course, the idea could be applied to other places of the API as well, basically to all setter functions without 
return value.

map.set_center(latLng).set_zoom(zoom);
marker.set_icon(foo).set_cursor(bar);
etc.
Jan 11, 2010
#3 [email protected]
(No comment was entered for this change.)
Status: FixedNotReleased
Jan 19, 2010
#4 [email protected]
(No comment was entered for this change.)
Status: Fixed
Labels: Fixed-25
Jan 28, 2010
#5 [email protected]
(No comment was entered for this change.)
Labels: -Fixed-25 Fixed-27
Sign in to add a comment

Powered by Google Project Hosting