public static function getBoundsOfMarkers($markers, $margin = 0.0)
    {
        $coords = [];
        foreach ($markers as $marker) {
            if (!($marker instanceof Marker)) {
                throw new InvalidParamException('"$markers" must be an array of "' . Marker::className() . '" objects');
            }
            $coords[] = $marker->position;
        }

        return LatLngBounds::getBoundsOfCoordinates($coords, $margin);
    }
public static function getBoundsOfMarkers($markers, $margin = 0.0)
    {
        $coords = [];
        foreach ($markers as $marker) {
            if (!($marker instanceof Marker)) {
                throw new InvalidParamException('"$markers" must be an array of "' . Marker::className() . '" objects');
            }
            $coords[] = $marker->position;
        }

        return LatLngBounds::getBoundsOfCoordinates($coords, $margin);
    }
public static function getBoundsOfMarkers ( $ markers , $ margin = 0.0 ) { $ coords = [ ] ; foreach ( $ markers as $ marker ) { if ( ! ( $ marker instanceof Marker ) ) { throw new InvalidParamException ( '"$markers" must be an array of "' . Marker :: className ( ) . '" objects' ) ; } $ coords [ ] = $ marker -> position ; } return LatLngBounds :: getBoundsOfCoordinates ( $ coords , $ margin ) ; }
Returns the boundaries of an array of Marker objects
@param Marker[] $markers
@param float $margin
@throws \yii\base\InvalidParamException
@return LatLngBounds
Returns the boundaries of an array of Marker objects