public static function encodeCoordinates($coords)
    {
        static $encoder;

        if ($encoder == null) {
            $encoder = new self();
        }

        $points = [];
        foreach ($coords as $coord) {
            $points[] = explode(',', $coord);
        }

        return "enc:{$encoder->encode($points)}";
    }
public static function encodeCoordinates($coords)
    {
        static $encoder;

        if ($encoder == null) {
            $encoder = new self();
        }

        $points = [];
        foreach ($coords as $coord) {
            $points[] = explode(',', $coord);
        }

        return "enc:{$encoder->encode($points)}";
    }
public static function encodeCoordinates ( $ coords ) { static $ encoder ; if ( $ encoder == null ) { $ encoder = new self ( ) ; } $ points = [ ] ; foreach ( $ coords as $ coord ) { $ points [ ] = explode ( ',' , $ coord ) ; } return "enc:{$encoder->encode($points)}" ; }
Helper function to encode coordinates when there is no required to configure the encoder

@param LatLng[] $coords

@return string
Helper function to encode coordinates when there is no required to configure the encoder