public static double getToleranceDistance ( View view , GoogleMap map ) { BoundingBox boundingBox = getBoundingBox ( map ) ; double boundingBoxWidth = TileBoundingBoxMapUtils . getLongitudeDistance ( boundingBox ) ; double boundingBoxHeight = TileBoundingBoxMapUtils . getLatitudeDistance ( boundingBox ) ; int viewWidth = view . getWidth ( ) ; int viewHeight = view . getHeight ( ) ; double meters = 0 ; if ( viewWidth > 0 && viewHeight > 0 ) { double widthMeters = boundingBoxWidth / viewWidth ; double heightMeters = boundingBoxHeight / viewHeight ; meters = Math . min ( widthMeters , heightMeters ) ; } return meters ; }
Get the tolerance distance meters in the current region of the map