Hey Lars, Op 27 februari 2012 18:02 heeft Lars Hamren <ham...@sdu.se> het volgende geschreven: > There is a rather subtle bug in > > WGoogleMap::zoomWindow (const Coordinate &topLeft, const Coordinate > &bottomRight) > ... > Coordinate topLeftC = topLeft; > Coordinate rightBottomC = rightBottom; > > topLeftC = Coordinate(std::min(topLeftC.latitude (), > rightBottomC.latitude ()), > std::min(topLeftC.longitude(), > rightBottomC.longitude())); > rightBottomC = Coordinate(std::max(topLeftC.latitude (), > rightBottomC.latitude ()), > std::max(topLeftC.longitude(), > rightBottomC.longitude())); > > If, say, rightBottomC.lat < topLeft.lat, then after the seconds assignment > to topLeftC, topLeftC.lat == rightBottomC.lat. Then, in the next assignment, > rightBottomC.lat = rightBottomC.lat, so that both lats are equal. Bummer. > > The solution should be to use the original parameters in the min/max > expressions.
Oops, indeed. > BTW, calling the parameters botttomLeft and topRight would match > Googles sw and ne. > > Or, why not call them anyCorner and oppositeCorner, just to emphasize > that any two opposite corners will do. I wouldn't reject a patch that does this renaming, but I don't think it is a priority right now for us (this code was originally contributed). Regards, koen ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest