Closed nateirwin closed 12 years ago
What was the bug that this was fixing?
The MM.Extent constructor expects four arguments: north, west, south, and east. It was being passed two MM.Location objects, so south and east were undefined.
I think the bug is in the Extent constructor itself, though - look at https://github.com/stamen/modestmaps-js/blob/master/src/extent.js#L7 and there's the code for handling the two-location case, but it should probably early-return to avoid running the rest.
I agree that there is a bug in the Extent constructor, but I would also say that modifying getExtent
to make it pass the proper arguments to the constructor is best.
I did a quick browse through the source, and I couldn't find anywhere internally where an MM.Extent object is created by passing two MM.Location objects into the constructor.
Now if that needs to be maintained to ensure backwards-compatibility that's another story altogether.
There was an upstream logic error in the MM.Extent
code, which I fixed in 25cfffb659c4bce57359014c2a935058ea52f2f0
Thanks, Nate!