public BoundingBox increaseByScale ( final float pBoundingboxPaddingRelativeScale ) { if ( pBoundingboxPaddingRelativeScale <= 0 ) throw new IllegalArgumentException ( "pBoundingboxPaddingRelativeScale must be positive" ) ; final TileSystem tileSystem = org . osmdroid . views . MapView . getTileSystem ( ) ; // out-of-bounds latitude will be clipped final double latCenter = getCenterLatitude ( ) ; final double latSpanHalf = getLatitudeSpan ( ) / 2 * pBoundingboxPaddingRelativeScale ; final double latNorth = tileSystem . cleanLatitude ( latCenter + latSpanHalf ) ; final double latSouth = tileSystem . cleanLatitude ( latCenter - latSpanHalf ) ; // out-of-bounds longitude will be wrapped around final double lonCenter = getCenterLongitude ( ) ; final double lonSpanHalf = getLongitudeSpanWithDateLine ( ) / 2 * pBoundingboxPaddingRelativeScale ; final double latEast = tileSystem . cleanLongitude ( lonCenter + lonSpanHalf ) ; final double latWest = tileSystem . cleanLongitude ( lonCenter - lonSpanHalf ) ; return new BoundingBox ( latNorth , latEast , latSouth , latWest ) ; }
Scale this bounding box by a given factor .